zfsonlinux/zfs — Issue #541: " zfs: allocating allocated segment" with logbias=throughput
Author: maxximino
Created: 2012-01-23 20:29:07+00:00
State: open

Steps to reproduce:
1) create a dataset with compression=gzip and logbias=througput
2) debootstrap wheezy into that dataset
3) chroot into it and open aptitude
4) when it tries to rebuilds cache (/var/cache/apt/*bin), hangs and on kernel log:

[ 287.074252] zfs: allocating allocated segment(offset=816155484672 size=16896)
[ 287.074312] SPLError: 1966:0:(spl-err.c:48:vpanic()) SPL PANIC
[ 287.074366] SPL: Showing stack for process 1966
[ 287.074368] Pid: 1966, comm: z_fr_iss/4 Tainted: P 3.1.10 #1
[ 287.074370] Call Trace:
[ 287.074386] [] spl_debug_dumpstack+0x27/0x50 [spl]
[ 287.074390] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074396] [] ? spl_debug_bug+0x1/0xe0 [spl]
[ 287.074398] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074403] [] ? stp_print_flush+0xc3/0x1e0 [stap_9988]
[ 287.074410] [] ? vpanic+0x1/0x60 [spl]
[ 287.074413] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074415] [] ? opt_pre_handler+0x57/0x90
[ 287.074421] [] ? vcmn_err+0x1/0x60 [spl]
[ 287.074423] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074425] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074427] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074430] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074432] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074434] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074436] [] kretprobe_trampoline_holder+0x9/0x9
[ 287.074439] [] ? try_to_wake_up+0x280/0x280
[ 287.074444] [] ? task_alloc+0x160/0x160 [spl]
[ 287.074447] [] kthread+0x96/0xa0
[ 287.074449] [] kernel_thread_helper+0x4/0x10
[ 287.074451] [] ? kthread_worker_fn+0x190/0x190
[ 287.074453] [] ? gs_change+0xb/0xb
[ 287.074590] SPL: Dumping log to /tmp/spl-log.1327200972.1966

and IO on every pool halts.
After reboot, zdb -b reports leaked space.

resetting logbias to latency solves the problem.

zfs version: https://github.com/zfsonlinux/zfs/commit/ff998d804ff2fec3adc91fd0e78d25998094aca9

I've been able to reproduce the issue on two different machines, on 4 different pools.

I think that it is better to temporarily (until problem gets really fixed) not honour logbias=throughput setting if integrity of space maps is at risk. (and machine needs to be rebooted after that)