This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anderseta
Recipients Anderseta, christian.heimes
Date 2017-07-02.23:23:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za>
In-reply-to
Content
---------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/opt/storage_server/server_tcp.py", line 121, in process_request
    self.pipes[self.proc_turn][1].send((request, client_address))
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
  File "/usr/local/lib/python3.6/socket.py", line 185, in __getstate__
    raise TypeError("Cannot serialize socket object")
TypeError: Cannot serialize socket object
---------------------------------------

I am trying to send a ssl wrapped socket object (server side) into a pipe to another process using multiprocessing.

Btw, without ssl_wrap it works.

Basically this:

newsocket, fromaddr = self.socket.accept()

connstream = ssl.wrap_socket(newsocket, server_side=True, certfile=self.certfile, keyfile=self.keyfile)

pipe = multiprocessing.Pipe()
proc = multiprocessing.Process(target=proc_run, args=(pipe[0],), daemon=False)
proc.start()

#Error here
pipe[1].send((connstream, fromaddr))

I am sorry if this is intentional.
History
Date User Action Args
2017-07-02 23:23:29Andersetasetrecipients: + Anderseta, christian.heimes
2017-07-02 23:23:29Andersetasetmessageid: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za>
2017-07-02 23:23:29Andersetalinkissue30829 messages
2017-07-02 23:23:29Andersetacreate