[OpenSIPS-Users] Media Proxy 2.0 - Seg Fault

Darren Sessions dmsessions at gmail.com
Mon Aug 18 17:15:18 CEST 2008


Thanks for the tips Dan. I'll try them on the OpenSUSE box here in  
just a bit.

I did try installation on an Ubuntu x86-64 box as well, and had it up  
and running in less than 10 minutes (I'm very impressed thus-far with  
Ubuntu). The Ubuntu i386 server and the packages on the ag-projects  
website was an insanely fast installation.

With both Ubuntu installations, I did end up having to upgrade to the  
latest version of libnetfilter-conntrack1_0.0.89-1 and libnetfilter- 
conntrack-dev_0.0.89-1 from what was available on the repositories.

In any case, I'm putting together a comprehensive write-up and will  
stick it on my site when I'm done.

Thanks again,

  - Darren


_____________________________

dmsessions at gmail.com
http://www.darrensessions.com
_____________________________




On Aug 18, 2008, at 7:10 AM, Dan Pascu wrote:

>
> Make sure you rebuild python-gnutls after you installed a new  
> libgnutls
> and libgcrypt on your system. Also make sure you build it with the  
> right
> libgcrypt. As I see from your syslog, it gave the error first with
> libgcrypt.so.11.4.3 then with libgcrypt.so.11.4.4 which means the  
> library
> changed in between.
>
> python-gnutls loads libgnutls at runtime, it is not linked with it,  
> but at
> the same time it is linked with libgcrypt at build time. That means it
> will load whatever the latest version of libgnutls you have  
> installed at
> the moment you run the application, while still being linked with the
> libgcrypt from the build time. However libgnults itself also is linked
> with libgcrpt independently of python-gnutls. If the version of the
> libgcrypt used by python-gnutls is different from the one used by
> libgnutls internally, you have a conflict which usually results in a
> segmentation fault.
>
> To give an example to make it more clear:
>
> 1. You have libgnutls-2.4.1, libgcrypt-1.4.0 and libgcrypt-1.4.0-dev
> installed.
> 2. You build python-gnults, which will link it with lingcrypt-1.4.0
> 3. You run some python-gnutls based application. When it starts it  
> will
> load libgcrypt-1.4.0 and setup some thread safety procedures inside
> libgcrypt. Then python-gnults loads libgnutls-2.4.1 which in turn  
> loads
> its own libgcrypt-1.4.0, which is the same version already  
> initialized by
> python-gnutls, so there is no conflict.
>
> 4. You install a new libgnutls-2.5.3 and its corresponding  
> libgcrypt-1.4.1
> 5. Without rebuilding python-gnutls, you run a python-gnutls based
> application. When it starts it loads libgcrypt-1.4.0 to do the thread
> safety setup, and then loads libgnutls-2.5.3 which in turn loads
> libgcrypt-1.4.1 (a different version) which was not initialized to be
> thread safe. In this case a core dump occurs sooner or later.
>
> 6. You rebuild python-gnults, but you still have libgcrypt-1.4.0-dev
> installed. In this case nothing happens as it will still link with
> libgcrypt-1.4.0 instead of 1.4.1 (which is linked by libgnutls  
> itself) so
> you end up with the same problem.
>
> In conclusion, you need to make sure you have the libgcrypt-dev that
> corresponds to the libcgrypt with which libgnutls itself is linked,  
> and
> then rebuild python-gnutls after you upgraded libgnutls or libgcrypt.
>
>
>> ss1:/src # /usr/local/bin/media-dispatcher --no-fork
>> Starting MediaProxy Dispatcher 2.0.3
>> Twisted is using epollreactor
>> Segmentation fault
>> ss1:/src # tail -f /var/log/messages
>> --snip--
>> Aug 15 19:44:03 ss1 kernel: media-dispatche[21922]: segfault at 10 ip
>> 7ffb9f27fe69 sp 7fffad19e690 error 4 in libgcrypt.so.
>> 11.4.3[7ffb9f23b000+64000]
>> Aug 15 19:44:21 ss1 kernel: media-dispatche[21924]: segfault at 10 ip
>> 7f255b4e1e69 sp 7fff69400900 error 4 in libgcrypt.so.
>> 11.4.3[7f255b49d000+64000]
>> Aug 15 19:52:25 ss1 kernel: media-dispatche[11611]: segfault at 10 ip
>> 7f9cfde05a79 sp 7fff0bd25230 error 4 in libgcrypt.so.
>> 11.4.4[7f9cfddc1000+64000]
>>
>>
>> I'm using:
>>
>> OpenSUSE 11 x86-64
>> mediaproxy-2.0.3
>> libtasn1-1.4
>> libgcrypt-1.4.1
>> libnetfilter_conntrack-0.0.96
>> libnfnetlink-0.0.39
>> gnutls-2.5.3
>> python-application-1.0.9
>> python-gnutls-1.1.6
>> python-cjson-1.0.5
>> SQLObject-0.10.2
>>
>>
>> I've tried the stock libgcrypt and gnutls in OpenSUSE 11, and was get
>> x509 related error messages, so I removed them and upgraded.
>>
>> Any ideas would be appreciated.
>>
>> Thanks,
>>
>>  - Darren
>
> -- 
> Dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080818/d5b6e5b7/attachment-0001.htm 


More information about the Users mailing list