[pkg-bacula-devel] Bug#930931: /usr/sbin/btape: btape crashes on "fill" test with kernel panic

Sebastian Suchanek sebastian.suchanek at gmx.de
Sat Jun 22 18:58:04 BST 2019


Package: bacula-sd
Version: 9.4.2-1~bpo9+1
Severity: normal
File: /usr/sbin/btape

Dear Maintainer,

running a "fill" test in btape on a HP LTO-5 (type: BRSLA-0901-DC)
results in a kernel panic.
What I did:

- Put a cartridge in the drive
- Run btape from console: "btape -c /etc/bacula/bacula-sd.con /dev/nst1"
- Start "fill" test within btape
- btape writes the name of the volume to the tape, then crashes
  immediately with a kernel panic.

Output from btape:

--------------------------------------------------------------------
[...]
Mount blank Volume on device "LTO4-Drive-1" (/dev/nst0) and press return
when ready:
btape: btape.c:3073-0
Wrote Volume label for volume "TestVolume1".
Wrote Start of Session label.
15:29:11 Begin writing Bacula records to tape ...
Bacula interrupted by signal 11: Segmentation violation
Kaboom! btape, btape got signal 11 - Segmentation violation at
01-Jun-2019 15:29:11. Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/btape 11716 /tmp
bsmtp: bsmtp.c:122-0 Fatal malformed reply from localhost: 501 <root>:
sender address must contain a domain
The btraceback call returned 1
LockDump: /tmp/bacula.11716.traceback
btape: lockmgr.c:1221-0 lockmgr disabled
btape: smartall.c:400-0 Orphaned buffer: btape 100024 bytes at
561ca92294a8 from btape.c:2246
/usr/sbin#

--------------------------------------------------------------------


So far, this behaviour has been 100% reproducible.

Here is a Bacula backtrace file from a crash:
--------------------------------------------------------------------

