Hi,

> So the next step is to make sure amandad and sendsize were compiled
> with -g, get them hung and attach a debugger to them, then get a stack
> traceback ("where") so we can see where they are stopped.

I compiled the whole suite (without amandad.diff, but with make
CFLAGS="-g") and copied client-src/.libs/{amandad,selfcheck} to
/usr/libexec/amanda/.

Using 172 disklist entries of type root-tar:

$ ps x
  PID TTY      STAT   TIME COMMAND
26808 pts/2    S      0:00 -bash
26840 ?        S      0:00 amandad
26847 pts/1    S      0:00 -bash
26842 ?        S      0:00 /usr/libexec/amanda/selfcheck
26874 pts/1    R      0:00 ps x

$ gdb /usr/libexec/amanda/amandad 26840
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or 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.
This GDB was configured as "i386-redhat-linux"...

/var/lib/amanda/26840: No such file or directory.
Attaching to program: /usr/libexec/amanda/amandad, Pid 26840
Reading symbols from /usr/lib/amanda/libamanda-2.4.2p2.so...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /usr/lib/libreadline.so.3...done.
Reading symbols from /lib/libtermcap.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /usr/lib/amanda/libamclient-2.4.2p2.so...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
0x40136af4 in __libc_write () from /lib/libc.so.6
(gdb) where
#0  0x40136af4 in __libc_write () from /lib/libc.so.6
#1  0x401801cc in ?? () from /lib/libc.so.6
#2  0x400a89cb in __libc_start_main (main=0x8048ff0 <main>, argc=1, 
    argv=0xbffffe74, init=0x8048c34 <_init>, fini=0x804ad9c <_fini>, 
    rtld_fini=0x4000aea0 <_dl_fini>, stack_end=0xbffffe6c)
    at ../sysdeps/generic/libc-start.c:92
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/libexec/amanda/amandad, Pid 26840

$ gdb /usr/libexec/amanda/selfcheck 26842
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or 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.
This GDB was configured as "i386-redhat-linux"...

/var/lib/amanda/26842: No such file or directory.
Attaching to program: /usr/libexec/amanda/selfcheck, Pid 26842
Reading symbols from /usr/lib/amanda/libamanda-2.4.2p2.so...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /usr/lib/libreadline.so.3...done.
Reading symbols from /lib/libtermcap.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /usr/lib/amanda/libamclient-2.4.2p2.so...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
0x40136af4 in __libc_write () from /lib/libc.so.6
(gdb) where
#0  0x40136af4 in __libc_write () from /lib/libc.so.6
#1  0x401801cc in ?? () from /lib/libc.so.6
#2  0x400e68a4 in new_do_write (fp=0x4017e960, 
    data=0x4002d000 " access /home/User/info (/home/User/info):
Permission denied]\nERROR [could not access /home/User/ilnu
(/home/User/ilnu): Permission denied]\nERROR [could not access
/home/User/ijk (/home/Us"..., 
    to_do=4096) at fileops.c:328
#3  0x400e6360 in _IO_new_do_write (fp=0x4017e960, 
    data=0x4002d000 " access /home/User/info (/home/User/info):
Permission denied]\nERROR [could not access /home/User/ilnu
(/home/User/ilnu): Permission denied]\nERROR [could not access
/home/User/ijk (/home/Us"..., 
    to_do=4096) at fileops.c:301
#4  0x400e5a1e in _IO_new_file_overflow (f=0x4017e960, ch=-1) at
fileops.c:441
#5  0x400e71a7 in __overflow (f=0x4017e960, ch=-1) at genops.c:197
#6  0x400e60a0 in _IO_new_file_xsputn (f=0x4017e960, data=0x804ce78,
n=69)
    at fileops.c:803
#7  0x400d752c in _IO_vfprintf (s=0x4017e960, format=0x804a9b7 "ERROR
[%s]\n", 
    ap=0xbffffe10) at vfprintf.c:1259
#8  0x400de050 in printf (format=0x804a9b7 "ERROR [%s]\n") at
printf.c:31
#9  0x804a016 in check_disk (program=0x804de30 "GNUTAR", 
    disk=0x804de37 "/home/User/cn", level=0) at selfcheck.c:462
#10 0x8049380 in main (argc=1, argv=0xbfffff24) at selfcheck.c:157
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/libexec/amanda/selfcheck, Pid 26842

Reply via email to