Hello,

I did a fix for the case of joining private rooms without permissions, can you try it again (pull the git branch 3.1)?

Thanks,
Daniel


On 6/3/11 9:59 AM, Ozren Lapcevic wrote:
Hi,

I previously got only one core file, but now that I've enabled one core file per process, I got two core files. Here are the backtraces:

#0  0x00007fc9c5787ed5 in raise () from /lib/libc.so.6
#1  0x00007fc9c57893f3 in abort () from /lib/libc.so.6
#2  0x000000000046119e in sig_alarm_abort (signo=<value optimized out>) at main.c:651
#3  <signal handler called>
#4  0x00007fc9c5822307 in syscall () from /lib/libc.so.6
#5  0x00007fc9c0da50c6 in imc_del_room (name=0x7fc9bea13438, domain=0x7fc9bea13448) at ../../mem/../futexlock.h:123
#6  0x00007fc9c0da51d8 in imc_htable_destroy () at imc_mng.c:104
#7  0x00007fc9c0d9947a in destroy () at imc.c:736
#8  0x00000000004d9964 in destroy_modules () at sr_module.c:732
#9  0x0000000000462930 in cleanup (show_status=1) at main.c:527
#10 0x0000000000463564 in shutdown_children (sig=<value optimized out>, show_status=1) at main.c:668
#11 0x0000000000463e9c in handle_sigs () at main.c:759
#12 0x0000000000465572 in main_loop () at main.c:1676
#13 0x0000000000467f53 in main (argc=<value optimized out>, argv=0x0) at main.c:2398

and:

#0  imc_handle_join (msg=<value optimized out>, cmd=<value optimized out>, src=<value optimized out>, dst=<value optimized out>) at imc_cmd.c:329
#1  0x00007fc9c0d985b0 in imc_manager (msg=0x91ce20, str1=<value optimized out>, str2=<value optimized out>) at imc.c:544
#2  0x000000000041591f in do_action (h=0x7fffffffad30, a=0x925c28, msg=0x91ce20) at action.c:1095
#3  0x000000000041cc5e in run_actions (h=0x7fffffffad30, a=0x925c28, msg=0x91ce20) at action.c:1555
#4  0x000000000041cf97 in run_actions_safe (h=0x7fffffffbdb0, a=0x7fc9c5873798, msg=0x0) at action.c:1607
#5  0x00000000004b1574 in rval_get_int (h=0x7fffffffbdb0, msg=<value optimized out>, i=0x7fffffffb408, rv=0xd1d990, cache=0xd1d910) at rvalue.c:904
#6  0x00000000004b4fdc in rval_expr_eval_int (h=0x7fffffffbdb0, msg=0x91ce20, res=0x7fffffffb408, rve=0x9262c0) at rvalue.c:1866
#7  0x0000000000416e02 in do_action (h=0x7fffffffbdb0, a=0x927000, msg=0x91ce20) at action.c:1071
#8  0x000000000041cc5e in run_actions (h=0x7fffffffbdb0, a=0x9258a0, msg=0x91ce20) at action.c:1555
#9  0x0000000000416e60 in do_action (h=0x7fffffffbdb0, a=0x927ab8, msg=0x91ce20) at action.c:1090
#10 0x000000000041cc5e in run_actions (h=0x7fffffffbdb0, a=0x921c38, msg=0x91ce20) at action.c:1555
#11 0x00000000004177e5 in do_action (h=0x7fffffffbdb0, a=0x90cc40, msg=0x91ce20) at action.c:711
#12 0x000000000041cc5e in run_actions (h=0x7fffffffbdb0, a=0x9079e0, msg=0x91ce20) at action.c:1555
#13 0x000000000041cf23 in run_top_route (a=0x9079e0, msg=0x91ce20, c=<value optimized out>) at action.c:1628
#14 0x00000000004958c6 in receive_msg (
    buf=0x8a3a00 "MESSAGE sip:chat-999@abc.hr SIP/2.0\r\nCall-ID: 9d5779ef64ae7394e7b922cc4e98e424@0.0.0.0\r\nCSeq: 11051797 MESSAGE\r\nFrom: \"oz\" <sip:oz@abc.hr>;tag=6d7f9acd\r\nTo: <sip:chat-999@abc.hr>\r\nVia: SIP/2.0/UDP 161"..., len=<value optimized out>, rcv_info=0x7fffffffc030) at receive.c:205
