Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-04-04
15:06 • Closed ticket [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP... artifact: 8d29c6c9dd user: jan.nijtmans
2013-11-11
12:27 • Ticket [414d10346b]: 3 changes artifact: a5a6d5cc86 user: jan.nijtmans
12:18 • Pending ticket [414d10346b]. artifact: e56ef8bfb7 user: jan.nijtmans
2013-10-29
08:17
Workaround for [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX check-in: 6ba84ab753 user: jan.nijtmans tags: trunk
08:15
Workaround for [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX check-in: d7c93731e2 user: jan.nijtmans tags: core-8-5-branch
2013-10-28
19:34
Prototype of fix for ticket [414d10346b]. check-in: 53e8329d0d user: mistachkin tags: tkt-414d10346b
18:47 • Ticket [414d10346b] tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX ... artifact: 4a2a89ff29 user: aku
17:53 • Ticket [414d10346b]: 3 changes artifact: 62bc04cec4 user: aku
17:51 • Add attachment uname.tcl to ticket [414d10346b] artifact: 1a1e94d904 user: aku
17:46 • Add attachment hpux.patch to ticket [414d10346b] artifact: 082d1a301b user: aku
17:44 • New ticket [414d10346b] tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX<... artifact: 6f7e4503fe user: aku

tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX

Closed / Fixed414d10346bef85d8b89e64eea146d6b336f77ea4Created 13 years agoUpdated 13 years ago
Descriptionplain2013-10-28 17:44:41
In recent weeks the AS Tcl 8.5/6 builds on our HPUX boxing were
failing, with the just-built tclsh hanging itself up when trying to

    set foo [exec uname -a]

Inspection of the process list did not show the uname child, just the
hanging tclsh. Concluded that it hangs either just before spawning the
child, or after the child has terminated and is gone.

Tcl 8.5/6 are built with threads (that should have been a hint, in hindsight).

This problem is the reason why the recent AT CE releases (8.5.15.0,
8.6.1.0) do not have HPUX in their line up.

Today I managed to claw enough cycles from having to do regular donuts
to bisect the issue.

The attached uname.tcl is my test script. Printing OK when GODD, and
hanging after the UNAME= output when bad.
Note that after killing the process with ^C it is still necessary to
kill -9 it, ^C does not remove it entirely.

The attached bitest.sh is the code to build Tcl from source, with my
specific directory layout for such work,
At the end it runs the uname.tcl

Bisection results:

% f bi log
  1 BAD  2013-10-22 18:55:02 e077937cf04d43d2  -- head core-8-5-0-branch
  2 GOOD 2007-12-19 21:32:06 39e99a2de45c6434  -- tag core-8-5-0
  3 GOOD 2010-11-01 19:39:23 4150f5bace63c09e
  4 GOOD 2012-06-05 15:40:56 7581260f8ea6e15f
  5 GOOD 2013-01-30 18:58:37 e7ef315c2fb61d08
  6 GOOD 2013-05-01 21:13:03 e7d7fe409abbf3f1
  7 GOOD 2013-07-08 18:55:23 728fb2f25bda6df0
  8 BAD  2013-09-19 14:06:46 3a3f75ac5a6d5f72
  9 BAD  2013-08-15 19:55:26 f3fac8ede1a102da
 10 GOOD 2013-07-29 09:29:16 334ab96e5ee173a0
 11 BAD  2013-08-11 14:41:10 f04e2881d307a743
 12 BAD  2013-08-05 21:58:21 0107005970cef5f6
 13 BAD  2013-08-01 12:38:04 02909e227fb95f54

% f bi vlist
2013-08-01 12:38:04 02909e227fb95f54 BAD CURRENT
2013-07-29 09:29:16 334ab96e5ee173a0 GOOD

That is
    http://core.tcl.tk/tcl/info/02909e227fb95f54

Glancing over it, it seems to be pthread-at-fork support going wrong
somehow in combination with [exec].
See what I meant with 'compiled for threads should have been a hint' ?!

Going back to donuts I plan to investigate a bit more over next week.
I.e. getting a detailed look where it hangs because of this change.

In the mean time this mail is a general alert to various maintainer
about the issue, in case you have an HPUX box (11.00) and spare time
as well, are the committer, or experience with threads (I hope).
Referenced by3
akuplain2013-10-28 17:53:14
Note that the original medium for the main description was a mail to a few people. As such it references a few attached files. While I have now attached the demo script (uname.tcl) here, the other referenced file, the build script bitest.sh will not be attached to this ticket.
akuplain2013-10-28 18:47:10
Testing Jan's hpux.patch ...
- Fix HPUX symbol to "__hpux".
- Applies cleanly to the current head of core-8-5-0-branch
  (Revision [a803608ed5]).
- Compiles cleanly
- Now the test is GOOD.

So, disabling the entire code is possible and a viable workaround until we have a proper fix.
jan.nijtmanswiki2013-11-11 12:18:09

Workaround committed to core-8-5-branch [d7c93731e2] and trunk [6ba84ab753].

jan.nijtmanswiki2013-11-11 12:27:00

Related: [1470152]

jan.nijtmans Closed ticket [414d10346b]. [History diff]2014-04-04 15:06:38
Log in (anonymous is fine) to add a comment.

Attachments: