Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-12 Thread Denis Krienbühl
I see, thanks for pointing me in the direction of those commits. I figured a new version would not have the same issue, so we’ll upgrade. Cheers, Denis > On 12 Aug 2022, at 17:11, Paolo Bonzini wrote: > > On 8/12/22 16:50, Peter Maydell wrote: >> As I said previously, this is still absolutely

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-12 Thread Paolo Bonzini
On 8/12/22 16:50, Peter Maydell wrote: As I said previously, this is still absolutely wrong. If we ever get to this function with either of these fields being NULL then there has been a serious problem, probably a memory corruption or use-after-free, or possibly an attempt to use a partially cons

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-12 Thread Peter Maydell
On Fri, 12 Aug 2022 at 15:41, Denis Krienbühl wrote: > > I’m not much further with my segfault, though I now know that the number of > detaches likely does not matter and it seems to occur during the attach, not > the detach part of the code. > > I adapted my change to be a bit more sane - I thi

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-12 Thread Denis Krienbühl
I’m not much further with my segfault, though I now know that the number of detaches likely does not matter and it seems to occur during the attach, not the detach part of the code. I adapted my change to be a bit more sane - I think it might make sense in general, as something is clearly wrong

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-09 Thread Peter Maydell
On Tue, 9 Aug 2022 at 17:26, Denis Krienbühl wrote: > On 9 Aug 2022, at 18:15, Peter Maydell wrote: >> My wild guess is that there's a race condition somewhere such >> that when you're doing this huge amount of detaches, very rarely >> a disk is detached and deleted but this INQUIRY request is >>

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-09 Thread Denis Krienbühl
> On 9 Aug 2022, at 18:15, Peter Maydell wrote: > > My wild guess is that there's a race condition somewhere such > that when you're doing this huge amount of detaches, very rarely > a disk is detached and deleted but this INQUIRY request is > incorrectly still sent to the disk (which being a fr

Re: Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-09 Thread Peter Maydell
On Tue, 9 Aug 2022 at 16:37, Denis Krienbühl wrote: > We are running a Ceph 15.2.16 cluster at work, connect VMs to it using > librbd1 14.2.22, running on the QEMU 4.2 release by Ubuntu’s Cloud Archive > (4.2-3ubuntu6.23~cloud0). > > A few of our VMs randomly trigger a segfault in qemu-system-x8

Segfault in hw/scsi/scsi-disk.c caused by null pointer

2022-08-09 Thread Denis Krienbühl
Hi We are running a Ceph 15.2.16 cluster at work, connect VMs to it using librbd1 14.2.22, running on the QEMU 4.2 release by Ubuntu’s Cloud Archive (4.2-3ubuntu6.23~cloud0). A few of our VMs randomly trigger a segfault in qemu-system-x86_64. This seems to only happen when lots of volume detac