More data on segfaulting problem

Matthew Dillon dillon at apollo.backplane.com
Sun May 1 09:36:59 PDT 2005


    I think you must have caught it before Joerg fixed the errno issue
    that occured when errno became a TLS variable.

    When access() fails it tries to set errno via TLS, and the TLS
    segment has not been set.

    Try recompiling your rtld-elf with the latest code.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>


:Again using groff as the guinea pig I got this kdump.  I hope
:it will shed some light:
:
: 75168 ktrace   RET   ktrace 0
: 75168 ktrace   CALL  execve(0xbfbff7a0,0xbfbffcec,0xbfbffcf4)
: 75168 ktrace   NAMI  "/sbin/groff"
: 75168 ktrace   RET   execve -1 errno 2 No such file or directory
: 75168 ktrace   CALL  execve(0xbfbff7a0,0xbfbffcec,0xbfbffcf4)
: 75168 ktrace   NAMI  "/bin/groff"
: 75168 ktrace   RET   execve -1 errno 2 No such file or directory
: 75168 ktrace   CALL  execve(0xbfbff7a0,0xbfbffcec,0xbfbffcf4)
: 75168 ktrace   NAMI  "/usr/sbin/groff"
: 75168 ktrace   RET   execve -1 errno 2 No such file or directory
: 75168 ktrace   CALL  execve(0xbfbff7a0,0xbfbffcec,0xbfbffcf4)
: 75168 ktrace   NAMI  "/usr/bin/groff"
: 75168 ktrace   NAMI  "/usr/libexec/ld-elf.so.1"
: 75168 groff    RET   execve 0
: 75168 groff    CALL  mmap(0,0xbb0,0x3,0x1000,0xffffffff,0,0,0)
: 75168 groff    RET   mmap 671563776/0x28074000
: 75168 groff    CALL  munmap(0x28074000,0xbb0)
: 75168 groff    RET   munmap 0
: 75168 groff    CALL  __sysctl(0xbfbffbb8,0x2,0x2806f708,0xbfbffbb4,0,0)
: 75168 groff    RET   __sysctl 0
: 75168 groff    CALL  mmap(0,0x8000,0x3,0x1002,0xffffffff,0,0,0)
: 75168 groff    RET   mmap 671563776/0x28074000
: 75168 groff    CALL  geteuid
: 75168 groff    RET   geteuid 0
: 75168 groff    CALL  getuid
: 75168 groff    RET   getuid 0
: 75168 groff    CALL  getegid
: 75168 groff    RET   getegid 0
: 75168 groff    CALL  getgid
: 75168 groff    RET   getgid 0
: 75168 groff    CALL  open(0x2806b38c,0,0)
: 75168 groff    NAMI  "/var/run/ld-elf.so.hints"
: 75168 groff    RET   open 3
: 75168 groff    CALL  read(0x3,0xbfbffb70,0x80)
: 75168 groff    GIO   fd 3 read 128 bytes
:       "Ehnt\^A\0\0\0\M^@\0\0\0\M^_\0\0\0\0\0\0\0\M^^\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
:	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
:	\0\0\0\0\0\0\0\0\0\0\0\0\0"
: 75168 groff    RET   read 128/0x80
: 75168 groff    CALL  lseek(0x3,0,0x80,0,0)
: 75168 groff    RET   lseek 128/0x80
: 75168 groff    CALL  read(0x3,0x28076100,0x9f)
: 75168 groff    GIO   fd 3 read 159 bytes
:       "/usr/lib:/usr/lib/gcc2:/usr/lib/gcc34:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/lo\
:	cal/lib/kde3:/usr/X11R6/lib/evolution/2.2\0"
: 75168 groff    RET   read 159/0x9f
: 75168 groff    CALL  close(0x3)
: 75168 groff    RET   close 0
: 75168 groff    CALL  access(0x28078000,0)
: 75168 groff    NAMI  "/usr/lib/libstdc++.so.7"
: 75168 groff    RET   access -1 errno 2 No such file or directory
: 75168 groff    PSIG  SIGSEGV SIG_DFL
: 75168 groff    NAMI  "groff.core"
:
:
:I notice that when execve can't find a file the error causes no problem, but
:when 'access' can't find a file there's trouble.
:





More information about the Bugs mailing list