[OpenAFS-devel] segfault in process.c:savecontext() during lwp init -- how to debug?

Adam Megacz megacz@hcoop.net
Mon, 29 Jun 2009 12:47:16 -0700


Can anybody advise me on how to proceed with debugging here?

I'm getting a segfault in lwp/process.c's savecontext(), which appears
to do some really scary stuff with the stack and setjmp()/longjmp().
This happens during the lwp init.  Has anybody seen this before?

  (gdb) bt
  #0  0xb7df69eb in savecontext () from /lib/libnss_afs.so.2
  #1  0xb7df6687 in LWP_CreateProcess () from /lib/libnss_afs.so.2
  #2  0xb7df7586 in IOMGR_Initialize () from /lib/libnss_afs.so.2
  #3  0xb7df5984 in rxi_InitializeThreadSupport () from /lib/libnss_afs.so.2
  #4  0xb7dee5d1 in rx_InitHost () from /lib/libnss_afs.so.2
  #5  0xb7dee819 in rx_Init () from /lib/libnss_afs.so.2
  #6  0xb7dcea44 in pr_Initialize () from /lib/libnss_afs.so.2
  #7  0xb7dcd384 in init_afs () from /lib/libnss_afs.so.2
  #8  0xb7dcdba2 in _nss_afs_getpwnam_r () from /lib/libnss_afs.so.2
  #9  0xb7eb5ca2 in getpwnam_r () from /lib/i686/cmov/libc.so.6
  #10 0xb7eb5717 in getpwnam () from /lib/i686/cmov/libc.so.6
  #11 0x08049d87 in ?? ()
  #12 0xbfe81eaf in ?? ()
  #13 0xbfe81350 in ?? ()
  #14 0x0000000a in ?? ()
  #15 0x00000050 in ?? ()
  #16 0x00000000 in ?? ()

  (gdb) i shared
  From        To          Syms Read   Shared Object Library
  0xb7f7e7f0  0xb7f93ddf  Yes         /lib/ld-linux.so.2
  0xb7e31230  0xb7f3fa66  Yes         /lib/i686/cmov/libc.so.6
  0xb7dccca0  0xb7dfc524  Yes         /lib/libnss_afs.so.2
  0xb7da4130  0xb7db2a48  Yes         /lib/i686/cmov/libnsl.so.1
  0xb7d8f140  0xb7d9ace8  Yes         /lib/i686/cmov/libresolv.so.2
  0xb7d828d0  0xb7d89ec8  Yes         /lib/i686/cmov/libnss_files.so.2
  0xb7d7bb90  0xb7d7e7c8  Yes         /lib/i686/cmov/libnss_dns.so.2

Any advice is appreciated.  Thanks!

  - a