[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4697) core dump from acl.c regex



Full_Name: Quanah Gibson-Mount
Version: 2.3.27/HEAD
OS: Linux 2.6 (64-bit)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (171.64.19.81)


The following core happened today on one of my replicas:

Core was generated by `/usr/local/lib/slapd -h ldap:///'.
Program terminated with signal 11, Segmentation fault.


(gdb) info threads
  10 process 28453  0x00002b9d6da82e2c in pthread_join () from
/lib/libpthread.so.0
  9 process 28455  0x00002b9d6dc62b2c in epoll_wait () from /lib/libc.so.6
  8 process 28456  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  7 process 28457  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  6 process 28458  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  5 process 28459  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  4 process 28462  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  3 process 28463  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
  2 process 28464  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
* 1 process 28461  0x00002b9d6dc427dd in fnmatch () from /lib/libc.so.6


(gdb) thread 10
[Switching to thread 10 (process 28453)]#0  0x00002b9d6da82e2c in pthread_join
() from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da82e2c in pthread_join () from /lib/libpthread.so.0
#1  0x0000000000425d41 in slapd_daemon () at daemon.c:2261
#2  0x0000000000416254 in main (argc=3, argv=0x7fffffd3c4c8) at main.c:854
(gdb) thread 9
[Switching to thread 9 (process 28455)]#0  0x00002b9d6dc62b2c in epoll_wait ()
from /lib/libc.so.6
(gdb) bt
#0  0x00002b9d6dc62b2c in epoll_wait () from /lib/libc.so.6
#1  0x0000000000425389 in slapd_daemon_task (ptr=0x6) at daemon.c:1859
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
#4  0x00002b9d6dc627f0 in clone () from /lib/libc.so.6
(gdb) thread 8
[Switching to thread 8 (process 28456)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
(gdb) thread 7
[Switching to thread 7 (process 28457)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
#4  0x00002b9d6dc627f0 in clone () from /lib/libc.so.6
(gdb) thread 6
[Switching to thread 6 (process 28458)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
(gdb) thread 5
[Switching to thread 5 (process 28459)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
#4  0x00002b9d6dc627f0 in clone () from /lib/libc.so.6
(gdb) thread 4
[Switching to thread 4 (process 28462)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
(gdb) thread 3
[Switching to thread 3 (process 28463)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
#4  0x00002b9d6dc627f0 in clone () from /lib/libc.so.6
(gdb) thread 2
[Switching to thread 2 (process 28464)]#0  0x00002b9d6da844e4 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b9d6da844e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#1  0x00002b9d6d03f5ae in ldap_int_thread_pool_wrapper (xpool=0x2b9d6e9400c0) at
tpool.c:490
#2  0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#3  0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0
#4  0x00002b9d6dc627f0 in clone () from /lib/libc.so.6
(gdb) thread 1
[Switching to thread 1 (process 28461)]#0  0x00002b9d6dc427dd in fnmatch () from
/lib/libc.so.6
(gdb) bt
#0  0x00002b9d6dc427dd in fnmatch () from /lib/libc.so.6
#1  0x00002b9d6dc4dd22 in re_exec () from /lib/libc.so.6
#2  0x00002b9d6dc4b70b in re_exec () from /lib/libc.so.6
#3  0x00002b9d6dc49d83 in re_exec () from /lib/libc.so.6
#4  0x00002b9d6dc48526 in re_exec () from /lib/libc.so.6
#5  0x00002b9d6dc47e83 in re_exec () from /lib/libc.so.6
#6  0x00002b9d6dc474a6 in regexec () from /lib/libc.so.6
#7  0x0000000000446058 in slap_access_allowed (op=0x2aaaafd40080,
e=0x2b9e6fde1f78, desc=0x2b9d6e563d50, val=0x2aaab4e07580, access=ACL_READ,
state=0x42e7d4e0, maskp=0x42e7d408) at acl.c:874
#8  0x0000000000448521 in fe_access_allowed (op=0x2aaaafd40080,
e=0x2b9e6fde1f78, desc=0x2b9d6e563d50, val=0x2aaab4e07580, access=ACL_READ,
state=0x42e7d4e0, maskp=0x0) at acl.c:318
#9  0x0000000000443df3 in access_allowed_mask (op=0x2aaaafd40080,
e=0x2b9e6fde1f78, desc=0x2b9d6e563d50, val=0x2aaab4e07580, access=ACL_READ,
state=0x42e7d4e0, maskp=0x0) at acl.c:429
#10 0x0000000000436e1b in slap_send_search_entry (op=0x2aaaafd40080,
rs=0x42ffeeb0) at result.c:894
#11 0x00002b9d6f7342dc in hdb_search (op=0x2aaaafd40080, rs=0x42ffeeb0) at
search.c:878
#12 0x000000000042a30a in fe_op_search (op=0x2aaaafd40080, rs=0x42ffeeb0) at
search.c:355
#13 0x0000000000429c45 in do_search (op=0x2aaaafd40080, rs=0x42ffeeb0) at
search.c:217
#14 0x000000000042837d in connection_operation (ctx=0x42fff020,
arg_v=0x2aaaafd40080) at connection.c:1100
#15 0x0000000000428a33 in connection_read_thread (ctx=0x42fff020, argv=0x0) at
connection.c:1227
#16 0x00002b9d6d03f522 in ldap_int_thread_pool_wrapper (xpool=0x1) at
tpool.c:478
#17 0x00002b9d6cd50c93 in startMeUp () from /usr/local/lib/libhoard.so
#18 0x00002b9d6da81b55 in start_thread () from /lib/libpthread.so.0


Given that all threads except thread 1 appear to be in the same spot, I'm
guessing the problem is in thread 1.

Code is:

(gdb) frame 7
#7  0x0000000000446058 in slap_access_allowed (op=0x2aaaafd40080,
e=0x2b9e6fde1f78, desc=0x2b9d6e563d50, val=0x2aaab4e07580, access=ACL_READ,
state=0x42e7d4e0, maskp=0x42e7d408) at acl.c:874
874                                     if ( regexec( &a->acl_attrval_re,
val->bv_val, 0, NULL, 0 ) )
(gdb) l
869
870                             if ( a->acl_attrval_style == ACL_STYLE_REGEX )
{
871                                     Debug( LDAP_DEBUG_ACL,
872                                             "acl_get: valpat %s\n",
873                                             a->acl_attrval.bv_val, 0, 0 );
874                                     if ( regexec( &a->acl_attrval_re,
val->bv_val, 0, NULL, 0 ) )
875                                     {
876                                             continue;
877                                     }
878


--Quanah