History Of Ticket 02fb67f4d35b22b8

Artifacts Associated With Ticket 02fb67f4d35b22b8

  1. Ticket change [67fd6dc463] (rid 4353) by anonymous on 2026-07-29 02:16:40:

    1. foundin initialized to: "2.0.1"
    2. icomment:
      I got a crash running Tcl/Tk trunk (9.1b1) and tcltls 2.0.1, on linux x84_64, OpenSSL 3.0.13
      
      While I couldn't write a short script to repro, the setup is as follow:
      
      * tkcon runs a script from a modified version of jabberlib from the coccinella project.
      * the script connects to the tclers's chat using tls (tested with both tls::socket at port 5223 and tls::import at port 5222).
      * after successful connection, Tk is loaded in the interpreter with [package require Tk].
      * type [exit]
      
      The process segfaults at exit.
      
      The relevant lines from the backtrace are (tcltls built with --enable-symbols)
      
      ```
      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff30ee500 in BIO_ctrl () from /lib/x86_64-linux-gnu/libcrypto.so.3
      (gdb) bt
      #0  0x00007ffff30ee500 in BIO_ctrl () at /lib/x86_64-linux-gnu/libcrypto.so.3
      #1  0x00007ffff3d79369 in ??? () at /lib/x86_64-linux-gnu/libssl.so.3
      #2  0x00007ffff30ee502 in BIO_ctrl () at /lib/x86_64-linux-gnu/libcrypto.so.3
      #3  0x00007ffff5e5d812 in TlsCloseProc ()
          at /usr/local/lib/tcltls2.0.1/libtcl9tls2.0.1.so
      #4  0x00007ffff7cff7b4 in TclFinalizeIOSubsystem ()
          at /usr/local/lib/libtcl9.1.so
      #5  0x00007ffff7cd0344 in FinalizeThread () at /usr/local/lib/libtcl9.1.so
      #6  0x00007ffff7cd10f3 in Tcl_Exit () at /usr/local/lib/libtcl9.1.so
      #7  0x00007ffff7c6ba01 in Tcl_ExitObjCmd () at /usr/local/lib/libtcl9.1.so
      #8  0x00007ffff7c5090a in TclNRRunCallbacks () at /usr/local/lib/libtcl9.1.so
      ```
      
      Steve Landers runs an analysis using Claude Opus 5 and it found these issues: [TclTLS crash - the problem](http://paste.tclers.tk/6232), [TclTLS crash - the fix](http://paste.tclers.tk/6233), [TclLS crash - verification](http://paste.tclers.tk/6234).
      
      Effectively, removing Tcl_CreateExitHandler() from generic/tls.c fixes the issue.
      
    3. login: "anonymous"
    4. mimetype: "text/x-markdown"
    5. severity initialized to: "Critical"
    6. status initialized to: "Open"
    7. title initialized to: "Crash on process shutdown"
    8. type initialized to: "Code Defect"
  2. Ticket change [507f438497] (rid 4354) by bohagan on 2026-07-30 01:21:37:

    1. icomment:
      Thanks for the report. AI sure is getting good now. I didn’t know about channels being closed after the exit handler runs. Sounds like a TCL issue too. I’ll get this fixed in the next few days. Thanks.
      
    2. login: "bohagan"
    3. mimetype: "text/x-markdown"
    4. priority changed to: "Immediate"
    5. resolution changed to: "Open"
  3. Ticket change [dc8ab81504] (rid 4365) by bohagan on 2026-08-02 21:43:48:

    1. icomment:
      This issue is fixed in trunk now. Rather than remove the Tcl_CreateExitHandler call, I made it a no-op so I can use it in the future.
      
    2. login: "bohagan"
    3. mimetype: "text/x-markdown"
  4. Ticket change [d8679101cc] (rid 4375) by bohagan on 2026-09-05 21:34:47:

    1. icomment: "Fixed in [2a9aba281f740144]."
    2. login: "bohagan"
    3. mimetype: "text/x-fossil-plain"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"