Summary: | ASTERISK-17704: Asterisk Crash when Realtime LDAP extensions not found | ||||
Reporter: | J. Gomez (barneta) | Labels: | |||
Date Opened: | 2011-04-17 19:14:44 | Date Closed: | 2017-02-16 14:31:53.000-0600 | ||
Priority: | Critical | Regression? | No | ||
Status: | Closed/Complete | Components: | Resources/res_config_ldap | ||
Versions: | 1.8.4 | Frequency of Occurrence | |||
Related Issues: |
| ||||
Environment: | Attachments: | ( 0) backtrace.txt ( 1) backtrace.txt ( 2) backtrace-threads.txt ( 3) gdb.txt | |||
Description: | Asterisk Crash when Realtime LDAP extensions not found ****** ADDITIONAL INFORMATION ****** substituted: string: 'ou=sip,dc=airebullas,dc=es' => 'ou=sip,dc=airebullas,dc=es' basedn: 'ou=sip,dc=airebullas,dc=es' => 'ou=sip,dc=airebullas,dc=es' Everything seems fine. name='exten' value='h' name='context' value='from-phone' name='priority' value='1' Could not find any entry matching (&(objectClass=AsteriskExtension)(AstExtension=h)(AstContext=from-phone)(AstPriority=1)) in base dn ou=sip,dc=airebullas,dc=es. substituted: string: 'ou=sip,dc=airebullas,dc=es' => 'ou=sip,dc=airebullas,dc=es' basedn: 'ou=sip,dc=airebullas,dc=es' => 'ou=sip,dc=airebullas,dc=es' Everything seems fine. name='exten LIKE' value='\_%' name='context' value='from-phone' name='priority' value='1' Could not find any entry matching (&(objectClass=AsteriskExtension)(AstExtension=_*)(AstContext=from-phone)(AstPriority=1)) in base dn ou=sip,dc=airebullas,dc=es. Segmentation fault (core dumped) | ||||
Comments: | By: Leif Madsen (lmadsen) 2011-04-18 16:14:16 https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace By: J. Gomez (barneta) 2011-04-20 05:49:50 I attach backtrace.txt, thanks!!! By: J. Gomez (barneta) 2011-04-20 06:45:58 Asterisk don't crashed when it is compiled with DONT_OPTIMIZE flag is enabled, if this flag is disabled (default) asterisk allways crashed when lookup realtime ldap dialplan extensions. I'm confused!!!! OS: Debian6.0.1 GCC Version: gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.5 (Debian 4.4.5-8) By: Vittorio Manfredini (vitsoft) 2011-10-07 05:09:45.942-0500 I have exactly the same issue with asterisk 1.8.7.0. OS opensuse 11.4 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux) I found that the problem is generated in res_config_ldap.c line 805 function ldap_search_ext_s By: Vittorio Manfredini (vitsoft) 2011-10-07 07:29:14.524-0500 What it's strange is that the first time that call the function work fine the second time generate the segmentation fault : [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: substituted: string: 'ou=extension,ou=pbx,o=asterisk' => 'ou=extension,ou=pbx,o=asterisk' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: basedn: 'ou=extension,ou=pbx,o=asterisk' => 'ou=extension,ou=pbx,o=asterisk' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: Everything seems fine. [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='exten' value='*60' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='context' value='app-echo-test' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='priority' value='1' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: Could not find any entry matching (&(objectClass=AsteriskExtension)(AstExtension=*60)(AstContext=app-echo-test)(AstPriority=1)) in base dn ou=extension,ou=pbx,o=asterisk. [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: substituted: string: 'ou=extension,ou=pbx,o=asterisk' => 'ou=extension,ou=pbx,o=asterisk' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: basedn: 'ou=extension,ou=pbx,o=asterisk' => 'ou=extension,ou=pbx,o=asterisk' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: Everything seems fine. [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='exten LIKE' value='\_%' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='context' value='app-echo-test' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: name='priority' value='1' [Oct 7 14:25:35] DEBUG[29362] res_config_ldap.c: Could not find any entry matching (&(objectClass=AsteriskExtension)(AstExtension=_*)(AstContext=app-echo-test)(AstPriority=1)) in base dn ou=extension,ou=pbx,o=asterisk. The same query done directly to the ldap server return the not found result. By: Matt Jordan (mjordan) 2013-01-15 10:15:52.021-0600 Please note that {{res_config_ldap}} is an extended support module. Developer effort for it typically comes from the open source community, and response times may reflect that. By: Sean Bright (seanbright) 2017-02-16 14:31:53.712-0600 I'm not able to reproduce this was Asterisk 13. There have been several [memory|https://github.com/asterisk/asterisk/commit/078f73d6972bca4eb487c67675926ef25255d1db] [issues|https://github.com/asterisk/asterisk/commit/0f92716dbb62d8c8df013668bcd86835b8f8b85d] [fixed|https://github.com/asterisk/asterisk/commit/1f3fff7b91c7ca821e30267ab13db7341d89f122] in {{res_config_ldap}} since this issue was originally reported. It seems one of those resolved the crash that you are seeing. |