Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] Crash in _req_may_be_done()
Date: Tue, 12 Sep 2006 09:36:57 +0200	[thread overview]
Message-ID: <200609120936.57920.philipp.reisner@linbit.com> (raw)

Hi Lars,

First, do not read e-mails while on vacation. 

Ok, I just document here my findings, in case Simon works on the same,
I do not want that we hunt the same bugs ...

Currently I run drbd in my UML setup and hit a crash in. _req_may_be_done()

		/* remove the request from the conflict detection
		 * respective block_id verification hash */
		hlist_del(&req->colision);           <<<<<<<=====<<<<<<==== HERE!

		/* FIXME not yet implemented...
		 * in case we got "suspended" (on_disconnect: freeze io)
		 * we may not yet complete the request...

To understand how this came I added that VERBOSE_REQUEST_CODE

[42950452.520000] drbd0: _req_mod(a101c744,to_be_submitted)
[42950452.520000] drbd0: _req_mod(a101c744,completed_ok)
[42950452.520000] drbd0: _req_may_be_done(a101c744 L-coN-----)
           *******   without modifications it would crash here **********
[42950452.540000] drbd0: _req_mod(a101c744,to_be_send)
[42950452.540000] drbd0: _req_mod(a101c744,to_be_submitted)
[42950452.540000] drbd0: _req_mod(a101c744,queue_for_net_write)
[42950452.540000] drbd0: _req_mod(a101c744,handed_over_to_network)
[42950452.540000] drbd0: _req_may_be_done(a101c744 Lp--Np-s--)
[42950452.540000] drbd0: _req_mod(a101c744,completed_ok)
[42950452.540000] drbd0: _req_may_be_done(a101c744 L-coNp-s--)
[42950452.540000] drbd0: _req_mod(a101c744,recv_acked_by_peer)
[42950452.540000] drbd0: _req_may_be_done(a101c744 L-coN--s-o)

What we see here is, that UML's block layer finishes the write of the
block before we even mark the request that it should be sent. 
Strange, since the code in drbd_make_request_common() is:

	if (remote) _req_mod(req, to_be_send);
	if (local)  _req_mod(req, to_be_submitted);
[...]
	if (local) {
		BUG_ON(req->private_bio->bi_bdev == NULL);
		generic_make_request(req->private_bio);
	}

The code reads, set the RQ_NET_PENDING first, then the RQ_LOCAL_PENDING
and after that issue the local request (= call generic_make_request())

What happens here ? Agressive reordering of the compiler ? I can not
believe this.

-Philipp

             reply	other threads:[~2006-09-12  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12  7:36 Philipp Reisner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-12 14:00 [Drbd-dev] Crash in _req_may_be_done() Graham, Simon
2006-09-12 14:18 ` Philipp Reisner

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=200609120936.57920.philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=drbd-dev@lists.linbit.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