Hi,

I think this is related to the comment I added to the RELEASE notes:

* Loading libnsd into a tclsh and then creating new threads with
the ns_thread command will result in a crash when those threads
exit. The issues has to do with finalization of the async-cancel
context used to support the new "ns_ictl cancel" feature.  This bug
is not present when using the "nstclsh" binary.


The issue above, where Tcl is initialized before AOLserver by loading libnsd into tclsh, results in Tcl thread local storage being finalized before AOLserver's context which includes a pointer to an async handler.

Now, that's not what you're doing here but perhaps TclX is having the same effect. I haven't looked at TclX for sometime so I can't recall what it would be using an async handler for -- perhaps you could dig through the code and comment it out as the async handler stuff was really designed for Unix signal-related things which aren't common in multi-threaded AOLserver.

Alternatively, Tcl could be fixed to avoid freeing itself before AOLserver or any other extension. Unfortunately, that could be a big job -- the Tcl core is already riddled with a lot of code to try to manage the order of finalization.

-Jim






On Nov 1, 2006, at 5:35 PM, Zoran Vasiljevic wrote:

On 01.11.2006, at 23:27, Alex wrote:

Hi,

I am getting yet another crash in AOLServer 4.5.0.
This time it crashes after exiting from threads started with
"ns_thread begin" or "ns_thread begindetached".

Any Suggestions?

Thanks,
~ Alex.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1086359904 (LWP 19612)]
0x00002aaaaae6c2a7 in Tcl_AsyncDelete (async=0x54e6c0) at
/srv/DIST/tcl8.4.13/unix/../generic/tclAsync.c:297
297             while (prevPtr->nextPtr != asyncPtr) {
(gdb) back
#0  0x00002aaaaae6c2a7 in Tcl_AsyncDelete (async=0x54e6c0) at
/srv/DIST/tcl8.4.13/unix/../generic/tclAsync.c:297
#1 0x00002aaaad48190e in TclX_SelectInit () from /usr/lib/ libtclx8.4.so.1

I'm not sure TclX is thread-safe...

Cheers
Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to