Skip to content
Tcl Source Code History Of Ticket 1381436
Login

History Of Ticket 1381436

Artifacts Associated With Ticket 1381436

  1. Ticket change [6e1c89f9e5] (rid 128817) by yahalom on 2005-12-15 10:07:20:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      tcl:8.4.2.12
      thread: 2.6.2
      windows: server 2003
      when using tcl many threads tcl crashes. 
      0000: 41 70 70 6c 69 63 61 74   Applicat
      0008: 69 6f 6e 20 46 61 69 6c   ion Fail
      0010: 75 72 65 20 20 74 63 6c   ure  tcl
      0018: 73 68 38 34 74 2e 65 78   sh84t.ex
      0020: 65 20 38 2e 34 2e 32 2e   e 8.4.2.
      0028: 31 32 20 69 6e 20 74 63   12 in tc
      0030: 6c 38 34 74 2e 64 6c 6c   l84t.dll
      0038: 20 38 2e 34 2e 32 2e 31    8.4.2.1
      0040: 32 20 61 74 20 6f 66 66   2 at off
      0048: 73 65 74 20 30 30 30 36   set 0006
      0050: 62 33 64 63               b3dc    
      
      
      this looks like the same phenomena I reported in the 
      past on bug number 859820 submitted on 2003-12-14 
      04:54.
      locking the open/close pipe with tsv::lock stops the 
      crash a thing which supports my assumption.
      doesn't the patch that was created in the previous bug 
      report inserted to the version?
      I tried to apply the bug suggested on that bug but I 
      still get the error. can a new patch be created?
      
      
       
      
    4. foundin initialized to: "obsolete: 8.4.12"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "yahalom"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to: "threaded tcl crashes"
    11. type initialized to: "Bug"
  2. Ticket change [6aa416f306] (rid 128190) by yahalom on 2005-12-15 17:39:43:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      compiling with symbos this is what I get:
      unsigned long
      TclpGetPid(
          Tcl_Pid pid)/* The HANDLE of the child 
      process. */
      {
          ProcInfo *infoPtr;
      
          Tcl_MutexLock(&pipeMutex);
          for (infoPtr = procList; infoPtr != NULL; infoPtr = 
      infoPtr->nextPtr) {
      if (infoPtr->hProcess == (HANDLE) pid) {
          Tcl_MutexUnlock(&pipeMutex);
      ==>    return infoPtr->dwProcessId;
      }
          }
          Tcl_MutexUnlock(&pipeMutex);
          return (unsigned long) -1;
      }
      
      
      the exception is on :return infoPtr->dwProcessId;
      
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  3. Ticket change [2fc4c22972] (rid 93130) by dkf on 2005-12-15 20:26:06:

    1. assignee changed to: "vasiljevic"
    2. priority changed to: "8"
  4. Ticket change [da1873fdb1] (rid 107717) by vasiljevic on 2005-12-20 19:23:34:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Hm.... this is bad. The mutex is released too early, referencing the 
      infoPtr->dwProcessId w/o protection. I do not know if this is the
      cause of the problem (have to examine that code more carefully)
      but on the first glance I'd do:
      if (infoPtr->hProcess == (HANDLE) pid) {
                  unsigned long processId = infoPtr->dwProcessId;
          Tcl_MutexUnlock(&pipeMutex);
                  return processId;
      }
         
      If you do this in your copy, can you still reproduce the bug?
      
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  5. Ticket change [08c4a21a3c] (rid 89618) by yahalom on 2005-12-20 21:40:50:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      I still get an exception but this time in a different place.
         
      TclpGetPid(
          Tcl_Pid pid)/* The HANDLE of the child 
      process. */
      {
          ProcInfo *infoPtr;
      
          Tcl_MutexLock(&pipeMutex);
          for (infoPtr = procList; infoPtr != NULL; infoPtr = 
      infoPtr->nextPtr) {
      ==>if (infoPtr->hProcess == (HANDLE) pid) {
      unsigned long processId = infoPtr-
      >dwProcessId;
          Tcl_MutexUnlock(&pipeMutex);
          return processId;
      }
          }
          Tcl_MutexUnlock(&pipeMutex);
          return (unsigned long) -1;
      }
      
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  6. Ticket change [bba66834b7] (rid 129526) by vasiljevic on 2005-12-20 21:45:02:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Well, then it is pretty clear. The global "procList" is busted.
      This is more difficult to trace as I'm not very familiar with 
      the Windows sources. I will give it a try though.  
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  7. Ticket change [bb205f8ce8] (rid 129428) by yahalom on 2006-01-11 14:53:53:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      I compiled tcl with mingw and the crash does not happen. it 
      seems that compiling threaded tcl with vc 6 does not work 
      well on windows 2003. 
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  8. Ticket change [208d8703dd] (rid 130446) by vasiljevic on 2006-01-11 21:52:08:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Great. What a mess... 
      Did you try compiling with VC6 but turning OFF compiler optimizations?
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  9. Ticket change [252417ffb6] (rid 131234) by vasiljevic on 2006-01-15 02:28:58:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      I do not know if this applies here but I have commited a fix to core-8-4-branch
      which closes a potential hole in TclVFS which MAY (not sure) be relevant to
      the described problem.
      Can you please checkout and try?
      
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  10. Ticket change [180648fc1a] (rid 122598) by yahalom on 2006-01-15 13:47:17:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      I have a bit of work pressure so it will take some time. 
      what file should I checkout?
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  11. Ticket change [e1aa082ef4] (rid 87493) by vasiljevic on 2006-01-15 16:30:01:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Hey, no rush!
      The file is: generic/tclIOUtil.c for core-8-4-branch
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  12. Ticket change [b4f79669a8] (rid 125151) by yahalom on 2006-01-24 15:33:31:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      I rechecked and the crash is happening with mingw. I tried 
      the patch you suggested but it still crashed)-:
      I took the patch from bug 859820 I reported in the past and 
      applied it to the 8.4.12 source and it seems to solve the 
      problem. I do not know how tcl cvs is managed but this 
      seems strange!!!
      I attach the patch from bug 859820 and the fixed file I made
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  13. Ticket change [e4f6f1b4b5] (rid 88048) by vasiljevic on 2006-01-24 15:48:03:

    1. assignee changed to: "davygrvy"
    2. icomment:
      Logged In: YES 
      user_id=95086
      
      Well, the cvs is managed pretty simple. Any developer who verifies and fixes
      the bug is free to apply it to the codebase unless the fix has some unwanted
      side effects. As a good netiquette, the one is expected to discuss this fix
      with the corresponding Tcl core-maintainer assiged to this subsystem and/or
      at the Tcl core maillist. This is now I usually work. In this case, the bug was
      obviously addressed but not applied to the codebase. I will reassign this open
      bug to David as I believe he's the one who made the patch you tried.
      If this fixes your problem, as it apparently does, I see no problem for David
      to apply the patch to both 8.4 and 8.5 core.
       
      David, can you please make sure this gets into the cvs?
      
      
    3. login: "vasiljevic"
    4. mimetype: "text/plain"
    5. username: "vasiljevic"
  14. Ticket change [7e3ea93904] (rid 97371) by hobbs on 2006-02-16 07:23:35:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      Can I get a confirmation of what needs to be applied for
      8.4.13, if anything?
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "hobbs"
  15. Ticket change [63b8d85fbb] (rid 92632) by dgp on 2006-03-10 10:08:04:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      someone knowledgable please
      weigh in about what, if anything,
      needs doing before 8.4.13.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [d4077dce6f] (rid 123376) by davygrvy on 2006-03-10 14:52:45:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      I really don't have my "fu" these days when it comes to
      coding.  I'm just a bit out-of-practice.  I'd go with my
      conclutions from 859820 and apply the diff from r1.39->r1.40
      of tclWinPipe.c to the 8.4 branch.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  17. Ticket change [ad6be080f5] (rid 101467) by dgp on 2006-03-10 22:05:12:

    1. assignee changed to: "andreas_kupries"
  18. Ticket change [aeaf84c925] (rid 101684) by andreas_kupries on 2006-03-15 03:38:01:

    1. closedate changed to: "2006-03-14T20:38:01"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      I have applied this diff to the 8.4 head now. Extended the
      comments a bit to explain the problem behind the fix.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  19. Ticket change [44a9b8477a] (rid 116747) by dkf on 2009-06-18 15:23:45:

    1. icomment:
      
      
      allow_comments - 1
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"