Artifacts Associated With Ticket 650353ffffffffff
Ticket change [4622d840a6] (rid 99472) by nobody on 2002-12-08 06:58:10:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This is a bug that started appearing very recently. During Tcl_Finalize, the socket exit handler is trying to fetch data from a thread local storage index (line 562). The actual fetch succeeds. However, the return value is NULL, the SocketThreadExitHandler immediately tries to dereference this pointer (line 564) without checking for NULL. Checking these pointers for NULL would be nice... However, I believe this is just a symptom of a bigger problem which needs to be uncovered. Based on the diagnostic messages I added to the thread local storage functions, I believe that the data for this particular thread local storage index is NEVER set to a non-NULL value. SocketThreadExitHandler(void * 0x00000000) line 562 + 10 bytes SocketExitHandler(void * 0x00000000) line 528 + 9 bytes Tcl_Finalize() line 840 + 12 bytes I'm wondering if this code has been recently changed. -- JJM
- foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "None"
- title initialized to: "crash in SocketThreadExitHandler"
- type initialized to: "Bug"
Ticket change [e94fa171d1] (rid 104800) by nobody on 2002-12-08 14:10:39:
- icomment:
Logged In: NO A search for "SocketThreadExitHandler(clientData);" in the various CVS revisions reveals that this is/was broken as of CVS revision 1.28 (Wed Nov 27 00:58:01 2002 UTC (11 days, 6 hours ago)). JJM
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [567ed93b37] (rid 94330) by hobbs on 2002-12-08 14:45:42:
- assignee changed to: "davygrvy"
- priority changed to: "6"
Ticket change [e057869502] (rid 115173) by andreas_kupries on 2002-12-08 14:50:05:
- priority changed to: "8"
Ticket change [b2aa9323da] (rid 98377) by nobody on 2002-12-08 15:27:43:
- icomment:
Logged In: NO I have a potential fix for this bug (file win/tclWinSock.c). static void SocketExitHandler(clientData) ClientData clientData; /* Not used. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet (&dataKey); /* NEW: checked below */ Tcl_MutexLock(&socketMutex); if (winSock.hModule) { /* * Make sure the socket event handling window is cleaned-up * for, at most, this thread. */ if (tsdPtr != NULL) /* ONLY call thread exit handler when the thread has been previously initialized by InitSockets */ SocketThreadExitHandler(clientData); - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [7b8b460744] (rid 96928) by davygrvy on 2002-12-08 22:39:30:
- closedate changed to: "2002-12-08T15:39:30"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 Fixed, thanks for the report.
- login: "davygrvy"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- subsystem changed to: "27. Channel Types"
- username: "davygrvy"
Ticket change [0e62ecaaa6] (rid 94610) by nobody on 2004-06-16 18:32:38:
- icomment:
Logged In: NO In SocketThreadExitHandler ----- WaitForSingleObject(tsdPtr->socketThread, INFINITE); it will cause SocketThreadExitHandler hang..forever. if change timeout into some number, could clean the garbage by OS?
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment: