Artifacts Associated With Ticket 3525907
Ticket change [f46a576bbe] (rid 129910) by teopetuk on 2012-05-11 17:27:33:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi! I've tried to use [zlib push decompress] on an unblocked network channel and found that it doesn't read from the channel if it isn't closed by the peer. In the attached script the server part puts two strings into a compressed channel (one immediately and the other after 5 second delay). Apparently, the client side readable fileevent fires many times during these 5 seconds but [read $chan] returns empty string every time. After the finishing [close] the client reads and reports the message (but only the second one!). I would expect the both messages were printed. Currently, I can use a separate [zlib stream decompress] and read the raw bytes from the channel, but I don't think that it's a perfect solution.
- foundin initialized to: "obsolete: 8.6b2"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "teopetuk"
- subsystem initialized to: "57. zlib"
- title initialized to:
[zlib push decompress] doesn't work with [fileevent readabl]
- type initialized to: "Bug"
Add attachment "zlibtest1.tcl" [a3fa0c8d60] (rid 110133) by teopetuk on 2012-05-12 00:27:34.
Ticket change [f28e4daa42] (rid 109567) by teopetuk on 2012-05-12 00:27:35:
- icomment:
File Added - 443234: zlibtest1.tcl
- login: "teopetuk"
- mimetype: "text/plain"
- username: "teopetuk"
- icomment:
Add attachment "zlibtest2.tcl" [a6d3425344] (rid 98671) by teopetuk on 2012-05-12 00:29:03.
Ticket change [476d0ca368] (rid 99702) by teopetuk on 2012-05-12 00:29:03:
- icomment:
File Added - 443236: zlibtest2.tcl
- login: "teopetuk"
- mimetype: "text/plain"
- username: "teopetuk"
- icomment:
Ticket change [a9bd355b04] (rid 99202) by ferrieux on 2012-05-13 22:31:44:
- icomment:
I confirm both the strange disappearance of the bytes written before [-flush sync], and a worrisome level of syscall activity during all the 5 seconds of what should be a completely quiescent delay. Clearly, continued exchanges between the notifier and main thread occur, with a period of 7 ms. Looks like a "tamed busy loop", but I don't like it :/
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "ferrieux"
- icomment:
Ticket change [dcb1a738ea] (rid 114528) by andreas_kupries on 2012-05-17 01:21:30:
- icomment:
Moving the chan configure $chan -flush sync before the puts of the first message (still after the zlib transform is pushed) gets us both messages on the receiver side. I.e. no loss of bytes anymore. It still receives them only when the channel is closed. I suspect that the "-flush sync" (is intended to) activate(s) the special zlib flush code forcing out the data buffered in the zlib transform without ending the zlib stream. This part doesn't seem to work correctly.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "zlib-reworked-without-instrumentation.patch" [6591dcff86] (rid 102574) by andreas_kupries on 2012-05-18 04:30:28.
Ticket change [75e2578044] (rid 105467) by andreas_kupries on 2012-05-18 04:30:28:
- icomment:
File Added - 443826: zlib-reworked-without-instrumentation.patch
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [12646cd9ac] (rid 95298) by andreas_kupries on 2012-05-18 04:31:13:
- icomment:
The attached patch seems to fix the issues, and passes the testsuite for me. Please test.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [b4d269cf4c] (rid 125111) by andreas_kupries on 2012-05-18 04:47:42:
- icomment:
Committed change to branch bug-3525907, rev. 5ffc93920daf1775e96132f6fd826e735d84028b and descendants.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [4d4254d8a6] (rid 127025) by teopetuk on 2012-05-18 12:16:31:
- icomment:
I confirm that after the applying the attached patch the bug is gone.
- login: "teopetuk"
- mimetype: "text/plain"
- username: "teopetuk"
- icomment:
Ticket change [d1e881aab5] (rid 113431) by dkf on 2012-05-19 20:15:11:
- icomment:
Having looked at https://core.tcl.tk/tcl/vdiff?from=ba6087ec84&to=c003b262df77ede3 It looks reasonable. (I'll want to tinker with it after merger to reduce the apparent complexity, but I'll not cause this fix to be delayed for that.) Before commit back, do we have a test for this yet?
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [beede78bef] (rid 102171) by ferrieux on 2012-05-21 03:52:54:
- icomment:
Test committed to the branch.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [b4d88d5bc5] (rid 125116) by dkf on 2012-05-23 21:35:14:
- closedate changed to: "2012-05-23T14:35:14"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Thanks to everyone who worked on this; fix merged to trunk
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"