Message192628
What I see in gdb is that that read is occurring due to the unpickling thread reading peeking ahead in the stream due to buffered io being used.
#0 0x00007ffff7bcbcbd in read () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000061f521 in fileio_readinto (self=0x7ffff6491528, args=0x7ffff66dc190) at ./Modules/_io/fileio.c:541
#2 0x00000000004b96f0 in PyCFunction_Call (func=0x7ffff601d598, arg=0x7ffff66dc190, kw=0x0) at Objects/methodobject.c:90
#3 0x000000000045a0c2 in PyObject_Call (func=0x7ffff601d598, arg=0x7ffff66dc190, kw=0x0) at Objects/abstract.c:2105
#4 0x000000000045ad3e in PyObject_CallMethodObjArgs (callable=0x7ffff601d598, name=0x7ffff7f3ccf0) at Objects/abstract.c:2341
#5 0x0000000000626e65 in _bufferedreader_raw_read (self=0x7ffff6777e58, start=0xa89210 ".\002X\367\017", len=4096) at ./Modules/_io/bufferedio.c:1438
#6 0x00000000006270ed in _bufferedreader_fill_buffer (self=0x7ffff6777e59) at ./Modules/_io/bufferedio.c:1470
#7 0x0000000000628474 in _bufferedreader_peek_unlocked (self=0x7ffff6777e58) at ./Modules/_io/bufferedio.c:1714
#8 0x0000000000624b1d in buffered_peek (self=0x7ffff6777e58, args=0x7ffff66d4948) at ./Modules/_io/bufferedio.c:880
As a possible workaround if you disable buffering when opening your pipe for input it seems to prevent the problem (though I am not sure about performance implications).
22c22
< load = Unpickler(os.fdopen(r, 'rb')).load
---
> load = Unpickler(os.fdopen(r, 'rb', 0)).load |
|
Date |
User |
Action |
Args |
2013-07-08 08:15:23 | dylanr | set | recipients:
+ dylanr, pitrou, alexandre.vassalotti, serhiy.storchaka, jm |
2013-07-08 08:15:23 | dylanr | set | messageid: <1373271323.14.0.33009572018.issue18073@psf.upfronthosting.co.za> |
2013-07-08 08:15:23 | dylanr | link | issue18073 messages |
2013-07-08 08:15:22 | dylanr | create | |
|