Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1f17a6350dfe3ac6cc46b519e2b042930541dac22c2d3845a21154e6f24aff72
Ticket: be38540b321769e53e36e8d03b1a867a1df4675f
Deadlock during fork in TclpAlloc
User & Date: christian.nassau on 2020-08-18 09:40:15
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    We are seeing the following stack trace for a child process started via fork; it seems to be permanently stuck in the call to "Tcl_MutexLock(allocMutexPtr);" (implicitly triggered by TCL_TSD_INIT(&dataKey) when there is not yet thread specific data for the dataKey):
    
    #0 0x00007f2c4e21a54d in __lll_lock_wait () from /lib64/libpthread.so.0
    #1 0x00007f2c4e215e9b in _L_lock_883 () from /lib64/libpthread.so.0
    #2 0x00007f2c4e215d68 in pthread_mutex_lock () from /lib64/libpthread.so.0
    #3 0x00007f2c49c59efc in TclpAlloc () from libtcl8.6.so
    #4 0x00007f2c49b83088 in Tcl_Alloc () from libtcl8.6.so
    #5 0x00007f2c49c59738 in Tcl_GetThreadData () from libtcl8.6.so
    #6 0x00007f2c49c7a12c in AtForkChild () from libtcl8.6.so
    #7 0x00007f2c48d44a9e in fork () from /lib64/libc.so.6
    
    My guess is that the fork happened at a very unfortunate moment where the "allocMutexPtr" in the parent process was temporarily locked. Should there not be a call at the beginning of "AtForkChild" that forces "allocInit" back to zero?
    
  5. foundin changed to: "8.6.5"
  6. is_private changed to: "0"
  7. login: "christian.nassau"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "3b279cda57135cd36d2c32c66396637342913651"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "christian.nassau"
  14. subsystem changed to: "49. Threading"
  15. title changed to: "Deadlock during fork in TclpAlloc"
  16. type changed to: "Bug"