Skip to content
Tcl Source Code History Of Ticket 3522560fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3522560fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3522560fffffffffffffffffffffffffffffffff

  1. Ticket change [ea1dc094ff] (rid 103316) by ferrieux on 2012-04-30 14:06:29:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
    4. foundin initialized to: "obsolete: 8.6b2"
    5. is_private initialized to: "0"
    6. priority initialized to: "9 Immediate"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "ferrieux"
    10. subsystem initialized to: "26. Channel Transforms"
    11. title initialized to: "iocmd.tf-24.15,16 incompatible with TIP #398"
    12. type initialized to: "Bug"
  2. Ticket change [9bf9a153ce] (rid 111209) by ferrieux on 2012-05-01 04:16:33:

    1. 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 !!!
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  3. Ticket change [d7b3922395] (rid 124043) by ferrieux on 2012-05-01 04:27:11:

    1. icomment:
      Note that the known test failures induced by this patch are all iocmd*24.1[56] variants (tf or not, ioCmd2 or not).
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  4. Ticket change [66df79fc6a] (rid 102806) by ferrieux on 2012-05-01 06:10:01:

    1. icomment:
      Trunk has a more generic fix: adding timeouts to vwaits in these tests. They still fail, but no longer deadlock.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  5. Ticket change [59c5e7acb8] (rid 118024) by ferrieux on 2012-05-01 06:10:02:

    1. priority changed to: "8"
  6. Ticket change [5594adf16b] (rid 94159) by ferrieux on 2012-05-01 06:13:28:

    1. 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 {}
      
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  7. Ticket change [1340479ac6] (rid 124182) by ferrieux on 2012-05-01 06:14:34:

    1. icomment:
      
      
      File Added - 442487: refchanbug.patch
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  8. Ticket change [3c4a08a5c1] (rid 120897) by ferrieux on 2012-05-01 06:15:07:

    1. icomment:
      (the previous patch is against trunk, not the experimental constraint-enforcing branch)
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  9. Ticket change [ff415f5e81] (rid 108724) by ferrieux on 2012-05-01 23:49:56:

    1. 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.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  10. Ticket change [7c7ca8cece] (rid 97086) by ferrieux on 2012-05-02 04:08:38:

    1. icomment:
      Changing the title, lowering prio, according to previous observations.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. title changed to: "iocmd.tf-24.15,16 are brittle (refchan+transfer)"
    6. username: "ferrieux"
  11. Ticket change [2ff37c11b2] (rid 93157) by ferrieux on 2012-05-03 04:11:05:

    1. icomment:
      Updated branch now does [fconfigure -blocking 0] where it should have in the first place.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "ferrieux"
  12. Ticket change [775c8d2512] (rid 89765) by ferrieux on 2012-05-03 04:49:57:

    1. icomment:
      
      
      File Deleted - 442487: 
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  13. Ticket change [eb82288916] (rid 103553) by ferrieux on 2012-05-03 04:50:28:

    1. icomment:
      
      
      File Added - 442620: refchanbug.patch
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  14. Add attachment "refchanbug.patch" [4d86cede3e] (rid 127068) by ferrieux on 2012-05-03 04:50:28.

  15. Ticket change [e8e41e54d2] (rid 104723) by ferrieux on 2012-05-06 16:28:28:

    1. icomment:
      Just to let people know: a BIG fix by Andreas is cooking: let [chan postevent] work properly in transferred refchans.
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  16. Ticket change [cad497c77e] (rid 95427) by ferrieux on 2012-05-07 23:40:46:

    1. 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.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  17. Ticket change [b914315cdb] (rid 129066) by ferrieux on 2012-05-09 15:16:49:

    1. 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.
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  18. Ticket change [31c43a4986] (rid 93489) by andreas_kupries on 2012-05-10 02:18:44:

    1. 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)
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  19. Ticket change [92724cd44a] (rid 120761) by andreas_kupries on 2012-05-10 05:29:02:

    1. icomment:
      22:28:42 [360eb75e01] *CURRENT* Undone part of change [32d93a8414], keeping
               [chan postevent] synchronous for owner == handler. (user: andreask
               tags: trunk)
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  20. Ticket change [b668c395fc] (rid 125416) by ferrieux on 2012-05-10 05:34:39:

    1. closedate changed to: "2012-05-09T22:34:39"
    2. closer changed to: "ferrieux"
    3. icomment:
      That last commit also re-enabled iocmd.tf-24.16, which now works reliably (along with .15).
      Closing.
      
      
    4. login: "ferrieux"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "ferrieux"
  21. Ticket change [7d785c0cd1] (rid 97244) by ferrieux on 2012-05-11 04:07:05:

    1. 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 ?
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"