#15 0x000000000051c861 in udp_rcv_loop () at udp_server.c:532
#16 0x0000000000464b15 in main_loop () at main.c:1554
#17 0x0000000000467f53 in main (argc=<value optimized out>, argv=0x0) at main.c:2398


Best regards,
Ozren


On Fri, Jun 3, 2011 at 9:19 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

did you get only one core file? This one seems from the main process when it discovered that a SIP worked crashed.

If you got more than one, send the backtraces from the other core files. If you got only one, please enable one core file per process and re-do it again.

See last part of:
http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:corefiles

Cheers,
Daniel



On 6/2/11 3:57 PM, Ozren Lapcevic wrote:
Hi Daniel,

here is the backtrace:

#0  0x00007ffc46b81ed5 in raise () from /lib/libc.so.6
#1  0x00007ffc46b833f3 in abort () from /lib/libc.so.6
#2  0x000000000046119e in sig_alarm_abort (signo=<value optimized out>) at main.c:651
#3  <signal handler called>
#4  0x00007ffc46c1c307 in syscall () from /lib/libc.so.6
#5  0x00007ffc4219f115 in imc_del_room (name=0x7ffc3fe0d388, domain=0x7ffc3fe0d398) at ../../mem/../futexlock.h:110
#6  0x00007ffc4219f1d8 in imc_htable_destroy () at imc_mng.c:104
#7  0x00007ffc4219347a in destroy () at imc.c:736
#8  0x00000000004d9964 in destroy_modules () at sr_module.c:732
#9  0x0000000000462930 in cleanup (show_status=1) at main.c:527
#10 0x0000000000463564 in shutdown_children (sig=<value optimized out>, show_status=1) at main.c:668
#11 0x0000000000463e9c in handle_sigs () at main.c:759
#12 0x0000000000465572 in main_loop () at main.c:1676
#13 0x0000000000467f53 in main (argc=<value optimized out>, argv=0x0) at main.c:2398

I'm not sure if I got the right thing. I got it with gdb /usr/local/kamailio-ozren/sbin/kamailio --core core and called bt in gdb.

I've repeated scenario described in the first mail: user tries to join in a private room without getting an invite first.

Best regards,
Ozren


On Wed, Jun 1, 2011 at 4:29 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

can you get the core dump and send the backtrace?

Be sure you have 'ulimit -c unlimited', working directory (-w option) set to writable path and you don't run it in chowner (no -u or -g parameters).

Cheers,
Daniel

On 6/1/11 4:25 PM, Ozren Lapcevic wrote:
Hi,

there is a bug in IMC module that crashes Kamailio.

Here is the scenario: One user (pero@abc.hr) creates private chat room (chat-999@abc.hr). Other user (oz@abc.hr) tries to join the chat-999@abc.hr by sending #join. Kamailio crashes at that point. Here is the log:

Best regards,
Ozren


Jun  1 15:10:37 ser-test kernel: [5844312.456709] kamailio[20118]: segfault at 10 ip 7f28f89dae8e sp 7fffffffb750 error 4 in imc.so[7f28f89cf000+17000]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: INFO: <script>: going to imc: F [sip:oz@abc.hr] T [sip:chat-999@abc.hr] B [#join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [receive.c:186]: preparing to run routing scripts...
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc.c:525]: found command
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: maxfwd [mf_funcs.c:85]: value = 70
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:146]: command: [join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:201]: DEBUG: get_hdr_body : content_length=223
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:292]: found room [chat-999]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:103]: found end of header
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: ERROR: imc [imc_cmd.c:317]: attept to join private room [chat-999] from user [oz]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:174]: DEBUG: add_param: tag=5e3288a6
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:741]: child process 20118 exited by a signal 11
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:803]: end of header reached, state=29
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:630]: SIP Request:
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:744]: core was not generated
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [msg_translator.c:204]: check_via_address(161.53.255.82, 161.53.255.82, 0)
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:632]:  method:  <MESSAGE>
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: INFO: <core> [main.c:756]: INFO: terminating due to SIGCHLD
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20114]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20115]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20116]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20117]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20122]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20124]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20125]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20129]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20128]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20127]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20123]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20126]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20120]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20130]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20131]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 3 chat-777
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 11 chat-888
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 13 chat-999





_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda


-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com