DRBD 8.4 kernel crash when using same resource for 2 minors

Bug #1317833 reported by Dick Tump
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
drbd8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When you use the same resource for 2 minors, it crashes the kernel. Of course you should not do that, though I think it should not crash the kernel. The expected output is just an error message. This makes DRBD resource/minor management more difficult and also kind of dangerous.

DRBD 8.3 does not have this problem, probably because it works a bit different with resources/minors.

Steps to reproduce:
* drbdsetup new-resource test1
* drbdsetup new-minor test1 1 0
* drbdsetup new-minor test1 3 0

It exits showing the message 'Killed'. The kernel log shows some errors and DRBD is not usable anymore. After a short while or when executing other drbdsetup commands, the whole system crashes.

I am not sure whether it's the utils package, or the kernel module.

System info:
Description: Ubuntu 14.04 LTS
Release: 14.04
drbd8-utils version: 2:8.4.4-1ubuntu1
Installed kernel: linux-image-3.13.0-24-generic 3.13.0-24.47

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in drbd8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Bram Klein Gunnewiek (i-bram) wrote :
Download full text (6.1 KiB)

I can confirm this bug and have some additional information. When using a device name as minor number (e.g. /dev/drbdX) drbdsetup gives a correct error:

root@xxxx:~# drbdsetup new-minor r0 /dev/drbd0 0
root@xxxx:~# drbdsetup new-minor r0 /dev/drbd0 1
r0: Failure: (162) Invalid configuration request
additional info from kernel:
minor exists as different volume

When using only the minor number (root@xxxx:~# drbdsetup new-minor r0 1 0) drbdsetup hangs/crashes. The kernel log shows the following:

May 15 11:04:06 testnode1 kernel: [265432.796294] request: minor=0, volume=1; but that minor is volume 0 in r0
May 15 11:04:32 testnode1 kernel: [265458.326351] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
May 15 11:04:32 testnode1 kernel: [265458.328289] IP: [<ffffffff81351b38>] blk_throtl_drain+0x28/0x130
May 15 11:04:32 testnode1 kernel: [265458.329938] PGD d767b067 PUD d7411067 PMD 0
May 15 11:04:32 testnode1 kernel: [265458.331067] Oops: 0000 [#1] SMP
May 15 11:04:32 testnode1 kernel: [265458.331889] Modules linked in: drbd dm_snapshot lru_cache libcrc32c nfsd bridge auth_rpcgss stp nfs_acl llc nfs lockd sunrpc fscache gpio_ich coretemp kvm_intel kvm psmouse serio_raw joydev lpc_ich lp parport ioatdma dca i7core_edac edac_core mac_hid hid_generic usbhid hid e1000e floppy ptp pps_core [last unloaded: drbd]
May 15 11:04:32 testnode1 kernel: [265458.339787] CPU: 4 PID: 22159 Comm: drbdsetup Not tainted 3.13.0-24-generic #47-Ubuntu
May 15 11:04:32 testnode1 kernel: [265458.341696] Hardware name: Supermicro X8STi/X8STi, BIOS 2.0 09/17/10
May 15 11:04:32 testnode1 kernel: [265458.343456] task: ffff88019260dfc0 ti: ffff88009b8b2000 task.ti: ffff88009b8b2000
May 15 11:04:32 testnode1 kernel: [265458.345260] RIP: 0010:[<ffffffff81351b38>] [<ffffffff81351b38>] blk_throtl_drain+0x28/0x130
May 15 11:04:32 testnode1 kernel: [265458.347357] RSP: 0018:ffff88009b8b3b10 EFLAGS: 00010046
May 15 11:04:32 testnode1 kernel: [265458.348636] RAX: 0000000000000000 RBX: ffff88019258e148 RCX: 000000000000b562
May 15 11:04:32 testnode1 kernel: [265458.350641] RDX: 000000000000000e RSI: 0000000000000001 RDI: 0000000000000000
May 15 11:04:32 testnode1 kernel: [265458.352361] RBP: ffff88009b8b3b28 R08: 00000000000172a0 R09: ffff88019fc972a0
May 15 11:04:32 testnode1 kernel: [265458.354080] R10: ffffea0000d90000 R11: ffffffff81340f10 R12: ffff88019258e148
May 15 11:04:32 testnode1 kernel: [265458.355800] R13: ffff8800d7747300 R14: ffff88019258e798 R15: ffff880192180000
May 15 11:04:32 testnode1 kernel: [265458.357521] FS: 00007f18ff858740(0000) GS:ffff88019fc80000(0000) knlGS:0000000000000000
May 15 11:04:32 testnode1 kernel: [265458.359618] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
May 15 11:04:32 testnode1 kernel: [265458.361043] CR2: 0000000000000028 CR3: 00000000d5c44000 CR4: 00000000000007e0
May 15 11:04:32 testnode1 kernel: [265458.362797] Stack:
May 15 11:04:32 testnode1 kernel: [265458.363282] ffff88019258e148 0000000000000001 ffff88019258e7a8 ffff88009b8b3b38
May 15 11:04:32 testnode1 kernel: [265458.365152] ffffffff8134eb7e ffff88009b8b3b68 ffffffff81332c84 ffff88019258e148
May 15 11:04:32 testnode1 kernel: [265458...

Read more...

Revision history for this message
Dick Tump (dicktump) wrote :

I have done a bit more testing and this also happens with a manually compiled DRBD 8.4.5 and manually compiled drbdsetup, so this bug is probably more something for the DRBD developers to fix. I will address this issue on their mailinglist.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.