From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Cc: "Tom Brown" <wc-linbit.com@vmail.baremetal.com>,
"Valentin Vidic" <Valentin.Vidic@CARNet.hr>,
"Ivars Strazdiņš" <ivars.strazdins@gmail.com>
Subject: Re: [Drbd-dev] possible FIX [Xen - DRBD issue / panic in skb_copy_bits]
Date: Sun, 14 Jun 2009 05:58:28 +0200 [thread overview]
Message-ID: <20090614035828.GA20436@soda.linbit> (raw)
In-Reply-To: <200906121138.55945.philipp.reisner@linbit.com>
On Fri, Jun 12, 2009 at 11:38:55AM +0200, Philipp Reisner wrote:
> Hi Simon,
>
> As we are currently preparing the next DRBD release, we try to
> fix known issues...
>
> I tried to reproduce, trigger the issue you described in that post:
> http://lists.linbit.com/pipermail/drbd-user/2009-March/011645.html
> I failed to reproduce it, probably because I tried with
> instrumented DRBD code on a recent vanilla kernel.
>
> Howerver, attached is the patch that is intended to fix the issue.
> Can you verify that it really fixes the issue?
It won't. It walks the wrong lists of pages.
But this might fix it.
Though I'm not able to reproduce the problem, the Linbit Xen test setup
apparently does not break. So I cannot confirm it fixed, either.
Please, someone who can reproduce the problem without this patch,
verify and give feedback whether this fixes it.
Thanks,
Lars
commit 9b16e21cba73d93bbe77fa8fcc8d3226a6c8b502
Author: Lars Ellenberg <lars.ellenberg@linbit.com>
Date: Sun Jun 14 05:34:33 2009 +0200
possible fix for XEN crashes on disconnect
Add missing explicit shutdown.
If we just sock_release(), there may still be some socket references
open, and some sendpage pages may be referenced still.
After IO completion from tl_clear(), xen virtio unmaps these pages,
somewhen the last interrupt or deferred network job releases the last
socket reference, at which point the network stack tries to release
the sendpage pages. Since they are already unmapped, it crashes.
Explicit shutdown() is not only correct behaviour, supposedly it also
synchronously gets rid of those sendpage pages first - while they are
still mapped, tl_clear() runs later.
TODO:
add compat wrapper for < 2.6.24 kernel
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 719a5fe..11af592 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -3412,10 +3412,12 @@ void drbd_free_bc(struct drbd_backing_dev *ldev)
void drbd_free_sock(struct drbd_conf *mdev)
{
if (mdev->data.socket) {
+ kernel_sock_shutdown(mdev->data.socket, SHUT_RDWR);
sock_release(mdev->data.socket);
mdev->data.socket = NULL;
}
if (mdev->meta.socket) {
+ kernel_sock_shutdown(mdev->meta.socket, SHUT_RDWR);
sock_release(mdev->meta.socket);
mdev->meta.socket = NULL;
}
--
: 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.
next prev parent reply other threads:[~2009-06-14 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 9:38 [Drbd-dev] Xen - DRBD issue / panic in skb_copy_bits Philipp Reisner
2009-06-14 3:58 ` Lars Ellenberg [this message]
2009-06-15 11:58 ` [Drbd-dev] possible FIX [Xen - DRBD issue / panic in skb_copy_bits] Valentin Vidic
2009-06-23 8:01 ` Valentin Vidic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090614035828.GA20436@soda.linbit \
--to=lars.ellenberg@linbit.com \
--cc=Valentin.Vidic@CARNet.hr \
--cc=drbd-dev@lists.linbit.com \
--cc=ivars.strazdins@gmail.com \
--cc=wc-linbit.com@vmail.baremetal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox