kamailio / kamailio

Kamailio - The Open Source SIP Server for large VoIP and real-time communication platforms -
https://www.kamailio.org
Other
2.29k stars 955 forks source link

Makefile System hangs the computer #479

Closed tanton81 closed 8 years ago

tanton81 commented 8 years ago

Hello everyone,

I will try to describe a problem that I encountered recently while I was recompiling Kamailio 4.3.1. Probably the problem has been already mentioned by someone at the bug tracker but I couldn't find such a topic. So, I had an installed and already configured and working Kamailio. I decided simply to add a new module to it, for that I made the following instructions:

'make proper' -> result OK 'make include_modules="the list of needed modules" cfg' -> slows the whole OS (Linux SLED 12), I had a constant disk activity during the time I was waiting to see how the things will finish.

After that I tried the same on a different machine, which is the same (virtual machine) , unfortunately the result was the same.

After several retries I found that it is impossible to do:

make proper make include_modules="...." cfg

I found that I had to type a 'make cfg' after the 'make proper':

make proper make cfg make include_modules="..." cfg make all

I hadn't the time to find out why there is a such problem but I suppose that when you do a 'make proper' your configuration file is deleted. Than 'make cfg' creates this config file again and finally 'make include_modules' looks for this configuration file and fills it with the complementary modules. Without this configuration file the 'make include_modules="..." cfg probably enters to an infinite loop which as result makes your OS not respond.

Can anyone confirm the problem ?

Best regards,

Anton

miconda commented 8 years ago

I tried:

make proper
make include_modules="db_mysql tls" cfg
make all

and everything works smooth. Maybe you can spot what happens if you run 'make' command with -d parameter.

tanton81 commented 8 years ago

Hmm, that's strange. Ok, here is my command and the result of it:

make proper

