Artifacts Associated With Ticket 994748ffffffffffffffffffffffffffffffffff
Ticket change [639e88e179] (rid 92611) by mistachkin on 2004-07-20 19:25:05:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
After running TkChat for a long time, the panic "Tcl_RegisterChannel: duplicate channel names" is seen upon exiting. This bug seems to exist in HEAD and core-8-4-branch. Here is the stack trace: NTDLL! DbgBreakPoint address 0x77f7645c TCL84! Tcl_PanicVA + 201 bytes TCL84! Tcl_Panic + 31 bytes TCL84! Tcl_RegisterChannel + 122 bytes TCL84! Tcl_SocketObjCmd + 1071 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! Tcl_EvalEx + 577 bytes TCL84! Tcl_EvalObjEx + 200 bytes TCL84! Tcl_EvalObjCmd + 123 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! TclCompEvalObj + 4284 bytes TCL84! TclCompEvalObj + 405 bytes TCL84! TclObjInterpProc + 1259 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! TclCompEvalObj + 4284 bytes TCL84! TclCompEvalObj + 405 bytes TCL84! TclObjInterpProc + 1259 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! TclCompEvalObj + 4284 bytes TCL84! TclCompEvalObj + 405 bytes TCL84! TclObjInterpProc + 1259 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! Tcl_EvalEx + 577 bytes TCL84! Tcl_Eval + 23 bytes TCL84! Tcl_GlobalEval + 44 bytes TK84! Tk_BindEvent + 2510 bytes TK84! TkBindEventProc + 405 bytes TK84! Tk_HandleEvent + 1747 bytes TK84! Tk_DestroyWindow + 762 bytes TK84! Tk_DestroyWindow + 513 bytes TK84! Tk_DestroyWindow + 513 bytes TK84! Tk_GetNumMainWindows + 279 bytes TCL84! Tcl_Finalize + 105 bytes TCL84! Tcl_Exit + 8 bytes TCL84! Tcl_ExitObjCmd + 104 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! TclCompEvalObj + 4284 bytes TCL84! TclCompEvalObj + 405 bytes TCL84! TclObjInterpProc + 1259 bytes TCL84! TclEvalObjvInternal + 778 bytes TCL84! Tcl_EvalEx + 577 bytes TCL84! Tcl_Eval + 23 bytes TCL84! Tcl_GlobalEval + 44 bytes TK84! TkWmProtocolEventProc + 174 bytes TK84! Tk_HandleEvent + 1431 bytes TK84! TkQueueEventForAllChildren + 216 bytes TCL84! Tcl_ServiceEvent + 138 bytes TCL84! Tcl_DoOneEvent + 425 bytes TK84! Tk_MainLoop + 25 bytes TK84! Tk_MainEx + 1305 bytes WISH84! 004010ab() WISH84! 004015be()
- foundin initialized to: "obsolete: 8.4.6"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mistachkin"
- subsystem initialized to: "None"
- title initialized to: "Tcl_RegisterChannel: duplicate channel names"
- type initialized to: "Bug"
Ticket change [5fa4a0fd0e] (rid 115854) by dkf on 2004-08-03 16:33:30:
- assignee changed to: "andreas_kupries"
- subsystem changed to: "25. Channel System"
Ticket change [34fe5e5ff5] (rid 106839) by andreas_kupries on 2004-10-29 02:38:06:
- icomment:
Logged In: YES user_id=75003 Could it be that the generator for channel names wrapped around ? I.e could it be that socket created a new channel, and the name it created for it was the name of an existing channel which had not been closed ? This would also imply that tkchat is leaking socket channel handles. Looking deeper at the stack - It seems that some code tries to _create_ a new socket while the core is in the finalization (exit -> finalization -> destroy window -> event -> event handler = eval -> .... -> socket -> boom). Were you able to reproduce this, with a stack telling us more about the program state ? How long had you let tkchat run to get this ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [6ecf0e55c4] (rid 100205) by andreas_kupries on 2005-10-06 05:59:05:
- closedate changed to: "2005-10-05T22:59:05"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Is this still reproducible with the current heads of 8.4 and main branch ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- status changed to: "Pending"
- username: "andreas_kupries"
Ticket change [6a819126e2] (rid 128162) by mistachkin on 2005-10-10 02:34:07:
- icomment:
Logged In: YES user_id=113501 I believe that this bug still exists in at least 8.4 and possibly HEAD. TkChat was changed to use Jabber, so I'm not sure if you can repro this bug using TkChat any more; however, I do not believe that this bug was ever "fixed". I think that some of the other IO finalization bugs may be related.
- login: "mistachkin"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "mistachkin"
- icomment:
Ticket change [d3027f483e] (rid 257743) by serhiy.storchaka on 2026-10-12 13:54:02:
- icomment:
I cannot reproduce this with 8.6.18 and 9.1 on Windows and Linux: a script which leaves 300 sockets open and creates 300 more from a <code><Destroy></code> binding of <code>.</code> during <code>exit</code> exits cleanly. Socket channel names are now derived from the address of the channel state, so a new socket cannot get the name of a channel that is still registered.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [a2d34d04a3] (rid 257744) by serhiy.storchaka on 2026-10-12 13:54:02:
- login: "serhiy.storchaka"
- resolution changed to: "Works For Me"
- status changed to: "Pending"