Artifacts Associated With Ticket 02fb67f4d35b22b89ba627d28f24e65338b7e705
Ticket change [67fd6dc463] (rid 4353) by anonymous on 2026-07-29 02:16:40:
- foundin initialized to: "2.0.1"
- 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. - login: "anonymous"
- mimetype: "text/x-markdown"
- severity initialized to: "Critical"
- status initialized to: "Open"
- title initialized to: "Crash on process shutdown"
- type initialized to: "Code Defect"
Ticket change [507f438497] (rid 4354) by bohagan on 2026-07-30 01:21:37:
- 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.
- login: "bohagan"
- mimetype: "text/x-markdown"
- priority changed to: "Immediate"
- resolution changed to: "Open"
- icomment:
Ticket change [dc8ab81504] (rid 4365) by bohagan on 2026-08-02 21:43:48:
- 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.
- login: "bohagan"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [d8679101cc] (rid 4375) by bohagan on 2026-09-05 21:34:47:
- icomment: "Fixed in [2a9aba281f740144]."
- login: "bohagan"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"