From: Jeffrey L. <jtl...@po...> - 2004-03-17 20:15:50
|
On Wed, 2004-03-17 at 03:16, Kern Sibbald wrote: > Hello, > > Hmmm. It is hard to know if the problem is because of the drive or the > 2.6 kernel. In principle, there is no reason for Bacula to die where it > did even if there is a problem with the drive unless something is > *seriously* wrong. I have two suggestions: > > 1. Run Bacula under the debugger again and when it crashes, enter: > > print *rec > print FI_to_ascii(rec->FileIndex) > print stream_to_ascii(rec->Stream, rec->FileIndex) > > I've never tried printing a subroutine call, so the last two may die. If > they do, you might try investigating a bit further. > > 2. Please download the latest 1.33 from the CVS, if possible. If not, > get the latest devel 1.33 tar. Then build (not necessary to install) and > run btape "test" on your tape drive. That should give us more > information on whether or not Bacula should work with your drive. > > Best regards, Kern > > Ok, I downloaded the CVS tree and built it using the same configure options as the debian source package. I then ran the btape test command and it segfaulted soon after running. So I then ran it under GDB, and did a little (inept) poking around. Anything I should look at in particular with GDB? Here's the output from btape under gdb: Many thanks for the help, Kern! -- Jeff -----[snip]----- (gdb) run -c /etc/bacula/bacula-sd.conf /dev/nst0 Starting program: /home/jtlayton/svn/bacula/src/stored/btape -c /etc/bacula/bacula-sd.conf /dev/nst0 [New Thread 1076171424 (LWP 31369)] Tape block granularity is 1024 bytes. btape: butil.c:146 Using device: /dev/nst0 for writing. btape: btape.c:305 open_dev /dev/nst0 OK *test === Write, rewind, and re-read test === I'm going to write 1000 records and an EOF then write 1000 records and an EOF, then rewind, and re-read the data to verify that it is correct. This is an *essential* feature ... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1076171424 (LWP 31369)] write_block_to_dev(DCR*, DEV_BLOCK*) (dcr=0x0, block=0x80a4498) at block.c:377 377 JCR *jcr = dcr->jcr; Current language: auto; currently c++ (gdb) thread apply all bt Thread 1 (Thread 1076171424 (LWP 31369)): #0 write_block_to_dev(DCR*, DEV_BLOCK*) (dcr=0x0, block=0x80a4498) at block.c:377 #1 0x0804be55 in write_read_test () at btape.c:751 #2 0x0804d6de in testcmd () at btape.c:1270 #3 0x0805094d in do_tape_cmds () at btape.c:2418 #4 0x0804a536 in main (margc=0, margv=0xbffffbe0) at btape.c:241 (gdb) print *dcr Cannot access memory at address 0x0 (gdb) print *block $1 = {next = 0x0, dev = 0x80a3d88, binbuf = 64448, block_len = 64512, buf_len = 64512, BlockNumber = 0, read_len = 0, VolSessionId = 0, VolSessionTime = 0, read_errors = 0, BlockVer = 2, write_failed = false, block_read = false, FirstIndex = 0, LastIndex = 0, bufp = 0x80b40c8 'U' <repeats 64 times>, "%", buf = 0x80a4508 'U' <repeats 24 times>} (gdb) |