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

back-hdb dumps core in malloc (ITS#2543)



Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Solaris
URL: 
Submission from: (NULL) (129.240.186.42)
Submitted by: hallvard


This coredump only happens sometimes, in test008-concurrency.
To reproduce:

$ cd tests
$ make # To make symlinks
^C
$ (while ./scripts/test008-concurrency . hdb yes yes; do : ; done)

running defines.sh
Datadir is ./data
Cleaning up in ./test-db...
Running slapadd to build slapd database...
Waiting 5 seconds for slapadd to build slapd database...
Starting slapd on TCP/IP port 9009...
Using ldapsearch to check that slapd is running...
Waiting 5 seconds for slapd to start...
Using tester for concurrent server access...
PID=9795 - Add/Delete(50): entry="cn=James A Jones 4,ou=People,o=University of
Michigan,c=US".
PID=9784 - Search(500): base="o=University of Michigan,c=US", filter="cn=Barbara
Jensen".
PID=9785 - Read(1000): entry="cn=Barbara Jensen, ou=Information Technology
Division, ou=People, o=University of Michigan, c=US".
PID=9786 - Modrdn(50): entry="cn=Dorothy Stevens,ou=Alumni
Association,ou=People,o=University of Michigan,c=US".
PID=9794 - Modrdn(50): entry="cn=Ursula Hampster,ou=Alumni
Association,ou=People,o=University of Michigan,c=US".
PID=9790 - Modrdn(50): entry="cn=John Doe,ou=Information Technology
Division,ou=People,o=University of Michigan,c=US".
PID=9796 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn
Jensen".
PID=9792 - Search(500): base="o=University of Michigan,c=US", filter="cn=James A
Jones 1".
PID=9788 - Search(500): base="o=University of Michigan,c=US", filter="cn=Bjorn
Jensen".
PID=9793 - Read(1000): entry="ou=Groups, o=University of Michigan, c=US".
PID=9797 - Read(1000): entry="ou=Alumni Association, ou=People, o=University of
Michigan, c=US".
PID=9791 - Add/Delete(50): entry="cn=James A Jones 3,ou=Alumni
Association,ou=People,o=University of Michigan,c=US".
PID=9787 - Add/Delete(50): entry="cn=James A Jones 2,ou=Alumni
Association,ou=People,o=University of Michigan,c=US".
PID=9789 - Read(1000): entry="cn=ITD Staff,ou=Groups,o=University of
Michigan,c=US".
PID=9798 - Modrdn(50): entry="cn=James A Jones 2,ou=Information Technology
Division,ou=People,o=University of Michigan,c=US".
PID=9799 - Add/Delete(50): entry="cn=James A Jones 5,o=University of
Michigan,c=US".
PID=9800 - Search(500): base="o=University of Michigan,c=US", filter="cn=Alumni
Assoc Staff".
PID=9801 - Read(1000): entry="cn=James A Jones 1, ou=Alumni Association,
ou=People, o=University of Michigan, c=US".
ldap_search: Can't contact LDAP server (81)
ldap_search: Can't contact LDAP server (81)
ldap_search: Can't contact LDAP server (81)
ldap_search: Can't contact LDAP server (81)
ldap_search: Can't contact LDAP server (81)
ldap_read: Can't contact LDAP server (81)
ldap_read: Can't contact LDAP server (81)
ldap_read: Can't contact LDAP server (81)
ldap_read: Can't contact LDAP server (81)
ldap_read: Can't contact LDAP server (81)
ldap_modrdn: Can't contact LDAP server (81)
ldap_modrdn: Can't contact LDAP server (81)
ldap_modrdn: Can't contact LDAP server (81)
ldap_modrdn: Can't contact LDAP server (81)
ldap_add: Can't contact LDAP server (81)
ldap_delete: Can't contact LDAP server (81)
ldap_delete: Can't contact LDAP server (81)
ldap_add: Can't contact LDAP server (81)
 PID=9789 - Read done.
 PID=9785 - Read done.
 PID=9793 - Read done.
 PID=9800 - Search done.
 PID=9786 - Modrdn done.
 PID=9798 - Modrdn done.
 PID=9794 - Modrdn done.
 PID=9801 - Read done.
 PID=9792 - Search done.
 PID=9790 - Modrdn done.
 PID=9796 - Search done.
 PID=9788 - Search done.
 PID=9784 - Search done.
 PID=9797 - Read done.
 PID=9799 - Add/Delete done.
 PID=9791 - Add/Delete done.
 PID=9787 - Add/Delete done.
 PID=9795 - Add/Delete done.
9779 Segmentation Fault - core dumped
Using ldapsearch to retrieve all the entries...
./scripts/test008-concurrency: kill: no such process
ldapsearch failed (1)!

$ gdb ../servers/slapd/slapd core
(gdb) bt
#0  0x001871b8 in malloc ()
#1  0x000edb64 in ber_memalloc_x (s=12, ctx=0x0) at memory.c:222
#2  0x000edbbc in ber_memalloc (s=12) at memory.c:238
#3  0x0011a448 in __os_malloc ()
#4  0x0011a3e8 in __os_calloc ()
#5  0x0016c1dc in __dd_build ()
#6  0x0016bbe4 in __lock_detect ()
#7  0x00110af8 in __lock_get_internal ()
#8  0x00110060 in __lock_get ()
#9  0x00157b14 in __db_lget ()
#10 0x00137878 in __bam_search ()
#11 0x001794b0 in __bam_c_search ()
#12 0x00175f8c in __bam_c_get ()
#13 0x0014f894 in __db_c_get ()
#14 0x0008ac8c in hdb_dn2id (be=0xb960208, txn=0x2f0e88, in=0xfa0016bc, 
    ei=0xfa0016b0, ctx=0x5f57888) at dn2id.c:752
