[Bug 1230635] New: drbdadm down fails to remove sysfs holder file
https://bugzilla.suse.com/show_bug.cgi?id=1230635 Bug ID: 1230635 Summary: drbdadm down fails to remove sysfs holder file Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: High Availability Assignee: ha-bugs@suse.de Reporter: heming.zhao@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Running "drbdadm down <resource>" after "drbdadm up <resource>", the kernel reports the following error: kernel: drbd r0: Starting worker thread (from drbdsetup [1823]) kernel: drbd r0 tw-2: Starting sender thread (from drbdsetup [1827]) kernel: sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:02.7/0000:08:00.0/virtio7/block/vdb/holders/drbd0' kernel: CPU: 0 PID: 1839 Comm: drbdsetup Tainted: G O 6.10.8-1-default #1 openSUSE Tumbleweed 7b3effbd0ddc20910934ac8e2bc2cc21f703df68 kernel: Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-6-gb1b30830-rebuilt.opensuse.org 04/01/2014 kernel: Call Trace: kernel: <TASK> kernel: dump_stack_lvl+0x5a/0x80 kernel: sysfs_warn_dup.cold+0x17/0x23 kernel: sysfs_do_create_link_sd+0xcf/0xe0 kernel: bd_link_disk_holder+0x185/0x240 kernel: link_backing_dev+0x2e/0x80 [drbd f6474a224ac94443ae95c486efc8f38bf4288598] kernel: drbd_adm_attach+0x229/0x910 [drbd f6474a224ac94443ae95c486efc8f38bf4288598] kernel: ? pskb_expand_head+0x92/0x380 kernel: ? __kmalloc_noprof+0x303/0x440 kernel: ? __pfx_drbd_adm_rename_resource+0x10/0x10 [drbd f6474a224ac94443ae95c486efc8f38bf4288598] kernel: ? genl_family_rcv_msg_attrs_parse.isra.0+0x46/0xf0 kernel: genl_family_rcv_msg_doit+0xdb/0x130 kernel: genl_rcv_msg+0x18d/0x290 kernel: ? __pfx_drbd_adm_attach+0x10/0x10 [drbd f6474a224ac94443ae95c486efc8f38bf4288598] kernel: ? __pfx_genl_rcv_msg+0x10/0x10 kernel: netlink_rcv_skb+0x50/0x100 kernel: genl_rcv+0x28/0x40 kernel: netlink_unicast+0x240/0x370 kernel: netlink_sendmsg+0x21b/0x470 kernel: sock_write_iter+0x190/0x1a0 kernel: vfs_write+0x383/0x430 kernel: ksys_write+0xb1/0xe0 kernel: do_syscall_64+0x82/0x160 kernel: ? locks_remove_flock+0xf0/0x100 kernel: ? mntput_no_expire+0x4a/0x250 kernel: ? __x64_sys_close+0x3c/0x80 kernel: ? kmem_cache_free+0x3d5/0x400 kernel: ? syscall_exit_to_user_mode+0x72/0x220 kernel: ? do_syscall_64+0x8e/0x160 kernel: ? syscall_exit_to_user_mode+0x72/0x220 kernel: ? do_syscall_64+0x8e/0x160 kernel: ? syscall_exit_to_user_mode+0x72/0x220 kernel: ? do_syscall_64+0x8e/0x160 kernel: ? __count_memcg_events+0x58/0xf0 kernel: ? count_memcg_events.constprop.0+0x1a/0x30 kernel: ? handle_mm_fault+0x1f0/0x300 kernel: ? do_user_addr_fault+0x36c/0x620 kernel: ? exc_page_fault+0x73/0x170 kernel: entry_SYSCALL_64_after_hwframe+0x76/0x7e kernel: RIP: 0033:0x7f99ffb069c4 kernel: Code: 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 90 90 80 3d e5 6f 0f 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 48 83 ec 28 48 89 54 24 18 48 kernel: RSP: 002b:00007ffecef5fab8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 kernel: RAX: ffffffffffffffda RBX: 0000000000000048 RCX: 00007f99ffb069c4 kernel: RDX: 0000000000000048 RSI: 000055bb58750320 RDI: 0000000000000004 kernel: RBP: 000055bb58750320 R08: 0000000000000000 R09: 0000000000000000 kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000048 kernel: R13: 0000000000000004 R14: 000055bb57e38ed0 R15: 00007ffecef5fb40 kernel: </TASK> kernel: drbd r0/0 drbd0: bd_link_disk_holder("/dev/vdb", ...) failed with -17 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230635 heming zhao <heming.zhao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |glass.su@suse.com, | |zzhou@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230635 https://bugzilla.suse.com/show_bug.cgi?id=1230635#c1 --- Comment #1 from heming zhao <heming.zhao@suse.com> --- root cause is patch bsc1226510-fix-build-err-against-6.9.3.patch is wrong. the patch: - if (handle != nbc->backing_bdev_handle) { - err = link_backing_dev(device, new_disk_conf->meta_dev, handle); + if (file != nbc->backing_bdev_file) { + err = link_backing_dev(device, new_disk_conf->meta_dev, file); should be: - if (handle != nbc->backing_bdev_handle) { - err = link_backing_dev(device, new_disk_conf->meta_dev, handle); + if (file_bdev(file) != nbc->backing_bdev) { + err = link_backing_dev(device, new_disk_conf->meta_dev, file); previous code 'if (file != nbc->backing_bdev_file)' usually can be triggered. i.e.: the 'file' is meta_dev file handle, the backing_bdev_file is another file handle, but they point to same device. previous code will increase sysfs refcnt one more. new code 'file_bdev(file) != nbc->backing_bdev' compares device (not file handle) logic is correct. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230635 https://bugzilla.suse.com/show_bug.cgi?id=1230635#c2 --- Comment #2 from heming zhao <heming.zhao@suse.com> --- after this bug fix patches, drbd reports below cocci info: ------------------- GENPATCHNAMES 6.10.9-1-default APPLIED_COCCI_FILES kvfree_rcu__no_present ------------------- -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1230635 https://bugzilla.suse.com/show_bug.cgi?id=1230635#c3 heming zhao <heming.zhao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from heming zhao <heming.zhao@suse.com> --- The factory has included this bug fix patches, so close this bug as fixed. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com