[New LWP 13970]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f4654653b5a in __waitpid (pid=14087, stat_loc=0x7ffd8f0e1d6c,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
29	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
$1 = 1244475954
$2 = 0x7f4654aceb00 <my_name> "btape"
$3 = 1392275832
$4 = 1392275896
$5 = 0
$6 = 0
$7 = 1418438265
$8 = 1418438234
$9 = 1418438227
$10 = 1418438261
$11 = 1701276020
$12 = 1418438254
Environment variable "TestName" not defined.
#0  0x00007f4654653b5a in __waitpid (pid=14087, stat_loc=0x7ffd8f0e1d6c,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007f46548a3c9f in signal_handler () from
/usr/lib/bacula/libbac-9.4.2.so
#2  <signal handler called>
#3  0x0000561a5264919e in fillcmd () at btape.c:2387
#4  0x0000561a526410cb in do_tape_cmds () at btape.c:2945
#5  main (margc=<optimized out>, margv=<optimized out>) at btape.c:309

Thread 2 (Thread 0x7f46526b9700 (LWP 13970)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007f46548adf01 in watchdog_thread () from
/usr/lib/bacula/libbac-9.4.2.so
#2  0x00007f465464a4a4 in start_thread (arg=0x7f46526b9700) at
pthread_create.c:456
#3  0x00007f465400ad0f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7f4655155740 (LWP 13967)):
#0  0x00007f4654653b5a in __waitpid (pid=14087, stat_loc=0x7ffd8f0e1d6c,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007f46548a3c9f in signal_handler () from
/usr/lib/bacula/libbac-9.4.2.so
#2  <signal handler called>
#3  0x0000561a5264919e in fillcmd () at btape.c:2387
#4  0x0000561a526410cb in do_tape_cmds () at btape.c:2945
#5  main (margc=<optimized out>, margv=<optimized out>) at btape.c:309
#0  0x00007f4654653b5a in __waitpid (pid=14087, stat_loc=0x7ffd8f0e1d6c,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
29	in ../sysdeps/unix/sysv/linux/waitpid.c
resultvar = 18446744073709551104
sc_cancel_oldtype = 0
#1  0x00007f46548a3c9f in signal_handler () from
/usr/lib/bacula/libbac-9.4.2.so
No symbol table info available.
#2  <signal handler called>
No locals.
#3  0x0000561a5264919e in fillcmd () at btape.c:2387
2387	btape.c: No such file or directory.
rec = {link = {next = 0x0, prev = 0x0}, StreamLen = 0, FileOffset = 0,
StartAddr = 0, Addr = 0, VolSessionId = 0, VolSessionTime = 0, FileIndex
= 0, Stream = 0, last_FI = 0, last_Stream = 0, maskedStream = 0,
data_len = 32768, remainder = 0, adata_remainder = 0, remlen = 0,
data_bytes = 0, state_bits = 0, RecNum = 0, BlockNumber = 0, invalid =
false, wstate = st_none, rstate = st_none, bsr = 0x0, data =
0x561a52fd04c0
"\267\023\030\224\023^J$\276\020h\363>*\370\354\351!E}RNG>^n\320N6\037t\017_݆\354.\t-uJ\016\346\206\340i#\336\363w\356i\026\266?\034\232\353>\022\263y\t\342\061w\306m\266P\346\v\345k\271,\205<XPO\252\357\377\371\070\206\360\374\002\222\323\350\061\321\067\006[\246W|\225\251\226\310\331v\035\254\321\320`\217Mة\354\232\370\245\252\376\071\211\326\060;\325\344\063\333\343\311\350)\222T\351-5`sjM\257\067\375\204?\205-\317\366v\337j\025
\370\213\207TD
\240?\257N\372c\342ËŠh\370\033\026K#ß±\346Ö¥\006\064\276Ýš\276g\325\034\023
\305u\033`f"..., VolumeName = 0x0, match_stat = 0, last_VolSessionId =
0, last_VolSessionTime = 0, last_FileIndex = 0}
block = 0x561a52fcb440
ec1 = "\020\000\000\000\000\000\000\000A\000\000\000@\000\000\000\002",
'\000' <repeats 15 times>, "]\000\000\000n", '\000' <repeats 12 times>
ec2 =
"\200+\016\217\375\177\000\000\000\273+TF\177\000\000\000\004\000\000\000\000\000\000
 \205R\032V\000\000\330\060\016\217\375\177\000\000\377\377\377\377\377\377\377\377v8"
buf1 = "12:33:35\000\210", '\000' <repeats 14 times>,
"\231\331\377SF\177\000\000\000\000\000\000\000\000\000\000\027H\371SF\177\000\000\000\306+TF\177\000\000h\r\000\000\000\000\000\000\000y+TF\177\000\000@\204+TF\177\000\000\300u\374R\032V\000\000Q{\211TF\177\000\000\000\000\000"
buf2 =
"pt\374R\032V\000\000\036\000\000\000\000\000\000\000 at +\016\217\375\177\000\000\000ÆR\032V\000\000\000ĆR\032V\000\000\374\302\206R\032V\000\000v8\016\217\375\177\000\000v\"\212TF\177\000\000\304u\374R\032V\000\000\000S\206I;\317\v\212\000\000\000\000\000\000\000\000\374\302\206R\032V\000\000\000ĆR"
write_eof = <optimized out>
rate = <optimized out>
min_block_size = 0
fd = 4
tm = {tm_sec = 35, tm_min = 33, tm_hour = 12, tm_mday = 22, tm_mon = 5,
tm_year = 119, tm_wday = 6, tm_yday = 172, tm_isdst = 1, tm_gmtoff =
7200, tm_zone = 0x561a52fcca70 "CEST"}
#4  0x0000561a526410cb in do_tape_cmds () at btape.c:2945
2945	in btape.c
i = 7
found = false
#5  main (margc=<optimized out>, margv=<optimized out>) at btape.c:309
309	in btape.c
ch = <optimized out>
i = <optimized out>
y32 = 123456789
y64 = 530242871347629333
buf =
"530242871347629333\000\217\375\177\000\000\000\061\016\217\375\177\000\000\220\063cTF\177\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\224\213\365TF\177\000\000\001",
'\000' <repeats 19 times>, "
\000\000\000\250\314\362SF\177\000\000\060\060\016\217\375\177\000\000\232\002\366TF\177\000\000\020\353cTF\177\000\000@\000\000\000\000\000\000\000\000\061\016\217\375\177\000\000\330\060\016\217\375\177",
'\000' <repeats 81 times>...
askdir_handler = {<BtoolsAskDirHandler> = {<AskDirHandler> = {<No data
fields>}, <No data fields>}, <No data fields>}
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#0  0x0000000000000000 in ?? ()
No symbol table info available.
Attempt to dump current JCRs. njcrs=1
threadid=0x7f4655155740 JobId=0 JobStatus=f jcr=0x561a52fc8fc8 name=btape
	use_count=1 killable=0
	JobType=U JobLevel=F
	sched_time=22-Jun-2019 12:33 start_time=01-Jan-1970 01:00
	end_time=01-Jan-1970 01:00 wait_time=01-Jan-1970 01:00
	db=(nil) db_batch=(nil) batch_started=0
List plugins. Hook count=0

--------------------------------------------------------------------


What I did trying to isolate the problem:
- Testing other drives: All btape tests run without problems e.g. on a
  HP LTO-4 drive in an otherwise unchanged setup.
- Using another btape test: The "test" test in btape runs without
  problems, also on the LTO-5 drive.
- Using different software: Writing to the LTO-5 drive with mt and tar
  both works without problems.

Expected behaviour:

btape should not crash with a kernel panic and fully run the "fill"
test. Or, if a crash is inevitable, btape should at least display a
meaningful error message.


-- System Information:
Debian Release: 9.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500,
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-6-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bacula-sd depends on:
ii  bacula-common  9.4.2-1~bpo9+1
ii  libc6          2.24-11+deb9u4
ii  liblzo2-2      2.08-1.2+b2
ii  libstdc++6     6.3.0-18+deb9u1
ii  lsb-base       9.20161125
ii  mtx            1.3.12-10
ii  ucf            3.0036
ii  zlib1g         1:1.2.8.dfsg-5

Versions of packages bacula-sd recommends:
ii  bacula-bscan  9.4.2-1~bpo9+1
ii  mt-st         1.3-1

Versions of packages bacula-sd suggests:
pn  dds2tar    <none>
ii  scsitools  0.12-2.3+b1
ii  sg3-utils  1.42-2

-- no debconf information



More information about the pkg-bacula-devel mailing list