Re: Tcl8.5/Tclx8.4 fork doesn't work properly

As I expected, tcl 8.4 with threads support doesn't work properly with fork.
Child process is waiting for something.
strace -p <pid> shows the following
[dan@king BIND]$ strace -p 4849
Process 4849 attached - interrupt to quit
futex(0x8f4a8c4, FUTEX_WAIT, 3, NULL <unfinished ...>
Process 4849 detached

Seems like there is a bug. Who should take a look at this issue ? Somebody
from tcl core devs ?

On Jan 1, 7:54 pm, "Daniel A. Mezentsev" <dmezent...@xxxxxxxxxxx>
Alexandre Ferrieux wrote:
On Jan 1, 7:26 pm, "Daniel A. Mezentsev" <dmezent...@xxxxxxxxxxx>
Hi folks,
I've updated my tcl installation 8.4-->8.5, not everything (tclx still
8.4) and my project stopped to work. I did some investigation and
found that there are some problems with fork. Here is example of code
which work just fine under tcl8.4 (without thread support) and doesn't
work under 8.5 (with thread support):

Why use a threaded version under unix ? Threads and fork don't make a
happy blend.


I know that threads + fork potentially can cause problems (seems like I
hit one of them). Is there workaround to solve this problem and use 8.5
with threads support or I should recompile tcl with threads disabled.
Apparently this problem wider - why binary distribution has so obvious
bug (or feature ;-)).

Sure, but keeping orthogonal things orthogonal is a nice habit. Here
you changed simultaneously the version and the thread support... So
did you try with 8.4-threads ?



Relevant Pages

  • Re: BLT overhaul
    ... refactor and update BLT graph and vectors to a stubs-enabled ... what is possible and how much work it would be to work on a fork. ... and apply some kind of style guide to it or refactor it even more. ... I have a lot of Tcl ...
  • Re: Should Linux distros have Tcl threads enabled?
    ... enabled and the fork command in expect as a bug to my Linux distro. ... There are several Tcl extensions that don't work well with threads. ... Expect uses fork() and Tcl's notifier doesn't work with that, ... "The mutex functions are not async-signal safe. ...
  • Re: Tcl8.5/Tclx8.4 fork doesnt work properly
    ... a thread to manage the notifier. ... threaded Tcl uses a number of threads internally). ... dangling lock problems get swept away by starting another executable) ... but for other uses of fork are just trouble. ...
  • Re: fileevent and vwait quiestion
    ... Thread-enabled Tcl + fork? ... So I need to rebuild tcl. ... how exactly notify thread is confused? ...
  • Re: TCL fork not working when using kernel with NPTL
    ... assistance with. ... when I attempt to attach a bash session to a a fifo by ... Thread enabled tcl has problems when forking, ...