Re: [OpenSIPStack] OpenSBC segfault on FreeBSD 6.1
Brought to you by:
joegenbaclor
From: tele <te...@pl...> - 2006-10-31 09:49:07
|
Hi Joegen, This doesn't fix problem it segfault in the same point. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x84e9c00 (LWP 100085)] 0x082b430e in PSocket::GetPort (this=0x0) at ../common/sockets.cxx:1619 1619 return port; (gdb) b2bua-log 2006/10/31 09:38:22.152 0x8425ea0 OSS DTL.......................| Starting UDP Transport on 82.215.130.50:5061 2006/10/31 09:38:22.154 0x8425ea0 OSS DTL.......................| *** TRANSPORT STARTED *** Listener: 82.215.130.50:5061 2006/10/31 09:38:32.202 0x84f5880 OSS DBG.......................| RCV: XOR=0 974 Bytes from RCVADDR: 82.215.130.50:RCVPORT: 5060:UDP (INVITE sip:222@ 82.215.130.50:5061;user=phone SIP/2.0) 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| RECEIVE: REQ: INVITE (40362) 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| FROM: sip:11...@sb...;user=phone 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| TO: sip:22...@sb...;user=phone 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| XOR: FALSE 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| SRC: 82.215.130.50 PORT: 5060 2006/10/31 09:38:32.204 0x84f5880 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.204 0x84f5880 OSS DBG......................................| Finding transaction for INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| Setting Transaction ID to 4308362cf7db0e0c@82.215.128.141|z9hG4bK10f f.d19711426464e0b03dac37c69454f869.0|INVITE 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| *** CREATING TRANSACTION (IST) *** 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| Message: INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| Call-Id: 4308362cf7db0e0c@82.215.128.141 2006/10/31 09:38:32.205 0x84f5880 OSS DBG......................................| 2006/10/31 09:38:32.205 0x84f5880 OSS DTL......................................| IST(1162287512206) *** CREATED *** - IST|4308362cf7db0e0c@82.2 15.128.141|z9hG4bK10ff.d19711426464e0b03dac37c69454f869.0|INVITE 2006/10/31 09:38:32.206 0x8463100 OSS DTL: [4308362cf7db0e0c@82.215.128.141]...| IST(1162287512206) Event(SIPMessage) - INVITE sip:222@82.215.1 30.50:5061;user=phone SIP/2.0 2006/10/31 09:38:32.206 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| TRANSACTION: (IST) INVITE sip:222@82.215.130.50:5061;user=phone SIP/ 2.0 State: 0 2006/10/31 09:38:32.206 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.206 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| *** IST STATE IDLE *** 2006/10/31 09:38:32.206 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 2006/10/31 09:38:32.206 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| TRANSMIT: RESPONSE: SIP/2.0 100 Trying 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| TO: sip:22...@sb...;user=phone 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| REQ: INVITE (40362) 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| XOR: FALSE 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| DST: 82.215.130.50 PORT: 5060 2006/10/31 09:38:32.208 0x8463100 OSS DBG: [4308362cf7db0e0c@82.215.128.141]...| 2006/10/31 09:38:32.210 0x8463100 OSS DTL: [4308362cf7db0e0c@82.215.128.141]...| IST(1162287512206) StateIdle->StateProceeding 2006/10/31 09:38:32.211 0x84f5980 OSS DBG......................................| SEND: XOR=0 399 Bytes to 82.215.130.50:5060:UDP (SIP/2.0 100 Trying) thank you :tele On Tue, 2006-10-31 at 10:27 +0800, Joegen E. Baclor wrote: > Hi Tele, > > Try replacing GetListenerAddress() method in SIPUDPSocketList with the > code below. Let me know if that fixes the problem. > > BOOL SIPUDPSocketList::GetListenerAddress( > const PIPSocket::Address & sendAddress, > PIPSocket::Address & ifaceAddress, > WORD & listenerPort > ) > { > if( m_SocketList.GetSize() == 0 ) > return FALSE; > > if( !sendAddress.IsLoopback() ) > { > > ifaceAddress = > SIPTransportManager::GetDefaultInterfaceAddress( sendAddress ); > > if( !ifaceAddress.IsValid() || ifaceAddress.IsLoopback() ) > return FALSE; > > }else > { > ifaceAddress = PIPSocket::Address( "127.0.0.1" );; > } > > PCaselessString key = ifaceAddress.AsString(); > PUDPSocket * sock = m_SocketList.GetAt( key ); > > if( sock == NULL ) > { > ifaceAddress = > SIPTransportManager::GetDefaultInterfaceAddress(); > > if( sock == NULL ) > return FALSE; > > sock = m_SocketList.GetAt( key ); > > if( sock == NULL ) > sock = &m_SocketList[0]; > > if( !ifaceAddress.IsValid() && !sock->GetHostAddress( ifaceAddress ) ) > return FALSE; > > } > > listenerPort = sock->GetPort(); > > return TRUE; > } > > > tele wrote: > > OpenSIPStack use his pwlib tree > > > > set -e; gmake -C src/pwlib opt; gmake -C src opt; > > gmake[1]: Entering directory `/usr/local/src/opensipstack/src/pwlib' > > set -e; gmake -C src/ptlib/unix opt; gmake -C plugins opt; > > gmake[2]: Entering directory > > `/usr/local/src/opensipstack/src/pwlib/src/ptlib/unix' > > > > now i've uninstall the separately pwlib library and recompiling the > > OpenSIPstack. > > > > anyway the problem with segfault is on: > > > > line 1619 of > > /usr/local/src/opensipstack/src/pwlib/src/ptlib/common/sockets.cxx > > > > attached you can find the b2bua-log. > > > > > > On Mon, 2006-10-30 at 23:53 +0800, Joegen E. Baclor wrote: > > > >> Hi Tele, > >> > >> Thanks for the bug report. First, let's eliminate the possibility that > >> this is a version conflict between different pwlib installation in your > >> box. You said you compiled pwlib separately? If so please delete all > >> other instances of pwlib in your file system and let opensipstack use > >> the pwlib that goes with the source tree. Do a rerun and see if it > >> still seg faults. If it does, I am going to need level 5 logs of > >> b2bua-yy-mm-dd.log. You can set the log level using the http admin > >> listening at port 9999. Look for the OpenSBC General Parameters > >> link. If you can find out where the exact line number and which file > >> causes the seg fault, so much the better. Hope to hear more from you. > >> > >> Joegen > >> > >> tele wrote: > >> > >>> Hello, > >>> > >>> I trying to use OpenSBC in a FreeBSD system. > >>> > >>> I've compiled opensipstack and opensbc successful. > >>> I run opensbc and when the first INVITE come it's segfault. > >>> > >>> i've compiled opensbc with gmake debugnoshared and this is the gdb > >>> backtrace: > >>> > >>> # gcc -v > >>> Using built-in specs. > >>> Configured with: FreeBSD/i386 system compiler > >>> Thread model: posix > >>> gcc version 3.4.4 [FreeBSD] 20050518 > >>> > >>> > >>> > >>> (gdb) r -x > >>> Starting program: /usr/local/bin/opensbc -x > >>> warning: Unable to get location for thread creation breakpoint: generic > >>> error > >>> [New LWP 100143] > >>> [New Thread 0x8438000 (LWP 100143)] > >>> > >>> Message from syslogd@sbc01 at Mon Oct 30 13:25:54 2006 ... > >>> sbc01 OpenSIPStack Application[82385]: Starting service process > >>> "OpenSIPStack Application" v1.1.3 > >>> > >>> > >>> [New Thread 0x84e8a00 (LWP 100142)] > >>> > >>> Program received signal SIGSEGV, Segmentation fault. > >>> [Switching to Thread 0x84e8a00 (LWP 100142)] > >>> 0x082b429a in PSocket::GetPort (this=0x0) at ../common/sockets.cxx:1619 > >>> 1619 return port; > >>> (gdb) > >>> > >>> > >>> The segfault is caused by the pwlib > >>> /usr/local/src/opensipstack/src/pwlib/src/ptlib/common/sockets.cxx > >>> > >>> but i've compiled separately pwlib and export the enviroment vars, how > >>> say the ReadMe.txt of opensipstack. > >>> > >>> regards, > >>> > >>> > >>> :tele > >>> > >>> > >>> > >>> ------------------------------------------------------------------------- > >>> Using Tomcat but need to do more? Need to support web services, security? > >>> Get stuff done quickly with pre-integrated technology to make your job easier > >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >>> _______________________________________________ > >>> opensipstack-devel mailing list > >>> ope...@li... > >>> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >>> > >>> > >>> > >> ------------------------------------------------------------------------- > >> Using Tomcat but need to do more? Need to support web services, security? > >> Get stuff done quickly with pre-integrated technology to make your job easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> _______________________________________________ > >> opensipstack-devel mailing list > >> ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >> > >> ------------------------------------------------------------------------ > >> > >> 2006/10/30 16:58:27.728 0x8425e00 OSS DTL.......................| Starting UDP Transport on 82.215.130.50:5061 > >> 2006/10/30 16:58:27.730 0x8425e00 OSS DTL.......................| *** TRANSPORT STARTED *** Listener: 82.215.130.50:5061 > >> 2006/10/30 16:58:41.714 0x84f5880 OSS DBG.......................| RCV: XOR=0 974 Bytes from RCVADDR: 82.215.130.50:RCVPORT: 5060:UDP (INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0) > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| RECEIVE: REQ: INVITE (49005) > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| FROM: sip:11...@sb...;user=phone > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| TO: sip:22...@sb...;user=phone > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| XOR: FALSE > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| SRC: 82.215.130.50 PORT: 5060 > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| Finding transaction for INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| Setting Transaction ID to 983d90ae1e37ba66@82.215.128.141|z9hG4bKbc98.7abb12a56fef89f4586a70cc43ea1ff2.0|INVITE > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| *** CREATING TRANSACTION (IST) *** > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| Message: INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| Call-Id: 983d90ae1e37ba66@82.215.128.141 > >> 2006/10/30 16:58:41.717 0x84f5880 OSS DBG......................................| > >> 2006/10/30 16:58:41.718 0x84f5880 OSS DTL......................................| IST(1162227521719) *** CREATED *** - IST|983d90ae1e37ba66@82.215.128.141|z9hG4bKbc98.7abb12a56fef89f4586a70cc43ea1ff2.0|INVITE > >> 2006/10/30 16:58:41.719 0x8463100 OSS DTL: [983d90ae1e37ba66@82.215.128.141]...| IST(1162227521719) Event(SIPMessage) - INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 > >> 2006/10/30 16:58:41.719 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| TRANSACTION: (IST) INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 State: 0 > >> 2006/10/30 16:58:41.719 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.719 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| *** IST STATE IDLE *** > >> 2006/10/30 16:58:41.719 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 > >> 2006/10/30 16:58:41.719 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| TRANSMIT: RESPONSE: SIP/2.0 100 Trying > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| TO: sip:22...@sb...;user=phone > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| REQ: INVITE (49005) > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| XOR: FALSE > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| DST: 82.215.130.50 PORT: 5060 > >> 2006/10/30 16:58:41.721 0x8463100 OSS DBG: [983d90ae1e37ba66@82.215.128.141]...| > >> 2006/10/30 16:58:41.722 0x8463100 OSS DTL: [983d90ae1e37ba66@82.215.128.141]...| IST(1162227521719) StateIdle->StateProceeding > >> 2006/10/30 16:58:41.724 0x84f5980 OSS DBG......................................| SEND: XOR=0 399 Bytes to 82.215.130.50:5060:UDP (SIP/2.0 100 Trying) > >> 2006/10/30 16:58:41.726 0x84dc700 OSS DTL: [983d90ae1e37ba66@82.215.128.141]...| Event: ---> Inbound - INVITE sip:222@82.215.130.50:5061;user=phone SIP/2.0 > >> 2006/10/30 16:58:41.726 0x84dc700 OSS INF: [983d90ae1e37ba66@82.215.128.141]...| Session CREATED > >> 2006/10/30 16:58:41.726 0x84dc700 OSS INF: [983d90ae1e37ba66@82.215.128.141]...| *** CREATED *** Call Session > >> 2006/10/30 16:58:41.727 0x84dc700 OSS INF: [983d90ae1e37ba66@82.215.128.141-connection]...| Multidirectional Session CREATED > >> 2006/10/30 16:58:41.727 0x84dc700 OSS INF: [983d90ae1e37ba66@82.215.128.141-connection]...| B2BUAConnection Created 0x0x8516000 (Active Count: 1) > >> > >> ------------------------------------------------------------------------ > >> > >> ------------------------------------------------------------------------- > >> Using Tomcat but need to do more? Need to support web services, security? > >> Get stuff done quickly with pre-integrated technology to make your job easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> opensipstack-devel mailing list > >> ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >> > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > opensipstack-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel |