Message190149
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) |
|
Date |
User |
Action |
Args |
2013-05-27 18:04:41 | jm | set | recipients:
+ jm |
2013-05-27 18:04:41 | jm | set | messageid: <1369677881.19.0.98233808248.issue18073@psf.upfronthosting.co.za> |
2013-05-27 18:04:41 | jm | link | issue18073 messages |
2013-05-27 18:04:40 | jm | create | |
|