[DRBD-user] Help: NULL pointer exception in drbd_new_device() (SOLVED)

Nitin Mehrotra nmehrotra at riorey.com
Tue Apr 14 22:44:36 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


For what it's worth the problem appears to be caused by new (?) SLUB 
optimization. Not sure if it's processor related since I'm running a 
x86_64 arch system on a Xeon 5482. Anyway, the problem is solved by 
disabling this optimization as described here - 
http://lkml.org/lkml/2008/2/19/13.

Nitin

Nitin Mehrotra wrote:
> Hello folks,
>
> I am evaluating DRBD for a possible application and am trying to test a 
> simple configuration consisting of one mirrored partition on two m/c. My 
> platform is a fairly vanilla gentoo system.
>
> uname -a
> Linux m-1 2.6.27-gentoo-r7 #4 SMP Mon Jan 5 23:57:52 UTC 2009 x86_64 
> Intel(R) Xeon(R) CPU X5482 @ 3.20GHz GenuineIntel GNU/Linux
>
> The relevant section of my drbd.conf is as follows:
>
>   on m-1 {
>     device     /dev/drbd0;
>     disk       /dev/sda5;
>     address    192.1.1.19:7788;
>     meta-disk  internal;
>   }
>
>   on m-2 {
>     device     /dev/drbd0;
>     disk       /dev/sda5;
>     address    192.1.1.18:7788;
>     meta-disk  internal;
>    }
>
> The rest of the file is unchanged from the sample provided in 8.0.x. I 
> originally was using the standard drbd gentoo package, when that didn't 
> work I downloaded and installed the latest drbd. Both fail. My steps so 
> far have been to 1) install drbd, 2) load the drbd module 3) create the 
> metadata and 4) try and attach the resource. This step fails as follows:
>
> No response from the DRBD driver! Is the module loaded?
> Command 'drbdsetup /dev/drbd0 disk /dev/sda5 /dev/sda5 internal 
> --set-defaults --create-device --on-io-error=pass_on' terminated with 
> exit code 20
> drbdadm aborting
>
> dmesg  gives:
> [   69.430325] drbd: initialised. Version: 8.3.1 (api:88/proto:86-89)
> [   69.430329] drbd: GIT-hash: fd40f4a8f9104941537d1afc8521e584a6d3003c 
> build by root at lan-10, 2009-04-12 23:38:31
> [   69.430332] drbd: registered as block device major 147
> [   69.430334] drbd: minor_table @ 0xffff8804295dfd00
> [   73.069568] BUG: unable to handle kernel NULL pointer dereference at 
> 0000000000000000
> [   73.070121] IP: [<ffffffff8109f532>] kmem_cache_alloc+0x29/0x7c
> [   73.070426] PGD 426117067 PUD 425062067 PMD 0
> [   73.070434] Oops: 0000 [1] SMP
> [   73.070434] CPU 3
> [   73.070434] Modules linked in: drbd rdma_ucm ib_ucm rdma_cm iw_cm 
> ib_addr ib_ipoib ib_cm ib_sa ib_uverbs ib_umad ib_ipath mlx4_en mlx4_ib 
> ib_mthca ib_mad ib_core mlx4_core e1000e
> [   73.070434] Pid: 222, comm: cqueue Not tainted 2.6.27-gentoo-r7 #4
> [   73.070434] RIP: 0010:[<ffffffff8109f532>]  [<ffffffff8109f532>] 
> kmem_cache_alloc+0x29/0x7c
> [   73.070434] RSP: 0018:ffff88042e543dc0  EFLAGS: 00010086
> [   73.070434] RAX: 0000000000000003 RBX: 0000000000000286 RCX: 
> ffffffffa014910e
> [   73.070434] RDX: 0000000000000000 RSI: 00000000000080d0 RDI: 
> ffffffff8170b780
> [   73.070434] RBP: ffff88042e543de0 R08: ffff88042e542000 R09: 
> ffff88042e543e40
> [   73.070434] R10: 0000000000000000 R11: 0000000000000246 R12: 
> 00000000000080d0
> [   73.070434] R13: 0000000000000000 R14: 0000000000000000 R15: 
> 0000000000000000
> [   73.070434] FS:  0000000000000000(0000) GS:ffff88042e42e880(0000) 
> knlGS:0000000000000000
> [   73.070434] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> [   73.070434] CR2: 0000000000000000 CR3: 000000042507f000 CR4: 
> 00000000000006e0
> [   73.070434] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 
> 0000000000000000
> [   73.070434] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 
> 0000000000000400
> [   73.070434] Process cqueue (pid: 222, threadinfo ffff88042e542000, 
> task ffff88042e53b2c0)
> [   73.070434] Stack:  ffff88042e53b2f8 ffff8804250258a0 
> 0000000000000000 0000000000000000
> [   73.070434]  ffff88042e543e20 ffffffffa014910e ffff880028061330 
> ffff8804250258a0
> [   73.070434]  ffff8804284f8824 0000000000000000 ffff8804284f8824 
> 0000000000000000
> [   73.070434] Call Trace:
> [   73.070434]  [<ffffffffa014910e>] drbd_new_device+0x28/0x217 [drbd]
> [   73.070434]  [<ffffffffa014b508>] ensure_mdev+0x41/0xb4 [drbd]
> [   73.070434]  [<ffffffffa014d518>] drbd_connector_callback+0x3e/0x1ae 
> [drbd]
> [   73.070434]  [<ffffffff812151df>] cn_queue_wrapper+0x15/0x34
> [   73.070434]  [<ffffffff812151ca>] ? cn_queue_wrapper+0x0/0x34
> [   73.070434]  [<ffffffff81044a8f>] run_workqueue+0x7c/0x105
> [   73.070434]  [<ffffffff810454a5>] worker_thread+0xd8/0xe5
> [   73.070434]  [<ffffffff81047f7f>] ? autoremove_wake_function+0x0/0x38
> [   73.070434]  [<ffffffff810453cd>] ? worker_thread+0x0/0xe5
> [   73.070434]  [<ffffffff81047e4f>] kthread+0x49/0x76
> [   73.070434]  [<ffffffff8100ce99>] child_rip+0xa/0x11
> [   73.070434]  [<ffffffff81047e06>] ? kthread+0x0/0x76
> [   73.070434]  [<ffffffff8100ce8f>] ? child_rip+0x0/0x11
> [   73.070434]
> [   73.070434]
> [   73.070434] Code: f0 c3 55 48 89 e5 41 55 41 54 41 89 f4 53 48 83 ec 
> 08 48 8b 4d 08 9c 5b fa 65 8b 04 25 24 00 00 00 48 98 48 8b 94 c7 f0 02 
> 00 00 <48> 8b 32 44 8b 6a 18 48 85 f6 75 13 49 89 d0 44 89 e6 83 ca ff
> [   73.070434] RIP  [<ffffffff8109f532>] kmem_cache_alloc+0x29/0x7c
> [   73.070434]  RSP <ffff88042e543dc0>
> [   73.070434] CR2: 0000000000000000
> [   73.070434] ---[ end trace 6bdaefd361f12077 ]---
>
> I'm not sure what's going on. I can't find drbd_new_device() in the 
> source so I can't debug this any further. Any help would be much 
> appreciated. Note, I only have mc-1 at this point since I do want to 
> verify that the system can initialize without the peer being present.
>
> Thanks,
>
> Nitin
> nmehrotra AT riorey.com
>
> fyi, for what it's worth the partition I am using is as follows:
>
> Disk /dev/sda: 62.9 GB, 62999494656 bytes
> 255 heads, 63 sectors/track, 7659 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x000e1224
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1        1314    10554673+  83  Linux
> /dev/sda2            1315        6796    44034165    5  Extended
> /dev/sda5            1315        1379      522081   83  Linux
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.287 / Virus Database: 270.11.54/2055 - Release Date: 04/12/09 13:14:00
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090414/1c17893c/attachment.htm>


More information about the drbd-user mailing list