Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-08-30
14:53 • Closed ticket [414419ffff]: async.test crashes with a threaded build plus 7 ... artifact: 74c0e91900 user: davygrvy
13:03 • Ticket [414419ffff]: 4 changes artifact: 7c88919a27 user: davygrvy
2001-08-07
07:27 • Ticket [414419ffff]: 1 change artifact: f6dc80871b user: hobbs
2001-04-12
08:03 • Ticket [414419ffff]: 4 changes artifact: 5e1f077c93 user: davygrvy
08:02 • Ticket [414419ffff]: 4 changes artifact: d21db0f00a user: davygrvy
08:00 • Ticket [414419ffff]: 4 changes artifact: 7620976c5d user: davygrvy
08:00 • Ticket [414419ffff]: 4 changes artifact: ef04aba5ad user: davygrvy
07:59 • Ticket [414419ffff]: 4 changes artifact: e8bff0634b user: davygrvy
07:58 • Add attachment patch.txt to ticket [414419ffff] artifact: 278669b741 user: davygrvy
07:58 • Ticket [414419ffff] async.test crashes with a threaded build status still Op... artifact: c974fdc40b user: davygrvy
2001-04-07
05:09 • Ticket [414419ffff]: 4 changes artifact: 1dcf6e843b user: davygrvy
05:09 • Add attachment free_mutex_missing.txt to ticket [414419ffffffffff|41441... artifact: 3bafb9beb9 user: davygrvy
05:09 • Ticket [414419ffff] async.test crashes with a threaded build status still Op... artifact: 3da0c0a7f8 user: davygrvy
04:53 • Ticket [414419ffff]: 4 changes artifact: f0e819d861 user: davygrvy
04:45 • Ticket [414419ffff]: 4 changes artifact: 2632a3d3ec user: davygrvy
04:45 • Add attachment mutex_crash_in_async.txt to ticket [414419ffffffffff|414... artifact: 271365dcee user: davygrvy
2001-04-06
21:45 • New ticket [414419ffff] async.test crashes with a threaded build. artifact: 9e1a60c9a5 user: davygrvy

async.test crashes with a threaded build

Closed / Fixed414419ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2001-04-06 21:45:35
as reported by sreangsu acharyya 
<[email protected]> on c.l.t:

$ tcltest
% proc async1 {result code} {
    global aresult acode
    set aresult $result
    set acode $code
    return "new result"
}
%
% testasync create async1
segmenation violation


In the TSD structure in tclAsync.c is a mutex.
TclFinalizeSynchronization happens to clear the TSD
before the mutex.
davygrvyplain2001-04-07 04:45:45
File Added - 5088: mutex_crash_in_async.txt
davygrvyplain2001-04-07 04:53:36
Logged In: YES 
user_id=7549

I'm not sure which is right.  The notifier stores mutexes 
in its TSD, but has FinalizeNotifier() to do the needed 
cleanup.  We could have a new cleanup routine 
FinalizeAsync, or have remembered mutexes cleaned prior to 
thread specific data...  I'm not sure if changing the order 
in TclFinalizeSynchronization() has any bad effects.  None 
observed on windows.
davygrvyplain2001-04-07 05:09:52
Logged In: YES 
user_id=7549

although the async.test failure is on unix only, I noticed 
a missing cleanup of criticalsections on windows.  see 
patch.  and might be a factor with

http://sourceforge.net/tracker/index.php?
func=detail&aid=406058&group_id=10894&atid=110894
davygrvyplain2001-04-07 05:09:54
File Added - 5090: free_mutex_missing.txt
davygrvyplain2001-04-12 07:58:32
File Added - 5249: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
davygrvyplain2001-04-12 07:59:25
File Added - 5250: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
davygrvyplain2001-04-12 08:00:30
File Added - 5252: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
davygrvyplain2001-04-12 08:00:57
File Added - 5253: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
davygrvyplain2001-04-12 08:02:06
File Added - 5254: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
davygrvyplain2001-04-12 08:03:23
File Added - 5255: patch.txt

Logged In: YES 
user_id=7549

Instead of changing the order in TclFinalizeSyncronization
(), I think this patch might be the more proper way to go 
as the mutex will be deleted from Tcl_FinalizeThread() 
which seems more correct.
hobbs Ticket [414419ffff]: 1 change [History diff]2001-08-07 07:27:43
davygrvyplain2001-08-30 13:03:24
File Deleted - 5250:
davygrvyplain2001-08-30 14:53:12
Logged In: YES 
user_id=7549

committed "a better proposal" to core.
Log in (anonymous is fine) to add a comment.

Attachments: