No subject


Tue Jan 23 13:55:44 CET 2018


3772 #ifdef blk_queue_plugged
3773         q->queue_lock = &resource->req_lock; /* needed since we use */
3774         /* plugging on a queue, that actually has no requests! */
3775         q->unplug_fn = drbd_unplug_fn;
3776 #endif

drbdsetup attach leads to spin_lock(NULL):

/usermode_compat/src/usermode_lib.h:1098:19: runtime error: member access within null pointer of type 'struct spinlock_t'
Thread 5 "netlink_recv" received signal SIGSEGV, Segmentation fault.
(gdb)
(gdb) bt
#0  __GI___pthread_mutex_trylock (mutex=0x8) at ../nptl/pthread_mutex_trylock.c:41
#1  0x0000555555c2994a in _spin_lock_try (lock=0x0, whence=0x555555e99859 "drbd_nl.c:1951") at usermode_compat/src/usermode_lib.h:1098
#2  0x0000555555c2a070 in _spin_lock (lock=0x0, whence=0x555555e99859 "drbd_nl.c:1951") at usermode_compat/src/usermode_lib.h:1125
#3  0x0000555555c60f73 in blk_queue_flag_clear (flag=4294967295, q=0x7fff6400c800) at drbd_nl.c:1951
#4  0x0000555555c613c9 in decide_on_discard_support (device=0x7fff6401c400, q=0x7fff6400c800, b=0x5555562374c0, discard_zeroes_if_aligned=true) at drbd_nl.c:1987
#5  0x0000555555c6196d in drbd_setup_queue_param (device=0x7fff6401c400, bdev=0x7fff6405d400, max_bio_size=1048576, o=0x0) at drbd_nl.c:2115
#6  0x0000555555c62194 in drbd_reconsider_queue_parameters (device=0x7fff6401c400, bdev=0x7fff6405d400, o=0x0) at drbd_nl.c:2143
#7  0x0000555555c710b0 in drbd_adm_attach (skb=0x7fff64037d40, info=0x7ffff5626460) at drbd_nl.c:3042
#8  0x0000555555e33586 in genl_rcv_msg (skb=0x7fff64037d40, nlh=0x7fff6405f000) at UMC_genl.c:566
#9  0x0000555555e33cfa in netlink_rcv_skb (skb=0x7fff64037d40, cb=0x555555e32e99 <genl_rcv_msg>) at UMC_genl.c:618
#10 0x0000555555e33ef9 in genl_rcv (skb=0x7fff64037d40) at UMC_genl.c:639
#11 0x0000555555e2d78b in on_netlink_recv (sk=0x555556233098, len=0) at usermode_lib.c:994
#12 0x0000555555e2b9dc in UMC_sock_recv_event (env=0x555556233000, events=1, err=0) at usermode_lib.c:792
#13 0x00007ffff7f5eec3 in callback_deliver (err=0, arg=1, cb=0x5555562357c0) at mte_event_task.c:128
#14 event_poll_deliver (nevents=<optimized out>, events=<optimized out>) at mte_event_task.c:254
#15 event_task_loop (event_task=event_task at entry=0x555556234e00) at mte_event_task.c:741
#16 0x00007ffff7f62d0f in mte_event_task_run (event_task=0x555556234e00) at mte_event_task.c:860
#17 0x0000555555e2276f in UMC_irqthread_fn (v_irqthread=0x555556233a00) at usermode_lib.c:187
#18 0x00007ffff7f4cc05 in sys_thread_fn (env=<optimized out>) at mte_service.c:145
#19 0x00007ffff757d182 in start_thread (arg=<optimized out>) at pthread_create.c:486
#20 0x00007ffff74a6b1f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Nice to be able to use valgrind and gdb and libubsan!


More information about the drbd-dev mailing list