Skip to content
Tcl Source Code History Of Ticket a0bc856dcd
Login

History Of Ticket a0bc856dcd

Artifacts Associated With Ticket a0bc856dcd

  1. Ticket change [a3312134f2] (rid 132896) by oehhar on 2013-07-17 15:23:55:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Rivet, the Apache tcl module, does the following:
      
        #  Apache starts one process and starts a TCL interpreter
        #  Users have the ability to execute commands now. For the huge FlightAware website, it was written, that loading packages now, instead in step 4, saves 40 minuites of time.
        #  Apache forks this process to worker processes including the initialized TCL interpreter. The Notifier Thread required for <b>fileevent</b> is not present in the new process.
        #  Users have the possibility to do per process initialisation here, like data base open etc.
        #  If a page is requested, an interpreter in a worker process is called.
      
      The issue is, that <b>fileevents</b> do not fire any more, as there is only one notifier thread in the first process.
      The notifier thread is invoked by all processes as the anonymous pipe is still active but has no access to shared memory and file handlers of the forked processes.
      
      The idea is to modify the exposed procedure <b>Tcl_InitNotifier</b> to:
        #  Check, if it was forked, e.g. if the process id changed
        #  If so, close the connection to the pipe and start a new notifier thread.
      
      Then, <b>Tcl_InitNotifier</b> may be called after the fork and anything is working again...
      
      The current version of <b>Tcl_InitNotifier</b> only creates the thread on the very first call and thus does not recreate after the fork.
      
      Some web pointers:
        *  [https://groups.google.com/forum/#!topic/comp.lang.tcl/Ja01kv75tVk|clt thread "Async sockets hang under Rivet but work in tclsh 8.6"]
        *  [https://issues.apache.org/bugzilla/show_bug.cgi?id=55153|Rivet Bug 55153 "fileevents do not fire"]
      
    5. foundin initialized to: "8.6.0"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "oehhar"
    14. subsystem initialized to: "01. Notifier"
    15. title initialized to:
      Unix: Start notifier thread in Tcl_InitNotifier again if process id changed due to fork1
      
    16. type initialized to: "RFE"
  2. Ticket change [5453f5690e] (rid 132946) by jan.nijtmans on 2013-07-21 15:54:33:

    1. assignee changed to: "hoehlmann"
    2. icomment:
      RFE -> Bug
      
      Rebased [6f69bbba43] to core-8-5-branch, and added "testfork" test command to be used in test-case.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. type changed to: "Bug"
  3. Ticket change [0264538747] (rid 132950) by oehhar on 2013-07-22 08:52:12:

    1. icomment:
      The added test file passes only on a patched Tcl and not on Tcl 8.5 branch.
      
      With the patch, test "iocmd.tf-32.1" waits infinitely but does not on Tcl 8.5 branch.
      
      Thus, the patch still has issues.
      
      My system:
         *   Linux CentOS x86_64
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [680d4b9713] (rid 132957) by oehhar on 2013-07-22 10:58:59:

    1. icomment: "The stall of test "iocmd.tf-32.1" is fixed by Jan."
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  5. Ticket change [03d77e78df] (rid 132960) by oehhar on 2013-07-22 12:15:59:

    1. icomment:
      Tested by Jan on Cygwin
      
      Tested on CentOS x86_64 with and without threaded:
        *  no test suite failures while new test always ran
        *  practical test within Rivet ok
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  6. Ticket change [e0bdffc549] (rid 133943) by oehhar on 2013-09-17 06:49:31:

    1. assignee changed to: "oehhar"
    2. closedate changed to: "2456552.78439135"
    3. closer changed to: "oehhar"
    4. icomment:
      Closed, included in tcl 8.5.15 and tcl 8.6.1
      Thank you all,
      Harald
      
    5. login: "oehhar"
    6. mimetype: "text/plain"
    7. resolution changed to: "Accepted"
    8. status changed to: "Closed"
    9. username: "oehhar"