Re: [SR-Users] kamailio 5.0.6 | segfault bad msg or missing FROM header

2018-09-26 Thread Laurent Schweizer
Hello,

Unfortunately I don't have the SIP signaling, they was no trace when it happens 
and I don't know the user that create this issue.

I will also check the memory just in case, but I think it's more a malformed  
message.

BR

Laurent

-Message d'origine-
De : sr-users  De la part de Mojtaba
Envoyé : mercredi, 26 septembre 2018 09:18
À : Kamailio (SER) - Users Mailing List 
Objet : Re: [SR-Users] kamailio 5.0.6 | segfault bad msg or missing FROM header

Hi,
As i see the dump.txt file, Please paste the SIP signalling to check more. As 
the log, the From header may be malformed syntax.
because when parsing the From header, the issue is occurred. This error is 
raised  when Form header isn't parse properly.
Also check the shared and private memory. May be in while parsing the sip 
message, "out of memory"  is occurred to.
Whit Regards.
Mojtaba Esfandiari.S
On Wed, Sep 26, 2018 at 9:58 AM Laurent Schweizer 
 wrote:
>
> Dear all,
>
>
>
> I have setup few weeks ago a kamailio 5.0.6, was working correctly till last 
> night where 2 time he stop with a segfault error :
>
>
>
>
>
> Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR:  
> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing 
> FROM header
>
> Sep 25 23:36:19 ch0012 kernel: kamailio[18696]: segfault at 0 ip 
> 004d7c4f sp 7fff16135130 error 4 in 
> kamailio[40+42b000]
>
> Sep 25 23:36:19 ch0012 kernel: kamailio[18682]: segfault at 0 ip 
> 004d7c4f sp 7fff16135130 error 4 in 
> kamailio[40+42b000]
>
> Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR: siptrace 
> [siptrace.c:535]: sip_trace_prepare(): cannot parse FROM header
>
> Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR:  
> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing 
> FROM header
>
> Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR: siptrace 
> [siptrace.c:535]: sip_trace_prepare(): cannot parse FROM header
>
> Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18696 (kamailio) of 
> user 0 killed by SIGSEGV - ignoring (repeated crash)
>
> Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18682 (kamailio) of 
> user 0 killed by SIGSEGV - dumping core
>
> Sep 25 23:36:20 ch0012 abrt-hook-ccpp: Saved core dump of pid 18696 to 
> core.18696 at / (2294079488 bytes)
>
> Sep 25 23:36:20 ch0012 kamailio[18759]: CRITICAL:  
> [core/pass_fd.c:277]: receive_fd(): EOF on 31
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:743]: 
> handle_sigs(): child process 18696 exited by a signal 11
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:746]: 
> handle_sigs(): core was generated
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: INFO:  [main.c:768]: 
> handle_sigs(): terminating due to SIGCHLD
>
> Sep 25 23:36:20 ch0012 kamailio[18759]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18754]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18758]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18757]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18753]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18752]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18756]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18751]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18746]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18747]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18750]: INFO:  [main.c:823]: 
> sig_usr(): signal 15 received
>
>
>
> I have exported from the core file some info (file is attached), any idea ?
>
>
>
> BR
>
>
>
> Laurent
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--
--Mojtaba Esfandiari.S

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 5.0.6 | segfault bad msg or missing FROM header

2018-09-26 Thread Mojtaba
Hi,
As i see the dump.txt file, Please paste the SIP signalling to check
more. As the log, the From header may be malformed syntax.
because when parsing the From header, the issue is occurred. This
error is raised  when Form header isn't parse properly.
Also check the shared and private memory. May be in while parsing the
sip message, "out of memory"  is occurred to.
Whit Regards.
Mojtaba Esfandiari.S
On Wed, Sep 26, 2018 at 9:58 AM Laurent Schweizer
 wrote:
>
> Dear all,
>
>
>
> I have setup few weeks ago a kamailio 5.0.6, was working correctly till last 
> night where 2 time he stop with a segfault error :
>
>
>
>
>
> Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR:  
> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM 
> header
>
> Sep 25 23:36:19 ch0012 kernel: kamailio[18696]: segfault at 0 ip 
> 004d7c4f sp 7fff16135130 error 4 in kamailio[40+42b000]
>
> Sep 25 23:36:19 ch0012 kernel: kamailio[18682]: segfault at 0 ip 
> 004d7c4f sp 7fff16135130 error 4 in kamailio[40+42b000]
>
> Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR: siptrace [siptrace.c:535]: 
> sip_trace_prepare(): cannot parse FROM header
>
> Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR:  
> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM 
> header
>
> Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR: siptrace [siptrace.c:535]: 
> sip_trace_prepare(): cannot parse FROM header
>
> Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18696 (kamailio) of user 0 
> killed by SIGSEGV - ignoring (repeated crash)
>
> Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18682 (kamailio) of user 0 
> killed by SIGSEGV - dumping core
>
> Sep 25 23:36:20 ch0012 abrt-hook-ccpp: Saved core dump of pid 18696 to 
> core.18696 at / (2294079488 bytes)
>
> Sep 25 23:36:20 ch0012 kamailio[18759]: CRITICAL:  
> [core/pass_fd.c:277]: receive_fd(): EOF on 31
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:743]: 
> handle_sigs(): child process 18696 exited by a signal 11
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:746]: 
> handle_sigs(): core was generated
>
> Sep 25 23:36:20 ch0012 kamailio[18679]: INFO:  [main.c:768]: 
> handle_sigs(): terminating due to SIGCHLD
>
> Sep 25 23:36:20 ch0012 kamailio[18759]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18754]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18758]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18757]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18753]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18752]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18756]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18751]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18746]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18747]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
> Sep 25 23:36:20 ch0012 kamailio[18750]: INFO:  [main.c:823]: sig_usr(): 
> signal 15 received
>
>
>
> I have exported from the core file some info (file is attached), any idea ?
>
>
>
> BR
>
>
>
> Laurent
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



-- 
--Mojtaba Esfandiari.S

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] kamailio 5.0.6 | segfault bad msg or missing FROM header

2018-09-25 Thread Laurent Schweizer
Dear all,

I have setup few weeks ago a kamailio 5.0.6, was working correctly till last 
night where 2 time he stop with a segfault error :


Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR:  
[core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM 
header
Sep 25 23:36:19 ch0012 kernel: kamailio[18696]: segfault at 0 ip 
004d7c4f sp 7fff16135130 error 4 in kamailio[40+42b000]
Sep 25 23:36:19 ch0012 kernel: kamailio[18682]: segfault at 0 ip 
004d7c4f sp 7fff16135130 error 4 in kamailio[40+42b000]
Sep 25 23:36:19 ch0012 kamailio[18696]: ERROR: siptrace [siptrace.c:535]: 
sip_trace_prepare(): cannot parse FROM header
Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR:  
[core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM 
header
Sep 25 23:36:19 ch0012 kamailio[18682]: ERROR: siptrace [siptrace.c:535]: 
sip_trace_prepare(): cannot parse FROM header
Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18696 (kamailio) of user 0 
killed by SIGSEGV - ignoring (repeated crash)
Sep 25 23:36:19 ch0012 abrt-hook-ccpp: Process 18682 (kamailio) of user 0 
killed by SIGSEGV - dumping core
Sep 25 23:36:20 ch0012 abrt-hook-ccpp: Saved core dump of pid 18696 to 
core.18696 at / (2294079488 bytes)
Sep 25 23:36:20 ch0012 kamailio[18759]: CRITICAL:  [core/pass_fd.c:277]: 
receive_fd(): EOF on 31
Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:743]: 
handle_sigs(): child process 18696 exited by a signal 11
Sep 25 23:36:20 ch0012 kamailio[18679]: ALERT:  [main.c:746]: 
handle_sigs(): core was generated
Sep 25 23:36:20 ch0012 kamailio[18679]: INFO:  [main.c:768]: 
handle_sigs(): terminating due to SIGCHLD
Sep 25 23:36:20 ch0012 kamailio[18759]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18754]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18758]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18757]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18753]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18752]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18756]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18751]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18746]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18747]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received
Sep 25 23:36:20 ch0012 kamailio[18750]: INFO:  [main.c:823]: sig_usr(): 
signal 15 received

I have exported from the core file some info (file is attached), any idea ?

BR

Laurent

(gdb) bt full
#0  0x004d7c4f in crcitt_string_array (dst=0x7fb458d06941 
 "66b7", src=0x7fff161351c0, size=2) at core/crc.c:237
i = 0
ccitt = 65535
c = 0x0
len = 10706350
str_len = 4
__FUNCTION__ = "crcitt_string_array"
#1  0x7fb458af54c1 in calc_crc_suffix (msg=0x7fb45cccf4d8, 
tag_suffix=0x7fb458d06941  "66b7") at ../../core/tags.h:55
ss_nr = 2
suffix_source = {{s = 0x0, len = 10706350}, {s = 0x0, len = 0}, {s = 
0x417ad0 <_start> "1\355I\211\321^H\211\342H\203\344\360PTI\307\300pTs", len = 
370376624}}
#2  0x7fb458af6114 in sl_reply_helper (msg=0x7fb45cccf4d8, code=400, 
reason=0x7fb457439828 "Missing Required Header in Request", tag=0x0) at 
sl_funcs.c:166
buf = {s = 0x0, len = 0}
dset = {s = 0x0, len = 0}
dst = {send_sock = 0x0, to = {s = {sa_family = 2, sa_data = 
"\023\304.\246\263\067\000\000\000\000\000\000\000"}, sin = {sin_family = 2, 
sin_port = 50195, sin_addr = {s_addr = 934520366}, sin_zero = 
"\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 50195, 
sin6_flowinfo = 934520366,
  sin6_addr = {__in6_u = {__u6_addr8 = '\000' , 
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, 
sin6_scope_id = 0}}, id = 0, proto = 0 '\000', send_flags = {f = 0, blst_imask 
= 0}}
dummy_bm = {to_tag_val = {s = 0x417ad0 <_start> 
"1\355I\211\321^H\211\342H\203\344\360PTI\307\300pTs", len = 370376624}}
backup_mhomed = 32692
ret = 1556935896
text = {s = 0x7fb457439828 "Missing Required Header in Request", len = 
34}
backup_rt = 0
ctx = {rec_lev = 0, run_flags = 0, last_retcode = 1243967538, jmp_env = 
{{__jmpbuf = {140733563755152, 6738787, 7886016, 132727312, 7886016, 
1537599782384, 7889841, 7886021}, __mask_was_saved = 56, __saved_mask = {__val 
= {140412626337808, 140733563755024, 30064771073, 0, 140412627784928, 7886016,
  680160329744, 7889680, 7886021, 56, 14041262400, 
21474836480, 10706311, 0, 140411070840832, 140412627067872}
pmsg = {id = 4294967295, pid = 0, tval = {tv_sec = 0, tv_usec = 8180}, 
fwd_send_flags = {f = 28722, blst_imask = 18981},