[asterisk-dev] BuildSystem: make --jobs without amount of thread hangs

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Jun 9 05:15:09 CDT 2016


On Wed, Jun 08, 2016 at 08:58:00PM +0200, Alexander Traud wrote:
> On Ubuntu 16.04 LTS, when I build Asterisk 13.9.1 via
> 
> 
> wget downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
> tar zxf asterisk-1*.tar.gz
> sudo apt install libssl-dev libncurses-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev libjansson-dev libedit-dev libblocksruntime-dev
> ./configure
> 
> make --jobs
> 
> the whole computer hangs. Normally, this indicates a dependency issue in the Makefile. Furthermore, I faced dependency issues with make --jobs while doing a partial compile. However, at that time, I did not debug this. Therefore, even specifying not unlimited but a certain amount of threads might not reliable in all cases.
> 
> I would love to debug this, however, I have no idea where to start. Does anyone know about a debugging strategy for this? Or should I just report this issue on JIRA, so that someone else looks into this one day?

$ man make | grep -A7 -w -- --jobs
       -j [jobs], --jobs[=jobs]
            Specifies the number of jobs (commands) to run simultaneously.  If
            there is more than one -j option, the last one is  effective.   If
            the  -j  option  is given without an argument, make will not limit
            the number of jobs that can run simultaneously. When make  invokes
            a sub-make, all instances of make will coordinate to run the spec‐
            ified number of jobs at a time; see the section PARALLEL MAKE  AND
            THE JOBSERVER for details.

So the first thing to see is: do you have make going wild "by design"
(spawning many child-processes of the same parent process, doing actual
build work) or is it an odd issue with make calling itself recursively
endlessly and thus creating a mini-ofrk bomb?

This should be easy to tell from a look at the process tree (ps fax or
whatever) at the time of such a "build", assuming you can run it.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com



More information about the asterisk-dev mailing list