From: Paolo Bonzini <pbonzini@redhat.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Cc: Alexandre DERUMIER <aderumier@odiso.com>,
Peter Lieven <pl@kamp.de>, qemu-devel <qemu-devel@nongnu.org>,
qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1
Date: Tue, 17 Jan 2017 16:03:19 +0100 [thread overview]
Message-ID: <196ac8f5-2fd7-37e9-d577-8177802d0fb4@redhat.com> (raw)
In-Reply-To: <20170117112224.2st4wuivcbwuif2m@nora.maurer-it.com>
On 17/01/2017 12:22, Fabian Grünbichler wrote:
> 6) repeat 3-5 until md5sum does not match, kernel spews error
> messages, or you are convinced that everything is OK
>
> sample kernel message (for ext3):
> Jan 17 11:39:32 ubuntu kernel: sd 2:0:0:0: [sda] tag#32 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> Jan 17 11:39:32 ubuntu kernel: sd 2:0:0:0: [sda] tag#32 Sense Key : Illegal Request [current]
> Jan 17 11:39:32 ubuntu kernel: sd 2:0:0:0: [sda] tag#32 Add. Sense: Invalid field in cdb
> Jan 17 11:39:32 ubuntu kernel: sd 2:0:0:0: [sda] tag#32 CDB: Write(10) 2a 00 0f 3a 90 00 00 07 d8 00
> Jan 17 11:39:32 ubuntu kernel: blk_update_request: critical target error, dev sda, sector 255496192
Can you reproduce it if QEMU runs under "strace -e ioctl -ff" in the
host? Or also using this systemtap script.
The important bit would be the lines with a nonzero status, but the
others can be useful to see what the surroundings look like.
# example output for "sudo stap -v strace.stp -c 'sg_opcodes /dev/sda'"
# | sg_opcodes[3444] 00000000 12 00 00 00 24 00 00 00 be 91
# | sg_opcodes[3444] 08100002 a3 0c 00 00 00 00 00 00 20 00
global cdbs%
global reqs%
global names%
function check_pid() {
return target() == 0 || pid() == target();
}
probe kernel.function("blk_fill_sghdr_rq") {
if (!check_pid()) next;
names[$rq]=sprintf("%s[%d]", execname(), tid())
cdbs[$rq]=sprintf("%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
$hdr->cmdp[0],$hdr->cmdp[1],$hdr->cmdp[2],$hdr->cmdp[3],$hdr->cmdp[4],
$hdr->cmdp[6],$hdr->cmdp[5],$hdr->cmdp[7],$hdr->cmdp[8],$hdr->cmdp[9])
}
probe kernel.function("scsi_setup_cmnd") {
if (!($req in cdbs)) next;
reqs[$req->special] = $req;
}
probe kernel.function("scsi_finish_command") {
if (!($cmd in reqs)) next;
rq = reqs[$cmd];
printf("%s %08x %s\n", names[rq], $cmd->result, cdbs[rq]);
delete reqs[$cmd]
delete cdbs[rq]
}
next prev parent reply other threads:[~2017-01-17 15:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 10:44 [Qemu-devel] Data corruption in Qemu 2.7.1 Peter Lieven
2017-01-17 6:40 ` Fam Zheng
2017-01-17 10:14 ` [Qemu-devel] [Qemu-stable] " Peter Lieven
2017-01-17 7:33 ` [Qemu-devel] " Alexandre DERUMIER
2017-01-17 8:03 ` [Qemu-devel] [Qemu-stable] " Fabian Grünbichler
2017-01-17 10:41 ` Paolo Bonzini
2017-01-17 11:22 ` Fabian Grünbichler
2017-01-17 15:03 ` Paolo Bonzini [this message]
2017-01-17 16:24 ` Paolo Bonzini
2017-01-18 11:50 ` Fabian Grünbichler
2017-01-18 16:19 ` Fabian Grünbichler
2017-01-18 16:30 ` Paolo Bonzini
2017-01-18 17:17 ` Fabian Grünbichler
2017-01-19 11:59 ` Fabian Grünbichler
2017-01-24 9:35 ` Paolo Bonzini
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=196ac8f5-2fd7-37e9-d577-8177802d0fb4@redhat.com \
--to=pbonzini@redhat.com \
--cc=aderumier@odiso.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).