Skip to content

Instantly share code, notes, and snippets.

@christopherwood

christopherwood/bt4.txt Secret

Created Aug 31, 2017
Embed
What would you like to do?
backtrace of segfault in slapadd 2.4.45
Script started on Thu 31 Aug 2017 09:54:36 AM EDT
]0;root@poc209:~/openldap-2.4.45[?1034h# gdb servers/slapd/.libs/slapd
[?1034hGNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/openldap-2.4.45/servers/slapd/.libs/slapd...done.
(gdb) run -T add -d 0 -b cn=config -l /tmp/slapd.ldif -F /opt/openldap/etc/openldap/slapd.d
Starting program: /root/openldap-2.4.45/servers/slapd/.libs/slapd -T add -d 0 -b cn=config -l /tmp/slapd.ldif -F /opt/openldap/etc/openldap/slapd.d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
slapadd: could not add entry dn="cn=config" (line=1):
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7982524 in ber_bvarray_free_x (a=0xf, ctx=0x0) at memory.c:727
727 for (i=0; a[i].bv_val; i++) ;
(gdb) bt full
#0 0x00007ffff7982524 in ber_bvarray_free_x (a=0xf, ctx=0x0) at memory.c:727
i = <optimized out>
#1 0x00007ffff79825a7 in ber_bvarray_free (a=<optimized out>) at memory.c:741
No locals.
#2 0x00007ffff36178b1 in syncprov_db_destroy (be=<optimized out>, cr=<optimized out>) at syncprov.c:3323
on = <optimized out>
si = 0x8f53d0
#3 0x000000000049a118 in over_db_destroy (be=0x8c6950, cr=0x0) at backover.c:208
oi = 0x8f47a0
on = 0x8f51f0
next = <optimized out>
bi_orig = 0x8f47a0
rc = <optimized out>
#4 0x0000000000440d5e in backend_destroy_one (bd=0x8c6950, dynamic=1) at backend.c:452
No locals.
#5 0x0000000000440e8a in backend_destroy () at backend.c:491
bd = <optimized out>
bi = <optimized out>
#6 0x000000000045fd81 in slap_destroy () at init.c:250
rc = <optimized out>
#7 0x000000000049f39c in slap_tool_destroy () at slapcommon.c:934
rc = 0
#8 0x000000000049d65b in slapadd (argc=<optimized out>, argv=<optimized out>) at slapadd.c:526
textbuf = '\000' <repeats 255 times>
erec = {e = 0x890a18, lineno = 1, nextline = 6}
bvtext = {bv_len = 256, bv_val = 0x7fffffffe290 ""}
thr = 140737354038480
id = <optimized out>
prev = 0x0
rc = 1
stat_buf = {st_dev = 0, st_ino = 140737354130600, st_nlink = 0, st_mode = 4160742568, st_uid = 32767, st_gid = 4294959696, __pad0 = 32767, st_rdev = 140737488347712, st_size = 479434334, st_blksize = 4256607,
st_blocks = 4294967295, st_atim = {tv_sec = 140737315033142, tv_nsec = 140737314869200}, st_mtim = {tv_sec = 140737354051584, tv_nsec = 140737488348016}, st_ctim = {tv_sec = 11, tv_nsec = 0}, __unused = {11,
140737318724608, 140737315700492}}
#9 0x000000000041a0af in main (argc=<optimized out>, argv=0x7fffffffe558) at main.c:655
i = <optimized out>
no_detach = <optimized out>
rc = 1
urls = <optimized out>
username = <optimized out>
groupname = <optimized out>
sandbox = <optimized out>
syslogUser = 160
pid = <optimized out>
waitfds = {-6728, 32767}
g_argc = <optimized out>
g_argv = 0x7fffffffe558
configfile = <optimized out>
configdir = <optimized out>
serverName = <optimized out>
scp = <optimized out>
scp_entry = <optimized out>
debug_unknowns = 0x0
syslog_unknowns = 0x0
serverNamePrefix = <synthetic pointer>
l = <optimized out>
---Type <return> to continue, or q <return> to quit---
slapd_pid_file_unlink = 0
slapd_args_file_unlink = 0
firstopt = <optimized out>
__PRETTY_FUNCTION__ = "main"
(gdb) thread apply all bt
Thread 1 (Thread 0x7ffff7fe3840 (LWP 3906)):
#0 0x00007ffff7982524 in ber_bvarray_free_x (a=0xf, ctx=0x0) at memory.c:727
#1 0x00007ffff79825a7 in ber_bvarray_free (a=<optimized out>) at memory.c:741
#2 0x00007ffff36178b1 in syncprov_db_destroy (be=<optimized out>, cr=<optimized out>) at syncprov.c:3323
#3 0x000000000049a118 in over_db_destroy (be=0x8c6950, cr=0x0) at backover.c:208
#4 0x0000000000440d5e in backend_destroy_one (bd=0x8c6950, dynamic=1) at backend.c:452
#5 0x0000000000440e8a in backend_destroy () at backend.c:491
#6 0x000000000045fd81 in slap_destroy () at init.c:250
#7 0x000000000049f39c in slap_tool_destroy () at slapcommon.c:934
#8 0x000000000049d65b in slapadd (argc=<optimized out>, argv=<optimized out>) at slapadd.c:526
#9 0x000000000041a0af in main (argc=<optimized out>, argv=0x7fffffffe558) at main.c:655
(gdb) quit
A debugging session is active.
Inferior 1 [process 3906] will be killed.
Quit anyway? (y or n) y
]0;root@poc209:~/openldap-2.4.45# exit
exit
Script done on Thu 31 Aug 2017 09:56:29 AM EDT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment