Weird SIGSEGV

Weird SIGSEGV

Post by Robert Budzyns » Fri, 23 May 1997 04:00:00



Hi everyone,

There was a thread going around comp.os.linux.* recently, about weird
cases and causes of sig11. I've got one right now that's really odd,
and it has deactivated my usenet micro-spool at home. Here are some
details:

I use C-news to manage the spool (does anyone else anymore?), and it
includes a little util called dbz, which is used to update the article
history database index. A few days ago, dbz started segfaulting on
each and every invocation. This has no relation to any change in
hardware or system software, as there has been none. To the extent
that I can interpret the output of strace(1), dbz is segfaulting in a
repeatable fashion, while still in the stage of initializing libc
routines. Anyway, see for yourself - the last few lines of output from
"strace dbz history":

--- output pasted in
brk(0)                                  = 0x80042a0
brk(0x80042c0)                          = 0x80042c0
brk(0x8005000)                          = 0x8005000
open("/usr/share/locale/C/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat("/etc/locale/C/libc.cat", 0xbffff890) = -1 ENOENT (No such file
or directory)
stat("/usr/lib/locale/C/libc.cat", 0xbffff890) = -1 ENOENT (No such
file or directory)
stat("/usr/lib/locale/libc/C", 0xbffff890) = -1 ENOENT (No such file
or directory)
stat("/usr/share/locale/C/libc.cat", 0xbffff890) = -1 ENOENT (No such
file or directory)
stat("/usr/local/share/locale/C/libc.cat", 0xbffff890) = -1 ENOENT (No
such file or directory)
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
--- output pasted in ends here

All this stuff looks exactly the same every time, no matter what
(valid) options or arguments I invoke dbz with - except when the
invocation leads to printing usage and exiting, then it succeeds
(i.e., no SIGSEGV).

Here's some extra info:

identity:~$ ldd `which dbz`
        libgdbm.so.2 => /usr/lib/libgdbm.so.2.0.0
        libc.so.5 => /lib/libc.so.5.3.12
identity:~$ uname -a
Linux identity 2.0.28 #1 Mon Feb 3 01:22:46 MET 1997 i386

My Cnews came from a binary Slackware package, like most of the
system. It worked fine for several weeks, until one day newsrun failed
to complete unpacking the current incoming batches. After poking
around a little (I know the absolutely bare minimum about the inner
workings of Cnews), I discovered that the reason all new incoming
batches were being sent into /var/spool/news/in.coming/bad/ was that
Cnews refuses to process batches if it can't open the history
database. The history index had gotten trashed somehow, and updating
or rebuilding it uses dbz. So there.

I must add that I have never had any of those sig11 woes in about 2
years of running Linux on my piece of junk, compiling kernels and
large software packages and so on.

Please let me know if you have any clue of what's going on.

RJB

--
######################################################################

Robert J. Budzynski
Institute of Theoretical Physics
Warsaw University
Warsaw, Poland
Home page: <http://info.fuw.edu.pl/~budzynsk/home.html>

######################################################################