On Tue, Apr 25, 2023 at 10:53 PM Aaron Mason <simplersolut...@gmail.com> wrote: > > On Mon, Apr 24, 2023 at 3:47 PM Aaron Mason <simplersolut...@gmail.com> wrote: > > > > On Fri, Apr 21, 2023 at 2:50 PM Aaron Mason <simplersolut...@gmail.com> > > wrote: > > > > > > On Fri, Apr 21, 2023 at 1:39 PM Aaron Mason <simplersolut...@gmail.com> > > > wrote: > > > > > > > > On Fri, Apr 7, 2023 at 3:25 AM Antun Matanović > > > > <matanovic.an...@gmail.com> wrote: > > > > > > > > > > On Thu, 6 Apr 2023 at 12:55, Fabio Martins <fosf...@gmail.com> wrote: > > > > > > > > > > > > Try to add an entry in grub like in this article: > > > > > > > > > > > > https://raby.sh/installing-openbsd-on-ovhs-vps-2016-kvm-machines.html > > > > > > > > > > I have tried that, but it did not resolve the issue. Sorry I forgot to > > > > > mention it originally. > > > > > > > > > > On Thu, 6 Apr 2023 at 14:24, Janne Johansson <icepic...@gmail.com> > > > > > wrote: > > > > > > > > > > > > That is very much not the same issue. The arm64 instances on Oracle > > > > > > finds the correct kernel and boots it, it just crashes at or after > > > > > > the > > > > > > scsi attachment. > > > > > > > > > > This has been my experience as well, except on the amd64 instance, > > > > > haven't tried arm64. > > > > > > > > > > > > > Yeah I'm getting the same thing. Trying a build in QEMU and > > > > transferring in to see if that helps. Will report back. > > > > > > > > > > Ok, good news, it still crashes at the same spot, but this time I've > > > got more data. Copying in tech@ - if I've forgotten anything let me > > > know and I'll fire up a fresh instance. > > > > > > [REDACTED] > > > vioscsi_req_done(e,ffff800000024a00,fffffd803f81c338,e,ffff800000024a00,ffff800 > > > 0000d3228) at vioscsi_req_done+0x26 > > > [REDACTED] > > > > Ok, so based on the trace I got, I was able to trace the stop itself > > back to line 299 of vioscsi.c (thank. you. random relink. And > > anonymous CVS): > > > > 293 vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc, > > 294 struct vioscsi_req *vr) > > 295 { > > 296 struct scsi_xfer *xs = vr->vr_xs; > > 297 DPRINTF("vioscsi_req_done: enter vr: %p xs: %p\n", vr, xs); > > 298 > > -->299 int isread = !!(xs->flags & SCSI_DATA_IN); > > 300 bus_dmamap_sync(vsc->sc_dmat, vr->vr_control, > > 301 offsetof(struct vioscsi_req, vr_req), > > 302 sizeof(struct virtio_scsi_req_hdr), > > 303 BUS_DMASYNC_POSTWRITE); > > > > Maybe if I follow the rabbit hole enough, I might find out what's > > going wrong between the driver and OCI. I've got a day off tomorrow > > (yay for war I guess), I'll give it a bash and see where we end up. > > > > -- > > Aaron Mason - Programmer, open source addict > > I've taken my software vows - for beta or for worse > > I enabled debugging on the vioscsi driver, rebuilt the RAMDISK kernel > with those drivers enabled, and got this: > > vioscsi0 at virtio1: qsize 128 > scsibus0 at vioscsi0: 255 targets > vioscsi_req_get: 0xfffffd803f80d338 > vioscsi_scsi_cmd: enter > vioscsi_scsi_cmd: polling... > vioscsi_scsi_cmd: polling timeout > vioscsi_scsi_cmd: done (timeout=0) > vioscsi_scsi_cmd: enter > vioscsi_scsi_cmd: polling... > vioscsi_vq_done: enter > vioscsi_vq_done: slot=127 > vioscsi_req_done: enter vr: 0xfffffd803f80d338 xs: 0xfffffd803f8a5e58 > vioscsi_req_done: done 0, 2, 0 > vioscsi_vq_done: slot=127 > vioscsi_req_done: enter vr: 0xfffffd803f80d338 xs: 0x0 > uvm_fault(0xffffffff813ec2e0, 0x8, 0, 1) -> e > fatal page fault in supervisor mode > trap type 6 code 0 rip ffffffff810e6190 cs 8 rflags 10286 cr2 8 cpl e > rsp ffffffff81606670 > gsbase 0xffffffff813dfff0 kgsbase 0x0 > panic: trap type 6, code=0, pc=ffffffff810e6190 > > That "xs: 0x0" bit feels like a clue. It should be trivial to pick up > and handle, but what would be the correct way to handle that? > > If I have it return if "xs" is found to be NULL, it continues - the > debugging suggests it goes through each possible target before > finishing up. I don't know if that's correct, but it seems to continue > booting after that even if my example didn't detect the drive with the > kernel I built (I used the RAMDISK kernel and it was pretty stripped > down). > > I'm about to attempt a -STABLE build (I've got 7.3 installed and thus > can't yet build a snapshot, but I will do that if this test succeeds) > - here's the patch that hopefully fixes the problem. (and hopefully > gmail doesn't clobber the tabs) > > Index: sys/dev/pv/vioscsi.c > =================================================================== > RCS file: /cvs/src/sys/dev/pv/vioscsi.c,v > retrieving revision 1.30 > diff -u -p -u -p -r1.30 vioscsi.c > --- sys/dev/pv/vioscsi.c 16 Apr 2022 19:19:59 -0000 1.30 > +++ sys/dev/pv/vioscsi.c 25 Apr 2023 12:51:16 -0000 > @@ -296,6 +296,7 @@ vioscsi_req_done(struct vioscsi_softc *s > struct scsi_xfer *xs = vr->vr_xs; > DPRINTF("vioscsi_req_done: enter vr: %p xs: %p\n", vr, xs); > > + if (xs == NULL) return; > int isread = !!(xs->flags & SCSI_DATA_IN); > bus_dmamap_sync(vsc->sc_dmat, vr->vr_control, > offsetof(struct vioscsi_req, vr_req), > > > -- > Aaron Mason - Programmer, open source addict > I've taken my software vows - for beta or for worse
It works, whether it's a good way to make it work I'll leave for people more experienced than I - dmesg below. OpenBSD 7.3-stable (RAMDISK_CD) #0: Thu Apr 27 15:07:43 AEST 2023 aa...@buildaroo.mshome.net:/usr/src/sys/arch/amd64/compile/RAMDISK_CD real mem = 1056817152 (1007MB) avail mem = 1020829696 (973MB) random: good seed from bootblocks mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7050 (9 entries) bios0: vendor SeaBIOS version "?-20171121_152543-x86-ol7-builder-01.us.oracle.com-4.el7.1" date 04/01/2014 bios0: QEMU Standard PC (i440FX + PIIX, 1996) acpi0 at bios0: ACPI 1.0 acpi0: tables DSDT FACP APIC HPET acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD EPYC 7551 32-Core Processor, 3005.10 MHz, 17-01-02 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,TOPEXT,CPCTR,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,VIRTSSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu0: 64KB 64b/line 2-way D-cache, 64KB 64b/line 2-way I-cache, 512KB 64b/line 16-way L2 cache, 16MB 64b/line 16-way L3 cache cpu0: apic clock running at 1450MHz cpu at mainbus0: not configured ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins acpihpet0 at acpi0: 100000000 Hz acpiprt0 at acpi0: bus 0 (PCI0) "ACPI0006" at acpi0 not configured acpipci0 at acpi0 PCI0 acpicmos0 at acpi0 com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo com0: console "QEMU0001" at acpi0 not configured "PNP0A06" at acpi0 not configured "PNP0A06" at acpi0 not configured "PNP0A06" at acpi0 not configured "QEMU0002" at acpi0 not configured "ACPI0010" at acpi0 not configured acpicpu at acpi0 not configured pvbus0 at mainbus0: KVM pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02 "Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility pciide0: channel 0 disabled (no drives) pciide0: channel 1 disabled (no drives) uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 0 int 11 "Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured vga1 at pci0 dev 2 function 0 "Bochs VGA" rev 0x02 vga1: aperture needed wsdisplay1 at vga1 mux 1 wsdisplay1: screen 0 added (80x25, vt100 emulation) virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio0: address 02:00:17:03:19:38 virtio0: msix shared virtio1 at pci0 dev 4 function 0 "Qumranet Virtio SCSI" rev 0x00 vioscsi0 at virtio1: qsize 128 scsibus0 at vioscsi0: 255 targets uk0 at scsibus0 targ 0 lun 0: <QEMU, QEMU TARGET, 2.5> sd0 at scsibus0 targ 0 lun 1: <ORACLE, BlockVolume, 1.0> naa.602bd132041a42f2aeb2443ca44b9ae2 sd0: 47694MB, 512 bytes/sector, 97677312 sectors, thin virtio1: msix shared usb0 at uhci0: USB revision 1.0 uhub0 at usb0 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at mainbus0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0 mux 1 wskbd0: connecting to wsdisplay1 uhidev0 at uhub0 port 1 configuration 1 interface 0 "QEMU QEMU USB Tablet" rev 2.00/0.00 addr 2 uhidev0: iclass 3/0 uhid at uhidev0 not configured softraid0 at root scsibus1 at softraid0: 256 targets root on rd0a swap on rd0b dump on rd0b -- Aaron Mason - Programmer, open source addict I've taken my software vows - for beta or for worse