Samuel Thibault, le mar. 01 juil. 2025 22:20:52 +0200, a ecrit:
> Samuel Thibault, le mar. 01 juil. 2025 22:09:27 +0200, a ecrit:
> > Samuel Thibault, le mar. 01 juil. 2025 21:32:23 +0200, a ecrit:
> > > Damien Zammit, le mar. 01 juil. 2025 14:16:27 +0000, a ecrit:
> > > > This provides a functional rumpdisk and rumpusbdisk
> > > > with or without static linkage of librump.
> > >
> > > Great :) applied, thanks!
> > >
> > > > TESTED:
> > > > - opens usb stick with both dynamic and static rumpusbdisk.
> > >
> > > I'm still getting issues with rumpusbdisk. Notably I'm seeing:
> > >
> > > irqhelp: tried acpi to get pci gsi and failed for 00:01.2
> > >
> > > Possibly my setup is complex, I tried to replicate it and run a simple
> > > image but I'm then not getting the issue. Trying to dig more.
> >
> > It seems it happens randomly... The same settrans sometimes does work
> > fine.
>
> The crash I'm getting looks similar to what you had today:
>
> #0 0x0814e0d7 in rumpuser_mutex_spin_p ()
> #1 0x0813de6d in rumpns_mutex_spin_enter ()
> #2 0x08084933 in rumpns_uhci_intr ()
> #3 0x0816b401 in wrapped_handler ()
> #4 0x081c99da in interrupt_demuxer (inp=0x93b6ee0, outp=0x93b4ed0)
> at ../../libirqhelp/irqhelp.c:249
> etc.
>
> Possibly just because the irq is shared, if it comes too early
> rumpns_uhci_intr is not ready yet to receive it.
Errr...
static void
uhci_pci_attach(device_t parent, device_t self, void *aux)
{
[...]
sc->sc_ih = pci_intr_establish_xname(pc, ih[0], IPL_USB, uhci_intr, sc,
[...]
int err = uhci_init(&sc->sc);
[...]
}
int
uhci_init(uhci_softc_t *sc)
{
[...]
mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_USB);
[...]
}
For sure that will crash if an interrupt happens between
pci_intr_establish_xname and uhci_init's mutex_init.
I guess it's working on BSD only by luck because mutex_init() is mostly
no-op... I'll add a patch for this which seems to work for me (6
successive successes while it used to be 1 crash every 2 start)
The question that remains is why when rumpusbdisk crashes, it gets IRQ
11 stuck. In principle the dead sender notification should clean it in
the kernel.
Samuel