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

Re: (ITS#4512) seg-fault while building cn=config with debugging on



Using a simpler slapd.conf now:
include         /usr/local/openldap/etc/openldap/schema/core.schema
include         /usr/local/openldap/etc/openldap/schema/cosine.schema
database        bdb
suffix          "dc=test"
directory       /tmp/ldap
mode            0600
index   objectclass     eq

Ran slapd with an empty /tmp/slapd.d and
slapd -h ldapi://%2ftmp%2ferici-ldap -f /tmp/slapd.conf -F /tmp/slapd.d -d 1

At the crash, there was still only one thread.  dbx says:

t@1 (l@1) signal SEGV (no mapping at the fault address) in strlen at 0xffffffff7f23d28c
0xffffffff7f23d28c: strlen+0x007c:      ld      [%o1], %o2
Current function is lutil_debug
   83           vsnprintf( buffer, sizeof(buffer), fmt, vl );
(dbx) where -v
current thread: t@1
  [1] strlen(0x0, 0x0, 0xffffffff7fffd390, 0x7efefeff, 0x81010100, 0x0), at 0xffffffff7f23d28c
  [2] _doprnt(0x0, 0xffffffff7fffd390, 0x0, 0x0, 0x73, 0x0), at 0xffffffff7f290300
  [3] vsnprintf(0xffffffff7fffd4c8, 0x1000, 0x1004286f0, 0xffffffff7fffe578, 0x10015a858, 0x0), at 0xffffffff7f2924bc
=>[4] lutil_debug(debug = 1, level = 1, fmt = 0x1004286f0 "ldif_back_add: err: %d text: %s\n", ...), line 83 in "debug.c"
  [5] ldif_back_add(op = 0xffffffff7fffea70, rs = 0xffffffff7fffe9d8), line 831 in "ldif.c"
  [6] config_build_entry(op = 0xffffffff7fffea70, rs = 0xffffffff7fffe9d8, parent = (nil), c = 0xffffffff7fffef80, rdn = 0xffffffff7ffff568, main = 0x10047d5f8, extra = (nil)), line 4213 in "bconfig.c"
  [7] config_back_db_open(be = 0x100544e30), line 4367 in "bconfig.c"
  [8] backend_startup_one(be = 0x100544e30), line 212 in "backend.c"
  [9] backend_startup(be = 0x100544e30), line 301 in "backend.c"
  [10] slap_startup(be = (nil)), line 249 in "init.c"
  [11] main(argc = 9, argv = 0xffffffff7ffffa38), line 840 in "main.c"
(dbx) examine 0xffffffff7fffd4c8 / 1 s
0xffffffff7fffd4c8:     "ldif_back_add: err: 0 text: "
(dbx)

Maybe a problem with conflicting declarations between stdarg.h and the OL
code?

On Thu, 27 Apr 2006 erici@motown.cc.utexas.edu wrote:

>Full_Name: Eric Irrgang
>Version: 2.3.21
>OS: Solaris 9 sparcv9
>URL:
>Submission from: (NULL) (128.83.217.14)
>
>
>compiled 64-bit against BDB 4.4.20
>
>slapd.conf:
>include         /usr/local/openldap/etc/openldap/schema/core.schema
>include         /usr/local/openldap/etc/openldap/schema/cosine.schema
>include         /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
>include         /usr/local/openldap/etc/openldap/schema/dyngroup.schema
>
>database        bdb
>suffix          "dc=utexas,dc=edu"
>directory       /tmp/ldap
>mode            0600
>cachesize       1000
>checkpoint      500000  60
>#dbnosync
>shm_key 89
>dbconfig set_shm_key 89
>index   objectclass eq
>
>
>Any time slapd is invoked with any non-zero debugging level
>specified on the command line in conjunction with a config directory
>specified with '-F', slapd seg-faults while building cn=config right after -d -1
>shows oc_check_allowed type "modifyTimestamp".  The last few lines from 'truss
>-lf' are
>
>25772/1:        write(2, " o c _ c h e c k _ a l l".., 40)      = 40
>25772/1:        stat("/tmp/slapd.d", 0xFFFFFFFF7FFFE7D8)        = 0
>25772/1:        stat("/tmp/slapd.d/cn=config.ldif", 0xFFFFFFFF7FFFE7D8) Err#2
>ENOENT
>25772/1:        open("/tmp/slapd.d/cn=config.ldif", O_WRONLY|O_CREAT|O_TRUNC,
>0600) = 8
>25772/1:        write(8, " d n :   c n = c o n f i".., 896)     = 896
>25772/1:        close(8)                                        = 0
>25772/1:            Incurred fault #6, FLTBOUNDS  %pc = 0xFFFFFFFF7F23D28C
>25772/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
>25772/1:            Received signal #11, SIGSEGV [default]
>25772/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
>
>
>Invoked without '-d', the lines corresponding to this point in the execution
>would be:
>
>25827/1:        stat("/tmp/slapd.d", 0xFFFFFFFF7FFFE7E8)        = 0
>25827/1:        stat("/tmp/slapd.d/cn=config.ldif", 0xFFFFFFFF7FFFE7E8) = 0
>25827/1:        stat("/tmp/slapd.d/cn=config", 0xFFFFFFFF7FFFE6E8) Err#2 ENOENT
>25827/1:        stat("/tmp/slapd.d/cn=config.ldif", 0xFFFFFFFF7FFFE6E8) = 0
>25827/1:        mkdir("/tmp/slapd.d/cn=config", 0750)           = 0
>25827/1:        stat("/tmp/slapd.d/cn=config/cn=include{0}.ldif",
>0xFFFFFFFF7FFFE6E8) Err#2 ENOENT
>25827/1:        open("/tmp/slapd.d/cn=config/cn=include{0}.ldif",
>O_WRONLY|O_CREAT|O_TRUNC, 0600) = 8
>25827/1:        write(8, " d n :   c n = i n c l u".., 369)     = 369
>25827/1:        close(8)                                        = 0
>25827/1:        stat("/tmp/slapd.d/cn=config", 0xFFFFFFFF7FFFE6E8) = 0
>25827/1:        stat("/tmp/slapd.d/cn=config/cn=include{1}.ldif",
>0xFFFFFFFF7FFFE6E8) Err#2 ENOENT
>25827/1:        open("/tmp/slapd.d/cn=config/cn=include{1}.ldif",
>O_WRONLY|O_CREAT|O_TRUNC, 0600) = 8
>25827/1:        write(8, " d n :   c n = i n c l u".., 371)     = 371
>25827/1:        close(8)                                        = 0
>25827/1:        stat("/tmp/slapd.d/cn=config", 0xFFFFFFFF7FFFE6E8) = 0
>25827/1:        stat("/tmp/slapd.d/cn=config/cn=include{2}.ldif",
>0xFFFFFFFF7FFFE6E8) Err#2 ENOENT
>25827/1:        open("/tmp/slapd.d/cn=config/cn=include{2}.ldif",
>O_WRONLY|O_CREAT|O_TRUNC, 0600) = 8
>25827/1:        write(8, " d n :   c n = i n c l u".., 378)     = 378
>25827/1:        close(8)                                        = 0
>25827/1:        stat("/tmp/slapd.d/cn=config", 0xFFFFFFFF7FFFE6E8) = 0
>25827/1:        stat("/tmp/slapd.d/cn=config/cn=include{3}.ldif",
>0xFFFFFFFF7FFFE6E8) Err#2 ENOENT
>25827/1:        open("/tmp/slapd.d/cn=config/cn=include{3}.ldif",
>O_WRONLY|O_CREAT|O_TRUNC, 0600) = 8
>25827/1:        write(8, " d n :   c n = i n c l u".., 373)     = 373
>25827/1:        close(8)                                        = 0
>25827/1:        brk(0x1006B26E0)                                = 0
>25827/1:        brk(0x1006B66E0)                                = 0
>25827/1:        brk(0x1006B66E0)                                = 0
>25827/1:        brk(0x1006BA6E0)                                = 0
>25827/1:        brk(0x1006BA6E0)                                = 0
>25827/1:        brk(0x1006BE6E0)                                = 0
>25827/1:        brk(0x1006BE6E0)                                = 0
>25827/1:        brk(0x1006C26E0)                                = 0
>25827/1:        brk(0x1006C26E0)                                = 0
>25827/1:        brk(0x1006C66E0)                                = 0
>25827/1:        brk(0x1006C66E0)                                = 0
>25827/1:        brk(0x1006CA6E0)                                = 0
>25827/1:        brk(0x1006CA6E0)                                = 0
>25827/1:        brk(0x1006CE6E0)                                = 0
>25827/1:        brk(0x1006CE6E0)                                = 0
>25827/1:        brk(0x1006D26E0)                                = 0
>25827/1:        brk(0x1006D26E0)                                = 0
>25827/1:        brk(0x1006D66E0)                                = 0
>25827/1:        brk(0x1006D66E0)                                = 0
>25827/1:        brk(0x1006DA6E0)                                = 0
>25827/1:        stat("/tmp/slapd.d/cn=config", 0xFFFFFFFF7FFFE7E8) = 0
>25827/1:        stat("/tmp/slapd.d/cn=config/cn=schema.ldif",
>0xFFFFFFFF7FFFE7E8) Err#2 ENOENT
>25827/1:        open("/tmp/slapd.d/cn=config/cn=schema.ldif",
>O_WRONLY|O_CREAT|O_TRUNC, 0600) = 8
>25827/1:        brk(0x1006DA6E0)                                = 0
>25827/1:        brk(0x1006E66E0)                                = 0
>25827/1:        write(8, " d n :   c n = s c h e m".., 48033)   = 48033
>...etc.
>
>
>I'll have to post more debugging info on another day...
>

-- 
Eric Irrgang - UT Austin ITS Unix Systems - (512)475-9342