Summary: | ASTERISK-13973: Segmentation fault after almost exactly ~ 500 finished SIP over TCP calls. | ||
Reporter: | Kristijan Vrban (vrban) | Labels: | |
Date Opened: | 2009-04-16 20:35:26 | Date Closed: | 2010-07-21 11:20:23 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/TCP-TLS |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) in_valgrind.txt | |
Description: | I reproducibility get a Segmentation fault after almost exactly ~ 500 SIP over TCP calls. To ensure this is TCP related i have done the same test with SIP over UDP -> no crash. The gdb output: astmm.c line 132 (__ast_alloc_region): '®lock' really deep reentrancy! Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb29ffb90 (LWP 13758)] 0x080852be in __ast_pthread_mutex_unlock (filename=0x81b846c "astmm.c", lineno=135, func=0x81b8759 "__ast_alloc_region", mutex_name=0x81b84d1 "®lock", t=0x8215560) at /home/systemvi/src/asterisk-trunk/include/asterisk/lock.h:685 685 if (lt->reentrancy && (lt->thread[lt->reentrancy-1] != pthread_self())) { | ||
Comments: | By: Kristijan Vrban (vrban) 2009-04-16 21:46:14 Attached also the output of valgrind for this segmentation fault By: Kristijan Vrban (vrban) 2009-04-18 16:28:37 just tested the same with 1.6.0 -> with 1.6.0 no crash. even after 10000 calls with this stress tool setting: sipp uac -i 192.168.116.101 -t t1 192.168.116.104 -s 78 -trace_err -d 1s By: Kristijan Vrban (vrban) 2009-04-19 19:27:20 ok, i can say now, that this segmentation fault only happen if res_timing_pthread.so is loaded. dont know if that also happen with res_timing_dahdi.so, because i dont have dahdi currently installed on my test machine. But without res_timing_pthread.so -> no crash even after 10000 calls. That's why there was no crash with 1.6.0 because in 1.6.0 res_timing_pthread.so does not exists. UPDATE: res_timing_dahdi.so -> no problem, only with res_timing_pthread.so By: Joshua C. Colp (jcolp) 2009-04-20 12:11:13 Please update to the latest SVN and try again. I just put in a change to fix a memory leak of SIP dialogs on TCP and TLS calls. You may have been exceeding the available memory. By: Kristijan Vrban (vrban) 2009-04-20 12:36:08 yes it's fixed. thanks! By: Joshua C. Colp (jcolp) 2009-04-20 12:42:31 Closed per reporter, fixed by a commit from another issue. By: Digium Subversion (svnbot) 2010-07-21 11:15:05 Repository: asterisk Revision: 278465 U trunk/res/res_timing_pthread.c ------------------------------------------------------------------------ r278465 | russell | 2010-07-21 11:14:59 -0500 (Wed, 21 Jul 2010) | 41 lines Use poll() instead of select() in res_timing_pthread to avoid stack corruption. This code did not properly check FD_SETSIZE to ensure that it did not try to select() on fds that were too large. Switching to poll() removes the limitation on the maximum fd value. (closes issue ASTERISK-14848) Reported by: keiron (closes issue ASTERISK-15960) Reported by: Eddie Edwards (closes issue ASTERISK-15349) Reported by: Hubguru (closes issue ASTERISK-14670) Reported by: flop (closes issue ASTERISK-12249) Reported by: falves11 (closes issue ASTERISK-13973) Reported by: vrban (closes issue ASTERISK-15971) Reported by: aleksey2000 (closes issue ASTERISK-14385) Reported by: kowalma (closes issue ASTERISK-16185) Reported by: dcabot (closes issue ASTERISK-16085) Reported by: glwgoes (closes issue ASTERISK-15895) Reported by: erikje possibly other issues, too ... ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=278465 By: Digium Subversion (svnbot) 2010-07-21 11:20:23 Repository: asterisk Revision: 278479 _U branches/1.6.2/ U branches/1.6.2/res/res_timing_pthread.c ------------------------------------------------------------------------ r278479 | russell | 2010-07-21 11:20:17 -0500 (Wed, 21 Jul 2010) | 48 lines Merged revisions 278465 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r278465 | russell | 2010-07-21 11:15:00 -0500 (Wed, 21 Jul 2010) | 41 lines Use poll() instead of select() in res_timing_pthread to avoid stack corruption. This code did not properly check FD_SETSIZE to ensure that it did not try to select() on fds that were too large. Switching to poll() removes the limitation on the maximum fd value. (closes issue ASTERISK-14848) Reported by: keiron (closes issue ASTERISK-15960) Reported by: Eddie Edwards (closes issue ASTERISK-15349) Reported by: Hubguru (closes issue ASTERISK-14670) Reported by: flop (closes issue ASTERISK-12249) Reported by: falves11 (closes issue ASTERISK-13973) Reported by: vrban (closes issue ASTERISK-15971) Reported by: aleksey2000 (closes issue ASTERISK-14385) Reported by: kowalma (closes issue ASTERISK-16185) Reported by: dcabot (closes issue ASTERISK-16085) Reported by: glwgoes (closes issue ASTERISK-15895) Reported by: erikje possibly other issues, too ... ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=278479 |