rm -f uac.d uac.d uac.d _~ rm -f nosip.d nosip.d nosip.d ~ rm -f xprint.d xprint.d xprint.d ~ rm -f usrloc.d usrloc.d usrloc.d ~ rm -f sqlops.d sqlops.d sqlops.d ~ rm -f mqueue.d mqueue.d mqueue.d ~ rm -f rtpproxy.d rtpproxy.d rtpproxy.d ~ rm -f sst.d sst.d sst.d ~ rm -f rr.d rr.d rr.d ~ rm -f print_lib.d print_lib.d print_lib.d ~ rm -f mohqueue.d mohqueue.d mohqueue.d ~ rm -f matrix.d matrix.d matrix.d ~ rm -f avpops.d avpops.d avpops.d ~ rm -f userblacklist.d userblacklist.d userblacklist.d ~ rm -f p_usrloc.d p_usrloc.d p_usrloc.d ~ rm -f enum.d enum.d enum.d ~ rm -f drouting.d drouting.d drouting.d ~ rm -f uid_uri_db.d uid_uri_db.d uid_uri_db.d ~ rm -f auth.d auth.d auth.d ~ rm -f stun.d stun.d stun.d ~ rm -f mi_datagram.d mi_datagram.d mi_datagram.d ~ rm -f msrp.d msrp.d msrp.d ~ rm -f print.d print.d print.d ~ rm -f ratelimit.d ratelimit.d ratelimit.d ~ rm -f tsilo.d tsilo.d tsilo.d ~ rm -f acc.d acc.d acc.d ~ rm -f auth_xkeys.d auth_xkeys.d auth_xkeys.d ~ rm -f nat_traversal.d nat_traversal.d nat_traversal.d ~ rm -f blst.d blst.d blst.d ~ rm -f db_text.d db_text.d db_text.d ~ rm -f pdb.d pdb.d pdb.d ~ rm -f sanity.d sanity.d sanity.d ~ rm -f domainpolicy.d domainpolicy.d domainpolicy.d ~ rm -f qos.d qos.d qos.d ~ rm -f siptrace.d siptrace.d siptrace.d ~ rm -f xlog.d xlog.d xlog.d ~ rm -f uid_avp_db.d uid_avp_db.d uid_avp_db.d ~ rm -f mtree.d mtree.d mtree.d ~ rm -f registrar.d registrar.d registrar.d ~ rm -f speeddial.d speeddial.d speeddial.d ~ rm -f auth_db.d auth_db.d auth_db.d ~ rm -f mediaproxy.d mediaproxy.d mediaproxy.d ~ rm -f rtjson.d rtjson.d rtjson.d ~ rm -f async.d async.d async.d ~ rm -f sms.d sms.d sms.d ~ rm -f kex.d kex.d kex.d ~ rm -f topoh.d topoh.d topoh.d ~ rm -f jsonrpc-s.d jsonrpc-s.d jsonrpc-s.d ~ rm -f uid_gflags.d uid_gflags.d uid_gflags.d ~ rm -f prefix_route.d prefix_route.d prefix_route.d ~ rm -f corex.d corex.d corex.d ~ rm -f maxfwd.d maxfwd.d maxfwd.d ~ rm -f ipops.d ipops.d ipops.d ~ rm -f uid_domain.d uid_domain.d uid_domain.d ~ rm -f rtimer.d rtimer.d rtimer.d ~ rm -f pike.d pike.d pike.d ~ rm -f cfgutils.d cfgutils.d cfgutils.d ~ rm -f dispatcher.d dispatcher.d dispatcher.d ~ rm -f sca.d sca.d sca.d ~ rm -f alias_db.d alias_db.d alias_db.d ~ rm -f rtpengine.d rtpengine.d rtpengine.d ~ rm -f uri_db.d uri_db.d uri_db.d ~ rm -f call_control.d call_control.d call_control.d ~ rm -f pdt.d pdt.d pdt.d ~ rm -f uac_redirect.d uac_redirect.d uac_redirect.d ~ rm -f dmq_usrloc.d dmq_usrloc.d dmq_usrloc.d ~ rm -f auth_diameter.d auth_diameter.d auth_diameter.d ~ rm -f timer.d timer.d timer.d ~ rm -f seas.d seas.d seas.d ~ rm -f xhttp.d xhttp.d xhttp.d ~ rm -f cfg_db.d cfg_db.d cfg_db.d ~ rm -f imc.d imc.d imc.d ~ rm -f uid_auth_db.d uid_auth_db.d uid_auth_db.d ~ rm -f domain.d domain.d domain.d ~ rm -f diversion.d diversion.d diversion.d ~ rm -f cfg_rpc.d cfg_rpc.d cfg_rpc.d ~ rm -f malloc_test.d malloc_test.d malloc_test.d ~ rm -f db_flatstore.d db_flatstore.d db_flatstore.d ~ rm -f siputils.d siputils.d siputils.d ~ rm -f tmrec.d tmrec.d tmrec.d ~ rm -f exec.d exec.d exec.d ~ rm -f db2_ops.d db2_ops.d db2_ops.d ~ rm -f benchmark.d benchmark.d benchmark.d ~ rm -f tmx.d tmx.d tmx.d ~ rm -f dmq.d dmq.d dmq.d ~ rm -f pv.d pv.d pv.d ~ rm -f debugger.d debugger.d debugger.d ~ rm -f avp.d avp.d avp.d ~ rm -f statistics.d statistics.d statistics.d ~ rm -f msilo.d msilo.d msilo.d ~ rm -f mi_fifo.d mi_fifo.d mi_fifo.d ~ rm -f counters.d counters.d counters.d ~ rm -f pipelimit.d pipelimit.d pipelimit.d ~ rm -f sl.d sl.d sl.d ~ rm -f htable.d htable.d htable.d ~ rm -f textopsx.d textopsx.d textopsx.d ~ rm -f db_cluster.d db_cluster.d db_cluster.d ~ rm -f tcpops.d tcpops.d tcpops.d ~ rm -f sipt.d sipt.d sipt.d ~ rm -f textops.d textops.d textops.d ~ rm -f group.d group.d group.d ~ rm -f mangler.d mangler.d mangler.d ~ rm -f nathelper.d nathelper.d nathelper.d ~ rm -f statsd.d statsd.d statsd.d ~ rm -f tm.d tm.d tm.d ~ rm -f path.d path.d path.d ~ rm -f permissions.d permissions.d permissions.d ~ rm -f ctl.d ctl.d ctl.d ~ rm -f xhttp_rpc.d xhttp_rpc.d xhttp_rpc.d ~ rm -f dialog.d dialog.d dialog.d ~ rm -f mi_rpc.d mi_rpc.d mi_rpc.d ~ rm -f sipcapture.d sipcapture.d sipcapture.d ~ rm -f sdpops.d sdpops.d sdpops.d ~ make[1]: _\ No rule to make target 'proper'. Stop. make --no-print-directory -C lib proper Making proper in srdb1 Making proper in kmi Making proper in xcap Making proper in ims Making proper in trie Making proper in cds Making proper in presence Making proper in kcore Making proper in srdb2 Making proper in srutils Making proper in print Making proper in binrpc Making proper in shm_regex rm -f config.mak

