From: Stefan Hajnoczi <stefanha@gmail.com>
To: Mark Trumpold <markt@netqa.com>
Cc: nbd-general@lists.sourceforge.net, w@uter.be,
bonzini@stefanha-thinkpad.redhat.com,
Paul Clements <Paul.Clements@steeleye.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Hibernate and qemu-nbd
Date: Wed, 18 Sep 2013 15:12:04 +0200 [thread overview]
Message-ID: <20130918131204.GG13359@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CE5DB0F4.8F0D%markt@netqa.com>
On Tue, Sep 17, 2013 at 07:10:44AM -0700, Mark Trumpold wrote:
> I am using the kernel functionality directly with the commands:
> echo platform >/sys/power/disk
> echo disk >/sys/power/state
>
> The following appears in dmesg when I attempt to hibernate:
>
> ====================================================
> [ 38.881397] nbd (pid 1473: qemu-nbd) got signal 0
> [ 38.881401] block nbd0: shutting down socket
> [ 38.881404] block nbd0: Receive control failed (result -4)
> [ 38.881417] block nbd0: queue cleared
> [ 87.463133] block nbd0: Attempted send on closed socket
> [ 87.463137] end_request: I/O error, dev nbd0, sector 66824
> ====================================================
>
> My environment:
> Debian: 6.0.5
> Kernel: 3.3.1
> Qemu userspace: 1.2.0
This could be a bug in the nbd client kernel module.
drivers/block/nbd.c:sock_xmit() does the following:
result = kernel_recvmsg(sock, &msg, &iov, 1, size,
msg.msg_flags);
if (signal_pending(current)) {
siginfo_t info;
printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n",
task_pid_nr(current), current->comm,
dequeue_signal_lock(current, ¤t->blocked, &info));
result = -EINTR;
sock_shutdown(nbd, !send);
break;
}
The signal number in the log output looks bogus, we shouldn't get 0.
sock_xmit() actually blocks all signals except SIGKILL before calling
kernel_recvmsg(). I guess this is an artifact of the suspend-to-disk
operation, maybe the signal pending flag is set on the process.
Perhaps someone with a better understanding of the kernel internals can
check this?
What happens next is that the nbd kernel module shuts down the NBD connection.
As a workaround, please try running a separate nbd-client(1) process and drop
the qemu-nbd -c command-line argument. This way nbd-client(1) uses the
nbd kernel module instead of the qemu-nbd process and you'll get the
benefit of nbd-client's automatic reconnect.
Stefan
next prev parent reply other threads:[~2013-09-18 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 14:10 [Qemu-devel] Hibernate and qemu-nbd Mark Trumpold
2013-09-18 13:12 ` Stefan Hajnoczi [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-19 20:44 Mark Trumpold
2013-09-20 5:14 ` Stefan Hajnoczi
2013-09-20 18:00 Mark Trumpold
2013-09-21 9:59 ` Wouter Verhelst
2013-09-25 14:42 ` Mark Trumpold
2013-09-26 7:11 ` Stefan Hajnoczi
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=20130918131204.GG13359@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=Paul.Clements@steeleye.com \
--cc=bonzini@stefanha-thinkpad.redhat.com \
--cc=markt@netqa.com \
--cc=nbd-general@lists.sourceforge.net \
--cc=qemu-devel@nongnu.org \
--cc=w@uter.be \
/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;
as well as URLs for NNTP newsgroup(s).