[DRBD-user] Kernel panic

Lars Ellenberg lars.ellenberg at linbit.com
Wed Oct 1 11:38:09 CEST 2008

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


On Wed, Oct 01, 2008 at 10:00:29AM +0200, Peter Sabaini wrote:
> On Tuesday 30 September 2008 17:28:30 Lars Ellenberg wrote:
> > On Tue, Sep 30, 2008 at 04:48:24PM +0200, Peter Sabaini wrote:
> > > Hi,
> > >
> > > Problem: while configured as a slave that slave crashed (during writing
> > > on the master) with a kernel panic. We only managed to get a screenshot
> > > from the machine, and the DRBD module seems to be involved:
> > > http://download.ehealth-systems.at/25092008195.jpg
> > >
> > > This is a HP proliant DL385 running kernel 2.6.22.12 with VServer patches
> > > vs2.2.0.5; DRBD module and userland is v8.2.5
> > >
> > > I'm currently checking the hardware and trying to reproduce this, but in
> > > the meantime -- has anyone had problems like this?
> >
> > yes.
> > fixed in git:
> >
> > 
> > http://git.drbd.org/?p=drbd-8.2.git;a=commitdiff;h=bac93c1ffdd5a090e05c22b6
> >ca1f7a53741ad09f
> 
> Hm, one more question: do you think it'd be a problem if we just applied that 
> patch to 8.2.5 and recompile, while 8.2.7 isn't out?

8.2.6 is out.
8.2.6 plus below patch is the best I can give you now.

on the way to 8.2.7, there is some more bugfixes,
but those include code restructuring, which need more testing.

diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index be69365..d14cb6f 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -2564,7 +2564,7 @@ STATIC void drbd_cleanup(void)
 
 	if (minor_table) {
 		if (drbd_proc)
-			remove_proc_entry("drbd", &proc_root);
+			remove_proc_entry("drbd", NULL);
 		i = minor_count;
 		while (i--) {
 			struct drbd_conf        *mdev  = minor_to_mdev(i);
@@ -2786,7 +2786,7 @@ int __init drbd_init(void)
 	/*
 	 * register with procfs
 	 */
-	drbd_proc = create_proc_entry("drbd",  S_IFREG | S_IRUGO , &proc_root);
+	drbd_proc = create_proc_entry("drbd",  S_IFREG | S_IRUGO , NULL);
 
 	if (!drbd_proc)	{
 		printk(KERN_ERR "drbd: unable to register proc file\n");
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 71e7601..5544c35 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -3454,6 +3454,8 @@ STATIC int got_OVResult(struct drbd_conf *mdev, struct Drbd_Header* h)
 	sector = be64_to_cpu(p->sector);
 	size = be32_to_cpu(p->blksize);
 
+	update_peer_seq(mdev, be32_to_cpu(p->seq_num));
+
 	if (be64_to_cpu(p->block_id) == ID_OUT_OF_SYNC) {
 		drbd_ov_oos_found(mdev, sector, size);
 	} else ov_oos_print(mdev);
@@ -3462,7 +3464,7 @@ STATIC int got_OVResult(struct drbd_conf *mdev, struct Drbd_Header* h)
 	dec_rs_pending(mdev);
 
 	if (--mdev->ov_left == 0) {
-		w = kmalloc(sizeof(w), GFP_KERNEL);
+		w = kmalloc(sizeof(*w), GFP_KERNEL);
 		if (w) {
 			w->cb = w_ov_finished;
 			drbd_queue_work_front(&mdev->data.work, w);
diff --git a/user/drbdsetup.c b/user/drbdsetup.c
index 2860e20..b81f78f 100644
--- a/user/drbdsetup.c
+++ b/user/drbdsetup.c
@@ -45,6 +45,7 @@
 #include <sys/time.h>
 #include <time.h>
 
+#define __bitwise // Buildfix for broken RHEL4 kernels (2.6.9_78.0.1)
 #include <linux/netlink.h>
 #include <linux/connector.h>
 

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list