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 jm
Recipients jm
Date 2013-05-27.18:04:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za>
In-reply-to
Content
I use pickle over sockets to make 2 processes communicate and I experience hangs when the resulting pickle message is exactly 4097 bytes.

Attached file is a small script reproducing the issue, trying a few values around 4096. It runs on both Python 2.7 & 3.3:

- Python 2.7.3: ok (script exits)
- Python 3.3.2: last iteration hangs

With strace, you can easily see that after reading the 4097 bytes:

[pid 17100] read(3,  <unfinished ...>
[pid 17100] <... read resumed> "\200\2X\367\17\0\0                         "..., 4096) = 4096
[pid 17100] read(3, ".", 4096)          = 1

it reads again without reason:

[pid 17100] read(3, 

No issue with the Python implementation, that you can try with little change:

- Python 2.7.3: ok   (from pickle import Unpickler)
- Python 3.3.2: ok   (from pickle import _Unpickler as Unpickler)
History
Date User Action Args
2013-05-27 18:04:41jmsetrecipients: + jm
2013-05-27 18:04:41jmsetmessageid: <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za>
2013-05-27 18:04:41jmlinkissue18073 messages
2013-05-27 18:04:40jmcreate