#15 0x00087c9c in hdb_cache_find_ndn (be=0x2d8e08, txn=0x2f0e88, 
    ndn=0xfa0019a0, res=0xfa001784, locker=2147484789, ctx=0x5f57888)
    at cache.c:357
#16 0x0007f294 in hdb_modrdn (op=0x172e008, rs=0xfa001ad8) at modrdn.c:672
#17 0x00054b50 in do_modrdn (op=0x172e008, rs=0xfa001ad8) at modrdn.c:366
#18 0x00042f00 in connection_operation (ctx=0xfa001b80, arg_v=0x172e008)
    at connection.c:959
#19 0x000c9cb8 in ldap_int_thread_pool_wrapper (xpool=0x26dc08) at tpool.c:463
(gdb) frame 1
#1  0x000edb64 in ber_memalloc_x (s=12, ctx=0x0) at memory.c:222
222                     new = malloc( s );
(gdb) print s
$1 = 12
(gdb) frame 14
#14 0x0008ac8c in hdb_dn2id (be=0xb960208, txn=0x2f0e88, in=0xfa0016bc, 
    ei=0xfa0016b0, ctx=0x5f57888) at dn2id.c:752
752             rc = cursor->c_get( cursor, &key, &data, DB_GET_BOTH );
(gdb) print cursor
$2 = (DBC *) 0xb960208
(gdb) print *cursor
$3 = {dbp = 0x2ee208, txn = 0x2f0e88, links = {tqe_next = 0x1b3ae08, 
    tqe_prev = 0x2d41c10}, rskey = 0xb960224, rkey = 0xb96023c, 
  rdata = 0xb960254, my_rskey = {data = 0x0, size = 0, ulen = 0, dlen = 0, 
    doff = 0, flags = 0}, my_rkey = {data = 0x0, size = 0, ulen = 0, dlen = 0, 
    doff = 0, flags = 0}, my_rdata = {data = 0x0, size = 0, ulen = 0, 
    dlen = 0, doff = 0, flags = 0}, lid = 34, locker = 2147484789, lock_dbt = {
    data = 0xb96028c, size = 28, ulen = 0, dlen = 0, doff = 0, flags = 0}, 
  lock = {pgno = 1, fileid = "\0\005F©\002 \0\005>ÍÓ6\0\001¬Ñ\0\0\0", 
    type = 3}, mylock = {off = 0, ndx = 0, gen = 0, mode = DB_LOCK_NG}, 
  cl_id = 0, dbtype = DB_BTREE, internal = 0xb95f208, 
  c_close = 0x14e968 <__db_c_close>, c_count = 0x14ed5c <__db_c_count>, 
  c_del = 0x14ee84 <__db_c_del>, c_dup = 0x14f03c <__db_c_dup>, 
  c_get = 0x14f49c <__db_c_get>, c_pget = 0x150aa8 <__db_c_pget>, 
  c_put = 0x14fccc <__db_c_put>, c_am_bulk = 0x1765ac <__bam_bulk>, 
  c_am_close = 0x1752b8 <__bam_c_close>, c_am_del = 0x175a88 <__bam_c_del>, 
  c_am_destroy = 0x175800 <__bam_c_destroy>, 
  c_am_get = 0x175e10 <__bam_c_get>, c_am_put = 0x177b3c <__bam_c_put>, 
  c_am_writelock = 0x178390 <__bam_c_writelock>, 
  c_real_get = 0x14f49c <__db_c_get>, flags = 4097}
(gdb) print key
$4 = {data = 0xfa001604, size = 4, ulen = 4, dlen = 0, doff = 0, flags = 32}
(gdb) print data
$5 = {data = 0x8159fac, size = 19, ulen = 57, dlen = 0, doff = 0, flags = 32}