[DRBD-user] Kernel panic when using drbd together with dlm

Vladislav Bogdanov bubble at hoster-ok.com
Tue Aug 31 16:55:22 CEST 2010

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

31.08.2010 17:40, Lars Ellenberg wrote:
> On Mon, Aug 30, 2010 at 05:25:45PM +0300, Vladislav Bogdanov wrote:
>> Hi all,
>> Further analysis show the following:
>> This corresponds to
>> fs/ioctl.c
>> static long vfs_ioctl(struct file *filp, unsigned int cmd,
>> unsigned long arg)
>> ...
>>         if (filp->f_op->unlocked_ioctl) {
>>                 error = filp->f_op->unlocked_ioctl(filp, cmd, arg);
>> ...
>> socket.c:
>> static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
>> ...
>> net = sock_net(sk);
>> ...
>> include/net/sock.h:
>> static inline
>> struct net *sock_net(const struct sock *sk)
>> {
>> ...
>>         return sk->sk_net;
>> ...
>> }
>> From what I understand, that means that drbdadm issues some ioctl at the
>> vfs level, which somehow leads to sock_ioctl() call which in turn
>> fails because it isn't supposed to be called for vfs. This could mean
>> that filp->f_op->unlocked_ioctl() is set incorrectly to sock_ioctl.
>> And this means that actual problem is somewhere in kernel, but is
>> rises only after some magic ioctl call from drbdadm.
>> Can anybody from DRBD devs look at this issue?
> The only ioctls that drbdadm explicitly uses are from
> drbdadm_main.c: get_ifreq(), SIOCGIFCONF and SIOCGIFFLAGS,
> on a socketfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP).
> I have no idea why that would trigger your BUG.
> It may or may not be related to drbdadm being "spawned" from kernel
> space via call_usermodehelper().

This could also be some indirect (glibc) ioctl call. Anyways, it seem to
be fault of modern kernels solely, not DRBD in any way.
I replaced kernel with one from Fedora11 updates (, it doesn't
seem to be affected by this bug. All Fedora13 kernels, and latest
Fedora12 kernel are affected.

I can live with that, contains all features I actually need.

I will do extensive testing in next few days to know for sure and then
setup testing environment in virtual machines on that physical hosts to
play more with various kernels.


More information about the drbd-user mailing list