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.

classification
Title: multiprocessing.Pipe segmentation fault when recv of unpicklable object
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: jnoller Nosy List: Kristian.Vlaardingerbroek, Zbynek.Winkler, asksol, jnoller
Priority: normal Keywords:

Created on 2010-09-26 19:01 by Zbynek.Winkler, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg117427 - (view) Author: Zbynek Winkler (Zbynek.Winkler) Date: 2010-09-26 19:01
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
>>> from pickle import dumps
>>> from multiprocessing import Pipe
>>> n = etree.Element('new')
>>> dumps(n)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/pickle.py", line 1366, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/lib/python2.6/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib/python2.6/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/lib/python2.6/copy_reg.py", line 70, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle _Element objects
>>> p1, p2 = Pipe()
>>> p1.send(n)
>>> p2.recv()
Segmentation fault
msg120227 - (view) Author: Ask Solem (asksol) (Python committer) Date: 2010-11-02 14:51
Can't reproduce on Python 2.7, but can indeed reproduce on 2.6.  Issue fixed?
msg139157 - (view) Author: Kristian Vlaardingerbroek (Kristian.Vlaardingerbroek) Date: 2011-06-26 09:46
On Python 2.7.2 this can not be reproduced. Instead of the segmentation fault an AssertionError is raised:

AssertionError: invalid Element proxy at 39359432

In Python 3.2 the p1.send(n) step in the example raises a PicklingError when trying to pass an unpickable object.

Recommend closing this ticket.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 54164
2011-06-26 09:49:12neologixsetstatus: open -> closed
resolution: out of date
stage: resolved
2011-06-26 09:46:48Kristian.Vlaardingerbroeksetnosy: + Kristian.Vlaardingerbroek
messages: + msg139157
2010-11-02 14:51:18asksolsetmessages: + msg120227
2010-09-27 14:01:50brian.curtinsetnosy: + asksol
2010-09-27 02:07:20benjamin.petersonsetassignee: jnoller

nosy: + jnoller
2010-09-26 19:01:33Zbynek.Winklercreate