Artifacts Associated With Ticket 3522560fffffffff
Ticket change [ea1dc094ff] (rid 103316) by ferrieux on 2012-04-30 14:06:29:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tests iocmd.tf-24.15,16 deadlock since TIP #398. This is apparently due to their explicit dependency on the background flush-on-exit. I lack the deep understanding of these tests to go deeper, so assigning to you Andreas. Note that #398 still allows background flushes on [close], it is just [exit] which aborts it. Si maybe it is only a matter of waiting a bit since those are finite, very small flushes. But I'm equally ready to do more work in the #398 implementation if this is actually highlighting a more subtle impact on transforms/refchan.
- foundin initialized to: "obsolete: 8.6b2"
- is_private initialized to: "0"
- priority initialized to: "9 Immediate"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ferrieux"
- subsystem initialized to: "26. Channel Transforms"
- title initialized to: "iocmd.tf-24.15,16 incompatible with TIP #398"
- type initialized to: "Bug"
Ticket change [9bf9a153ce] (rid 111209) by ferrieux on 2012-05-01 04:16:33:
- icomment:
Created branch bug-3522560 with the following comment: Explore enforcing the (implied) law that EAGAIN is forbidden for a blocking channel. Violation discovered is iocmd.tf-24.1[56]56 after TIP#398. Turns deadlock of these tests into frank failures. Note that the patch also includes adding timeouts to various vwaits in the tests. Indeed, at first glance the vwaits in the -cleanup part sound fishy, but they are needed to avoid inter-test event leaks, as has been seen before (see fossil history of these tests). So just time out after 1 sec, for they should be instantaneous. The C part of the patch raises an error when a blocking channel returns EAGAIN or EWOULDBLOCK. This is an experimental feature, due to an ominous comment in the code: * This used to check for CHANNEL_NONBLOCKING, and panic if * the channel was blocking. However, it appears that setting * stdin to -blocking 0 has some effect on the stdout when * it's a tty channel (dup'ed underneath) note we no longer panic, but raise a proper error, since it could be a simple script error in a refchan. Still, the threat of a possible stdout becoming nonblocking at the ioctl level, while still remaining blocking as seen by Tcl (due to fd sharing and [fconfigure stdin -blocking 0]), must be investigated. Please test !!!
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [d7b3922395] (rid 124043) by ferrieux on 2012-05-01 04:27:11:
- icomment:
Note that the known test failures induced by this patch are all iocmd*24.1[56] variants (tf or not, ioCmd2 or not).
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [66df79fc6a] (rid 102806) by ferrieux on 2012-05-01 06:10:01:
- icomment:
Trunk has a more generic fix: adding timeouts to vwaits in these tests. They still fail, but no longer deadlock.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [59c5e7acb8] (rid 118024) by ferrieux on 2012-05-01 06:10:02:
- priority changed to: "8"
Ticket change [5594adf16b] (rid 94159) by ferrieux on 2012-05-01 06:13:28:
- icomment:
While seeking the way to fix the tests, we approached more closely the teardown of a cross-thread reflected channel. Attached patch to the tests generates on iocmd.tf-24.16 a panic: FlushChannel: damaged channel list After the following verbose dump: [alex@dellalex unix]$ ./tcltest ../tests/ioCmd.test -file ioCmd.test -match iocmd.tf-24.16 -testdir ../tests -verbose start FOO:initialize rc0 {read write} ---- iocmd.tf-24.16 start FOO:write rc0 ABC RET:EAGAIN FOO:watch rc0 write POSTEVENT FOO2:write rc0 ABC FOO2:watch rc0 {} - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1340479ac6] (rid 124182) by ferrieux on 2012-05-01 06:14:34:
- icomment:
File Added - 442487: refchanbug.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [3c4a08a5c1] (rid 120897) by ferrieux on 2012-05-01 06:15:07:
- icomment:
(the previous patch is against trunk, not the experimental constraint-enforcing branch)
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [ff415f5e81] (rid 108724) by ferrieux on 2012-05-01 23:49:56:
- icomment:
Further digging shows a deeper problem in the "transfer-refchan" combination. The hidden [update] needed for interthread exchanges raises complex reentrancy issues. This preexisted, and has nothing to do with #398.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [7c7ca8cece] (rid 97086) by ferrieux on 2012-05-02 04:08:38:
- icomment:
Changing the title, lowering prio, according to previous observations.
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "5 Medium"
- title changed to: "iocmd.tf-24.15,16 are brittle (refchan+transfer)"
- username: "ferrieux"
- icomment:
Ticket change [2ff37c11b2] (rid 93157) by ferrieux on 2012-05-03 04:11:05:
- icomment:
Updated branch now does [fconfigure -blocking 0] where it should have in the first place.
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "ferrieux"
- icomment:
Ticket change [775c8d2512] (rid 89765) by ferrieux on 2012-05-03 04:49:57:
- icomment:
File Deleted - 442487:
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [eb82288916] (rid 103553) by ferrieux on 2012-05-03 04:50:28:
- icomment:
File Added - 442620: refchanbug.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "refchanbug.patch" [4d86cede3e] (rid 127068) by ferrieux on 2012-05-03 04:50:28.
Ticket change [e8e41e54d2] (rid 104723) by ferrieux on 2012-05-06 16:28:28:
- icomment:
Just to let people know: a BIG fix by Andreas is cooking: let [chan postevent] work properly in transferred refchans.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [cad497c77e] (rid 95427) by ferrieux on 2012-05-07 23:40:46:
- icomment:
Andreas, I found why you weren't seeing your CloseProc called. It was indeed an exaggerated "shortcut" in FinalizeIO when #398 is active. It is now fixed in trunk. Please continue your tests from trunk; the branch bug-3522560, which is *not * fixed, holds an orthogonal feature (enforcing nonblocking for EAGAIN), which may or may not be validated, and will remain mergeable this way.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [b914315cdb] (rid 129066) by ferrieux on 2012-05-09 15:16:49:
- icomment:
Here is a summary of where we stand, for those who are watching. As Andreas says, there were 3 issues intersecting here: (1) EAGAIN for a blocking channel ; not really a problem here, though branch bug-3522560 explores cleaning that up. (2) Incomplete finalization of blocked nb channels on thread-exit; fixed in trunk 2 days ago. (3) Improper cross-thread call into owner context in [chan postevent] for transferred refchans ; this one is the killer. Note that (2) was, by luck, the trigger to make (3) manifest ... Now (3) is being fixed by Andreas's work. Since we have a demonstrating setup, a specific bug and commit will follow shortly.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [31c43a4986] (rid 93489) by andreas_kupries on 2012-05-10 02:18:44:
- icomment:
Committed. Uh. I worked on trunk. This is something we might wish to backport. 8.5 is likely affected by the same issue. === 2012-05-09 === 19:09:51 [32d93a8414] *CURRENT* * generic/tclIORChan.c [Bug 3522560]: Fixed the crash, enabled the test case. Modified [chan postevent] to properly inject the event(s) into the owner thread's event queue for execution in the correct context. Renamed the ForwardOpTo...Thread() function to match with our terminology. (user: andreask tags: trunk) 19:03:42 [92b2807753] * tests/ioCmd.test [Bug 3522560]: Added a test which crashes the core if it were not disabled as knownBug. For a reflected channel transfered to a different thread the [chan postevent] run in the handler thread tries to execute the owner threads's fileevent scripts by itself, wrongly reaching across thread boundaries. (user: andreask tags: trunk) - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [92724cd44a] (rid 120761) by andreas_kupries on 2012-05-10 05:29:02:
- icomment:
22:28:42 [360eb75e01] *CURRENT* Undone part of change [32d93a8414], keeping [chan postevent] synchronous for owner == handler. (user: andreask tags: trunk) - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [b668c395fc] (rid 125416) by ferrieux on 2012-05-10 05:34:39:
- closedate changed to: "2012-05-09T22:34:39"
- closer changed to: "ferrieux"
- icomment:
That last commit also re-enabled iocmd.tf-24.16, which now works reliably (along with .15). Closing.
- login: "ferrieux"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "ferrieux"
Ticket change [7d785c0cd1] (rid 97244) by ferrieux on 2012-05-11 04:07:05:
- icomment:
I'm also having second thoughts about the branch created to enforce "no EAGAIN on blocking channels". Indeed, though the documented semantics seems to imply it, I could not produce a serious misbehavior with its violation, and the aforementioned comment about shared fds threatens of potential incompatibilities... Any thoughts ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment: