FS#16401 - [tcl] threads cause deadlock when processes fork
Attached to Project:
Arch Linux
Opened by Michael Kreitzer (mrgrim) - Wednesday, 30 September 2009, 02:40 GMT
Last edited by Allan McRae (Allan) - Saturday, 23 January 2010, 12:57 GMT
Opened by Michael Kreitzer (mrgrim) - Wednesday, 30 September 2009, 02:40 GMT
Last edited by Allan McRae (Allan) - Saturday, 23 January 2010, 12:57 GMT
|
Details
tcl 8.5 has a known problem where forking causes a futex
deadlock when tcl is compiled with --enable-threads. This is
documented in the following places:
http://sourceforge.net/tracker/index.php?func=detail&aid=1470152&group_id=10894&atid=110894 http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2008-01/msg00023.html http://groups.google.com/group/comp.lang.tcl/msg/ce6a1324bada8db0 I encountered this when a user attempted to run an eggdrop bot. When running with the -n flag which causes eggdrop not to fork it works fine. Otherwise it deadlocks. The only solution is to compiled tcl using --disable-threads. This is the solution other distributions have taken. https://bugzilla.redhat.com/show_bug.cgi?id=443246 If there is nothing specific that must have tcl threads I would request this be disabled in the package in extra. |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 23 January 2010, 12:57 GMT
Reason for closing: Won't implement
Additional comments about closing: See comment
Saturday, 23 January 2010, 12:57 GMT
Reason for closing: Won't implement
Additional comments about closing: See comment
The issue is not eggdrop, however. Eggdrop simply exposes the bug. _Any_ application that links to TCL or is written in TCL that forks while threads are enabled _in TCL_ will deadlock. It's TCL itself that must be compiled with --disable-threads. Another discussion can be found here where compiling with threads disabled breaks other things:
http://www.linux-archive.org/fedora-development/348808-tcl-tk-without-threads.html
All in all it seems TCL just sucks no matter what you do, the issue will not be fixed, and the official solution is ship two packages.. one w/ threads and one w/o.
Perhaps a solution might be to have two packages that provide tcl, tcl-nothreads and tcl-threads, and make one default when pacman needs tcl.