Processed: Re: Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
Processing commands for [EMAIL PROTECTED]: clone 435146 -1 Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed. Bug 435146 cloned as bug 438815. reassign -1 libopenh323-1.18.0 1.18.0.dfsg-1 Bug#438815: asterisk-h323: Asterisk crashes on startup with H323 package installed. Bug reassigned from package `asterisk-h323' to `libopenh323-1.18.0'. retitle -1 Segfault when dlclose()ing libopenh323 Bug#438815: asterisk-h323: Asterisk crashes on startup with H323 package installed. Changed Bug title to `Segfault when dlclose()ing libopenh323' from `asterisk-h323: Asterisk crashes on startup with H323 package installed.'. tags -1 -pending Bug#438815: Segfault when dlclose()ing libopenh323 Tags were: pending Tags removed: pending thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
clone 435146 -1 reassign -1 libopenh323-1.18.0 1.18.0.dfsg-1 retitle -1 Segfault when dlclose()ing libopenh323 tags -1 -pending thanks I've investigating this for hours and I've concluded to this: It seems that Asterisk's dynamic loader loads modules in two passes; modules with global symbols are loaded in the first pass while the rest of the modules (which can use these global symbols, hence the need for two passes) are loaded in the second. The information of whether a module contains global symbols or not is stored inside the module as a flag. Hence, the dynamic loader dlopen()s libraries with RTLD_LAZY | RTLD_LOCAL, checks the flags and: * if it is flagged global, it continues by promoting it to RTLD_GLOBAL, * if it is not, it calls dlclose(), pending loading in the second pass. chan_h323 is one of those that are not flagged that way; hence it is dlopen()ed/dlclose()d in the first pass and dlopen()ed another time in the second. Of course, when dlopening a shared library, all of its dependencies (e.g. libopenh323, libpt, libSDL etc. for chan_h323.so) are dynamically loaded too and on dlclose() they are also closed. It seems that Asterisk segfaults on the dlclose() of chan_h323.so which in turn is caused by unloading libopenh323. I wrote a very simple test suite that proves this and tested it with both 1.18 and 1.19[1]. Unfortunately the backtrace, as shown earlier in the bug report, is quite cryptic and C++ is not my area of expertise. It is worth noting however, that if RTLD_NOW is used instead of RTLD_LAZY (or the environment has LD_BIND_NOW, these two are equivalent) the bug does not occur. This is definitely a libopenh323 bug and Asterisk workarounds it by linking the main asterisk binary against libopenh323 and hence avoiding unloading it when its loader dlclose()s chan_h323.so. Regards, Faidon [1]: #include stdio.h #include stdlib.h #include dlfcn.h int main(int argc, char **argv) { void *handle; char *error; char *library; if (argc 2) { fprintf(stderr, Usage: %s foo.so\n, argv[0]); exit(EXIT_FAILURE); } library = argv[1]; handle = dlopen(library, RTLD_LAZY | RTLD_LOCAL); if (!handle) { fprintf(stderr, %s\n, dlerror()); exit(EXIT_FAILURE); } dlerror(); /* Clear any existing error */ printf(loaded '%s', trying to unload...\n, library); /* unload dynamic library */ dlclose(handle); if ((error = dlerror()) != NULL) { fprintf(stderr, %s\n, error); exit(EXIT_FAILURE); } printf(unloaded '%s', exiting...\n, library); exit(EXIT_SUCCESS); } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Processed: Re: Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
Processing commands for [EMAIL PROTECTED]: found 435146 1:1.4.8~dfsg-2 Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed. Bug marked as found in version 1:1.4.8~dfsg-2. tags 435146 - help Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed. Tags were: help Tags removed: help tags 435146 pending Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed. There were no tags set. Tags added: pending thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
found 435146 1:1.4.8~dfsg-2 tags 435146 - help tags 435146 pending thanks On Sun, 29 Jul 2007, Konstantin Starodubtsev wrote: Asterisk crashes with core dump if asterisk-h323 packages installed. Konstantin, We have managed to debug this problem, it was introduced by version 1:1.4.8~dfsg-2 and we should have a fixed version 1.4.10.1 uploaded in the next couple of days. Mark signature.asc Description: This is a digitally signed message part.
Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
Hi Konstantin, On Sun, Jul 29, 2007 at 07:26:20PM +0400, Konstantin Starodubtsev wrote: Package: asterisk-h323 Version: 1:1.4.9~dfsg-1 Asterisk crashes with core dump if asterisk-h323 packages installed. can you try if this still exists with installed libopenh323-1.18.0 (=1.18.0.dfsg-3)? The new version hit incoming just today, so it may take a while till it's available through the Debian mirrors. Thanks! -- Best regards, Kilian signature.asc Description: Digital signature
Bug#435146: asterisk-h323: Asterisk crashes on startup with H323 package installed.
Package: asterisk-h323 Version: 1:1.4.9~dfsg-1 Severity: grave Justification: renders package unusable Asterisk crashes with core dump if asterisk-h323 packages installed. Uninstalling this package stops crashes though make h323 protocol unusable. The bug is reproducable. Package is unusable even when installed on clean system which had never asterisk installed on. # asterisk -vdddg Asterisk 1.4.9, Copyright (C) 1999 - 2007 Digium, Inc. and others. ... [ output from other modules there ] . res_config_pgsql.so = (PostgreSQL RealTime Configuration Driver) res_jabber.so = (AJI - Asterisk Jabber Interface) [Jul 29 19:19:53] WARNING[8620]: res_crypto.c:480 crypto_load: Unable to open key directory '/var/lib/asterisk/keys' res_crypto.so = (Cryptographic Digital Signatures) res_monitor.so = (Call Monitoring Resource) Segmentation fault (core dumped) # gdb /usr/sbin/asterisk core.8851 . [ symbol loading info there ] . Core was generated by `asterisk -vdddg'. Program terminated with signal 11, Segmentation fault. #0 0x in ?? () (gdb) (gdb) bt #0 0x in ?? () #1 0xb7314426 in PFactoryH323Capability, PString::~PFactory () from /usr/lib/libopenh323.so.1.18.0 #2 0xb6e82852 in PFactoryBase::FactoryMap::~FactoryMap () from /usr/lib/libpt.so.1.10.7 #3 0xb6e828c0 in ?? () from /usr/lib/libpt.so.1.10.7 #4 0xb7d55831 in __cxa_finalize () from /lib/i686/cmov/libc.so.6 #5 0xb6cf2383 in ?? () from /usr/lib/libpt.so.1.10.7 #6 0xb6f28c60 in ?? () from /usr/lib/libpt.so.1.10.7 #7 0xb6f26768 in ?? () from /usr/lib/libpt.so.1.10.7 #8 0xbfb25508 in ?? () #9 0xb6e8317c in _fini () from /usr/lib/libpt.so.1.10.7 Backtrace stopped: frame did not save the PC (gdb) -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.21-1-vserver-686 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages asterisk-h323 depends on: ii libc6 2.6-4GNU C Library: Shared libraries ii libexpat1 1.95.8-3.4 XML parsing C library - runtime li ii libgcc1 1:4.2-20070528-1 GCC support library ii libldap22.1.30-13.3 OpenLDAP libraries ii libopenh323-1.18.0 1.18.0.dfsg-2H.323 aka VoIP library ii libpt-1.10.01.10.7~dfsg1-4 Portable Windows Library ii libsasl2-2 2.1.22.dfsg1-8 Authentication abstraction library ii libsdl1.2debian 1.2.11-8 Simple DirectMedia Layer ii libssl0.9.8 0.9.8e-4 SSL shared libraries ii libstdc++6 4.2-20070528-1 The GNU Standard C++ Library v3 Versions of packages asterisk-h323 recommends: ii asterisk 1:1.4.9~dfsg-1 Open Source Private Branch Exchang -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]