make -d include_modules=”evapi sctp jansson rtjson” cfg

GNU Make 4.0 Built for x86_64-unknown-linux-gnu Copyright (C) 1988-2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Reading makefiles... Reading makefile 'Makefile'... Reading makefile 'Makefile.sources' (search path) (no ~ expansion)... Reading makefile 'Makefile.targets' (search path) (no ~ expansion)... Reading makefile 'Makefile.dirs' (search path) (no ~ expansion)... Reading makefile 'Makefile.dirs' (search path) (no ~ expansion)... Reading makefile 'modules.lst' (search path) (no ~ expansion)... Reading makefile 'Makefile.groups' (search path) (no ~ expansion)... Reading makefile 'config.mak' (search path) (don't care) (no ~ expansion)... Reading makefile 'Makefile.defs' (search path) (no ~ expansion)... Reading makefile 'Makefile.vars' (search path) (don't care) (no ~ expansion)... target architecture , host architecture

And here it stops... Without the option '-d' I see only this line "target architecture , host architecture ".

Best regards,

Anton

2016-01-18 10:41 GMT+01:00 Daniel-Constantin Mierla < notifications@github.com>:

I tried:

make proper make include_modules="db_mysql tls" cfg make all

and everything works smooth. Maybe you can spot what happens if you run 'make' command with -d parameter.

— Reply to this email directly or view it on GitHub https://github.com/kamailio/kamailio/issues/479#issuecomment-172478432.

miconda commented 8 years ago

When it hangs, is cpu usage go high?

Can you do a 'ps auxw' and see if you can spot a make or shell command that looks like looping?

I just noticed via someone using SuSE enterprise server that the CPU variable is preset in the environment, can you try:

make CPU= include_modules="..." cfg

After CPU= is an empty space, to reset its value.

tanton81 commented 8 years ago

Hi,

here is what I get:

                CPU

sprod 8129 97.8 25.4 1647684 1002300 pts/9 R+ 17:43 0:04 make CPU= -d include_modules=”evapi sctp jansson rtjson” cfg

sprod 8173 0.0 0.0 26664 1552 pts/15 R+ 17:43 0:00 ps auxw

root 13266 0.0 0.0 87668 1928 ? Ss 08:13 0:00 sshd: essprod [priv]

I think 97.8% of the CPU was taken by the make command... Once again the order of my commands:

  1. I have a compiled Kamailio 4.3.1
  2. make proper
  3. make include_modules="...." cfg

BR,

Anton

2016-01-20 14:57 GMT+01:00 Daniel-Constantin Mierla < notifications@github.com>:

When it hangs, is cpu usage go high?

Can you do a 'ps auxw' and see if you can spot a make or shell command that looks like looping?

I just noticed via someone using SuSE enterprise server that the CPU variable is preset in the environment, can you try:

make CPU= include_modules="..." cfg

After CPU= is an empty space, to reset its value.

— Reply to this email directly or view it on GitHub https://github.com/kamailio/kamailio/issues/479#issuecomment-173211648.

miconda commented 8 years ago

But was the step 3. with 'CPU= '?

Can you attach with gdb to the make using lot of cpu and do bt to see what is doing?

miconda commented 8 years ago

Any update on this?

tanton81 commented 8 years ago

Hi,

Not for now. Thanks for reminding me :) I didn't have the time to try using a debugger. If I have some free time the coming week, I'll give some more information.

Best regards, Anton On Feb 11, 2016 22:26, "Daniel-Constantin Mierla" notifications@github.com wrote:

Any update on this?

— Reply to this email directly or view it on GitHub https://github.com/kamailio/kamailio/issues/479#issuecomment-183065388.

tanton81 commented 8 years ago

Hello,

I am unable to reproduce anymore the problem. I do not know changed since the day I encountered it. May be we should close the discussion.

Best regards,

Anton

2016-02-11 22:57 GMT+01:00 Anton Tonev anton.tonev@gmail.com:

Hi,

Not for now. Thanks for reminding me :) I didn't have the time to try using a debugger. If I have some free time the coming week, I'll give some more information.

Best regards, Anton On Feb 11, 2016 22:26, "Daniel-Constantin Mierla" < notifications@github.com> wrote:

Any update on this?

— Reply to this email directly or view it on GitHub https://github.com/kamailio/kamailio/issues/479#issuecomment-183065388.