Opened 5 years ago

Closed 5 years ago

#13331 closed defect (fixed)

tor's test-network hangs when used with make -j2

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Keywords: tor-test
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

(GNU) Make 3.81 has a bug/feature where if it is running processes in parallel using -j2 (or more), it waits until all descendent processes have exited before it returns to the shell.

When a command like "make -j2 test-network" is run, this means that test-network apparently hangs until it either make or all the tor processes have exited.

A workaround is to use make without -j, or make -j1 if there is an existing alias to "make -jn" in the shell.

One way to resolve this bug in tor is to use "chutney stop" after "chutney verify" in test-network.sh. I'll post a github branch that does this shortly.

Another, far more complex way would be to start another process group in chutney or something - but that would probably have unintended consequences.

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by teor

Status: newneeds_review

Ready for review:

Repository: ​​​​​https://github.com/teor2345/tor.git
Branch: test-network-hang-on-make-j2

comment:2 Changed 5 years ago by teor

I've just updated this branch so that test-network.sh uses the exit status of chutney verify (the previous behaviour), rather than the exit status of chutney stop.

comment:3 Changed 5 years ago by nickm

Milestone: Tor: 0.2.6.x-final
Resolution: fixed
Status: needs_reviewclosed

Merged into master; thanks!

Note: See TracTickets for help on using tickets.