Skip to content
Tcl Source Code History Of Ticket 1063988fffffffff
Login

History Of Ticket 1063988fffffffff

Artifacts Associated With Ticket 1063988fffffffff

  1. Ticket change [331e03da7d] (rid 106529) by yahalom on 2004-11-10 17:59:53:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl Version 8. 4.7
      Thread version: 2.5.2
      
      OS Platform and Version: sunOS sundev 5.6 
      Generic_105181-39 sun4u sparc SUNW,Ultra-80
      
      we are running an application that splits to threads 
      and works heavily with oracle database.
      this application works fine on linux/win and other 
      version of sun.
      
      we get many segmantaion fault. running gdb 
      resulted in few cases:
      1. 
      
      alloc: invalid block: 94c6e8: 0 68 ef
      
      
      Program received signal SIGABRT, Aborted.
      [Switching to LWP 8]
      0xef554ca8 in __sigprocmask () 
      from /usr/lib/libthread.so.1
      (gdb) where
      #0  0xef554ca8 in __sigprocmask () 
      from /usr/lib/libthread.so.1
      #1  0xef54b9d0 in _resetsig () 
      from /usr/lib/libthread.so.1
      #2  0xef54b18c in _sigon () 
      from /usr/lib/libthread.so.1
      #3  0xef54dec8 in _thrp_kill () 
      from /usr/lib/libthread.so.1
      
      2.
      
      Program received signal SIGSEGV, Segmentation 
      fault.
      [Switching to LWP 7]
      0xef5c693c in _smalloc () from /usr/lib/libc.so.1
      (gdb) where
      #0  0xef5c693c in _smalloc () from /usr/lib/libc.so.1
      #1  0xef5c6980 in malloc () from /usr/lib/libc.so.1
      #2  0xef5bb9c4 in calloc () from /usr/lib/libc.so.1
      
      3.
      
      alloc: invalid block: 96c988: 0 88 ef
      
      
      Program received signal SIGSEGV, Segmentation 
      fault.
      [Switching to LWP 8]
      0x0002bf5c in MoveObjs (fromPtr=0x38a818, 
      toPtr=0x12cc18, nmove=189)
          at ../generic/tclThreadAlloc.c:689
      689     ../generic/tclThreadAlloc.c: No such file or 
      directory.
              in ../generic/tclThreadAlloc.c
      (gdb) where
      #0  0x0002bf5c in MoveObjs (fromPtr=0x38a818, 
      toPtr=0x12cc18, nmove=189)
          at ../generic/tclThreadAlloc.c:689
      #1  0x0002bc50 in TclThreadFreeObj 
      (objPtr=0x38a818)
          at ../generic/tclThreadAlloc.c:600
      #2  0x0001e0e8 in TclFreeObj (objPtr=0x38a818) 
      at ../generic/tclObj.c:699
      
      
      what can cause all of this? 
      is there a path we can go to help in tracing the bug?
      
    4. foundin initialized to: "None"
    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: "None"
    10. title initialized to: "tcl crash on sun using threads"
    11. type initialized to: "Bug"
  2. Ticket change [297d45ab6e] (rid 88878) by dkf on 2004-11-11 16:38:59:

    1. assignee changed to: "vasiljevic"
    2. foundin changed to: "obsolete: 8.4.7"
    3. priority changed to: "8"
    4. subsystem changed to: "49. Threading"
  3. Ticket change [9ea0669dff] (rid 96509) by vasiljevic on 2004-11-11 16:52:43:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Ancient Sol2.6, hm? 
       
      If the problem would be reproducible on other versions 
      and/or platforms... But since you get it only on Sol 2.6 
      I'm little bit clueless... 
       
      What I see from the trace is the classic memory corruption 
      issue. Some C-level code garbled the Tcl_Obj's which  
      are being kept on the thread private list. At the moment 
      the thread exits, its privately allocated Tcl_Obj's are moved 
      to the thread-wide repository in order to reuse them again. 
      Now, when following the private linked list there is a problem 
      (memory reference) and this cores the process. Too bad. 
       
      I know you will not like me for this, but... I would keep the 
      threads parked and never let them exit. This way a very 
      complex and eventually error-prone garbage collection 
      of resources is avoided. Obviously, you would have to 
      design some sort of thread-caching-and-reusing. You  
      might want to look at the threadpool implementation for 
      some ideas. 
       
      OTOH, is the update to Sol 2.8 an option? 
       
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  4. Ticket change [eeeefcdd71] (rid 108905) by yahalom on 2004-11-11 18:18:51:

    1. icomment:
      Logged In: YES 
      user_id=130120
      
      are all the crashes from the same cause?
      will it help if I trace down at what tcl command it 
      happens?
      is there something on the tcl level we can do? maybe 
      thread locking at certain points?
      the upgrading of the solaris is not in our hands. it is a 
      customer computer. we can only say that we are sorry 
      but our product doesn't work on sol2.6 :-(
      
      
      
    2. login: "yahalom"
    3. mimetype: "text/plain"
    4. username: "yahalom"
  5. Ticket change [6822142ca1] (rid 103012) by vasiljevic on 2004-11-11 18:38:00:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Well after looking at others, it seems to me that there 
      is a gross memory corruption underway. It is not always 
      possible to pinpoint this on a specific Tcl command since 
      the problem may be just deferred and happen ages after 
      the actual cause. I think, out of the experience, that some 
      extension is wrongly handling Tcl objects or otherwise  
      corrupting the memory. The fact that this exposed itself 
      on Sol2.6 might just be a pure coincidence.  
       
      There is not much you can do about that. You might want 
      to use Purify (costs money but it's worth it) and try to get 
      a better picture about what's really happening under the 
      hood. If this is possible, I might give you some tips how to 
      do this right, otherwise you wont be happy. 
      If not, you might try some open-source stuff (valgrind) 
      if they are available on solaris (dunno). We use Purify  
      for such things. 
       
      Speaking about 2.5.2 and Tcl 8.4.7 they are pretty stable 
      in this respect. So the problem might just be in some  
      Tcl extensions you're using, which is not MT-safe or simply 
      buggy in memory handling. 
       
      I do not want to discourage you, but you should prepare 
      for a long journey...  
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  6. Ticket change [e7775c90fc] (rid 104458) by vasiljevic on 2004-11-25 23:06:08:

    1. closedate changed to: "2004-11-25T16:06:08"
    2. closer changed to: "vasiljevic"
    3. icomment:
      Logged In: YES 
      user_id=95086
      
      Closing this as "Wont Fix" since this is most probably the 
      issue with some other C-level extension garbling our memory. 
      
      
    4. login: "vasiljevic"
    5. mimetype: "text/plain"
    6. resolution changed to: "Wont Fix"
    7. status changed to: "Closed"
    8. username: "vasiljevic"