Subject: inetd core dumps
To: None <current-users@NetBSD.ORG>
From: Andreas Wrede <andreas@planix.com>
List: current-users
Date: 04/15/1998 20:45:57
After upgrading from 1.3.1 to 1.3E(April 13) w/ UVM inetd dumps core 
together with Amanda's sendbackup program, which is started via a amanda 
daemon from inetd. Both core dumps (sendbackup and inetd) happen at the same 
time and both happen in kernel calls (inetd in select and sendbackup in 
read).  Besides this one, the only other problem I have is ps showing 
31Dec69 as the start time for all processes:

$ gdb /usr/local/libexec/sendbackup sendbackup.core 
Core was generated by `sendbackup'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libm.so.0.1...done.
Reading symbols from /usr/lib/libtermcap.so.0.0...done.
Reading symbols from /usr/lib/libc.so.12.26...done.
#0  0x40098c17 in read ()
(gdb) bt 
#0  0x40098c17 in read ()
#1  0x4257 in start_index (createindex=1, input=6, mesg=11, index=256, 
    cmd=0x2a000 "/sbin/restore -tvf - 2>&1 | sed -e '\ns/^leaf[ \t]*[0-9]*[ \t]*
\\.//\nt\n/^dir[ \t]/ {\ns/^dir[ \t]*[0-9]*[ \t]*\\.//\ns%$%/%\nt\n}\nd\n'")
    at ./sendbackup.c:915
#2  0x4c14 in start_backup (host=0x25000 "woffi", disk=0x24005 "sd0a", 
    level=1, dumpdate=0x2400c "1998:4:11:7:50:24", dataf=6, mesgf=11, indexf=8)
    at ./sendbackup-dump.c:309
#3  0x2985 in main (argc=1, argv=0xefbfde08) at ./sendbackup.c:446
(gdb)

Line 914 in sendbackup.c is the bytes_read = read(0.. line below:

  while(1) {
    char buffer[BUFSIZ], *ptr;
    int bytes_read;
    int bytes_written;
    int just_written;      
 
    bytes_read = read(0, buffer, sizeof(buffer));


$ gdb /usr/sbin/inetd inetd.core 
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-netbsd), Copyright 1996 Free Software Foundation, Inc...
(no debugging symbols found)...
Core was generated by `inetd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libwrap.so.0.0...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libc.so.12.26...(no debugging symbols found)...
done.
#0  0x40048333 in select ()
(gdb) bt
#0  0x40048333 in select ()
#1  0x1b95 in main ()
(gdb)

I'll recompile with -g if that helps.

BTW, the amanda version is 2.4.0.

-- 
Andreas Wrede              Planix, Inc.
andreas@planix.com         Networking, System Administration, Consulting
http://www.planix.com      Toronto, Ontario, Canada