qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] kvm segfaulting


From: Stefan Priebe - Profihost AG
Subject: Re: [Qemu-devel] kvm segfaulting
Date: Mon, 11 Feb 2013 10:48:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Hi Stefan,
Am 11.02.2013 10:40, schrieb Stefan Hajnoczi:
> On Mon, Feb 11, 2013 at 08:46:03AM +0100, Stefan Priebe - Profihost AG wrote:
>> i've seen segfaults of the kvm process. Sadly i've no core dumps just
>> the line from dmesg:
>> kvm[26268]: segfault at c050 ip 00007fcfc3465eac sp 00007fffe85a0d00
>> error 4 in kvm[7fcfc3223000+3ba000]
>>
>> Is it possible to get the function and some more details out of this
>> line? I've symbol files and debugging files of the kvm binary.
> 
> Accessed address: c050
> Address of the instruction that segfaulted: 00007fcfc3465eac
> Base memory address where kvm code was mmapped: 7fcfc3223000
> Length of mmap: 3ba000
> 
> Try the following:
> 
>   $ printf '%x' $((0x7fcfc3465eac - 0x7fcfc3223000))
>   242eac
>   $ addr2line -e path/to/qemu-kvm-symbols -f 242eac
> 
> I also suggest posting about 10 lines before/after 0x242eac from the
> objdump -d path/to/kvm output.  That way we can sanity check that the
> instruction accesses memory and see what the surrounding instructions
> are doing.

Great thing! This is current git master.

[: ~]# addr2line -e /usr/lib/debug/usr/bin/kvm -f 242eac

virtio_scsi_command_complete
/opt/debianpackages/pve-squeeze.sources/pve-qemu-kvm/qemu-kvm/hw/virtio-scsi.c:429

static void virtio_scsi_command_complete(SCSIRequest *r, uint32_t status,
                                         size_t resid)
{
    VirtIOSCSIReq *req = r->hba_private;
    uint32_t sense_len;

=====> THIS IS 429    req->resp.cmd->response = VIRTIO_SCSI_S_OK;
    req->resp.cmd->status = status;
    if (req->resp.cmd->status == GOOD) {
        req->resp.cmd->resid = tswap32(resid);
    } else {
        req->resp.cmd->resid = 0;
        sense_len = scsi_req_get_sense(r, req->resp.cmd->sense,
                                       VIRTIO_SCSI_SENSE_SIZE);
        req->resp.cmd->sense_len = tswap32(sense_len);
    }
    virtio_scsi_complete_req(req);
}

Greets,
Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]