viona ring lease vs vmm write lock stopping propolis-server shutdown

Aperta
#1,261 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by tracing the reported shutdown hang through the propolis-server threads and kernel stack frames, especially viona_ring_lease_expire_cb, vmm_lease_block, and vmm_write_lock. The report does not identify a source file or a reproduction, so first locate these entry points in the repository and check existing tests for lease and shutdown behavior. Done means identifying whether this lock and lease interaction can block shutdown and documenting or fixing the cause with a regression test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I took over dublin and started a clean-slate, but caught this on its way down: a VM that had been shut down the day prior and was stuck in shutting_down.

Where: propolis-server on dublin sled BRM23230010
Host OS: Oxide Helios Version helios-3.0.24447 64-bit
Omicron: ae22d91 / 415ecfc

BRM23230010 # zoneadm list -cv | head -3
  ID NAME             STATUS     PATH                           BRAND    IP
    0 global           running    /                              ipkg     shared
  17 oxz_propolis-server_3b3a4f45-cff5-4742-a045-8bc4ca3f242e shutting_down ... omicron1 excl

BRM23230010 # ps -fz oxz_propolis-server_3b3a4f45-cff5-4742-a045-8bc4ca3f242e
      UID   PID  PPID   C    STIME TTY         TIME CMD
    root 28831     1   0   Nov 13 ?           0:00 zsched
    root 29488     1   0   Nov 13 ?           2:54 /opt/oxide/propolis-server/bin/propolis-server run ...

BRM23230010 # pstack 29488
pstack: cannot examine 29488: no such process or core file

Kernel stacks (0t29488::pid2proc | ::walk thread | ::findstack -v):

stack pointer for thread fffffd3a27ef33c0 (propolis-server/8 [tokio-rt-vmm]): fffff8673cae3970
[ fffff8673cae3970 _resume_from_idle+0x130() ]
  fffff8673cae39a0 swtch+0x139()
  fffff8673cae3a40 turnstile_block+0x279(0, 0, fffffd3ad5cf4220, fffffffffc01c680, 0, 0)
  fffff8673cae3ab0 mutex_vector_enter+0x378(fffffd3ad5cf4220)
  fffff8673cae3ae0 viona_ring_lease_expire_cb+0x23(fffffd3ad5cf4218)
  fffff8673cae3b40 vmm_lease_block+0xfd(fffffd3a2c5a1600)
  fffff8673cae3b80 vmm_write_lock+0x60(fffffd3a2c5a1600)
  fffff8673cae3c00 vmm_drv_ioport_hook+0x83(fffffd3a4b306d58, c210, fffffffff7d88660, fffffd3ad63533c0, fffffd3ad6353418)
  fffff8673cae3c30 viona_ioc_set_notify_ioport+0x6e(fffffd3ad63533c0, c210)
  fffff8673cae3cc0 viona_ioctl+0x509(9f00000004, 564323, c210, 202003, fffffd3ad3ec9e18, fffff8673cae3e18)
  fffff8673cae3d00 cdev_ioctl+0x3f(9f00000004, 564323, c210, 202003, fffffd3ad3ec9e18, fffff8673cae3e18)
  fffff8673cae3d50 spec_ioctl+0x55(fffffd3ad6096e80, 564323, c210, 202003, fffffd3ad3ec9e18, fffff8673cae3e18)
  fffff8673cae3de0 fop_ioctl+0x40(fffffd3ad6096e80, 564323, c210, 202003, fffffd3ad3ec9e18, fffff8673cae3e18)
  fffff8673cae3f00 ioctl+0x144(15, 564323, c210)
  fffff8673cae3f10 sys_syscall+0x17d()
stack pointer for thread fffffd3a4d07e800 (propolis-server/22): fffff8673f85cd30
[ fffff8673f85cd30 _resume_from_idle+0x130() ]
  fffff8673f85cd60 swtch+0x139()
  fffff8673f85cd90 cv_wait+0x70(fffffd3ad8c9f0c6, fffffd38cc9bb600)
  fffff8673f85cdd0 exitlwps+0x134(0)
  fffff8673f85ce50 psig+0x507()
  fffff8673f85cf00 post_syscall+0x76d(4, fffffd3a035ab400)
  fffff8673f85cf10 0xfffffffffbc00594()
stack pointer for thread fffffd3a63dc84a0 (propolis-server/34 [viona_rx_0_fffffd3ad5cf4000]): fffff8673dd21d80
[ fffff8673dd21d80 _resume_from_idle+0x130() ]
  fffff8673dd21db0 swtch+0x139()
  fffff8673dd21de0 cv_wait+0x70(fffffd3a2c5a171c, fffffd3a2c5a16f0)
  fffff8673dd21e40 vmm_drv_lease_sign+0xbb(fffffd3a4b306d58, fffffffff7d89ee0, fffffd3ad5cf4000)
  fffff8673dd21e70 viona_ring_lease_renew+0x2e(fffffd3ad5cf4000)
  fffff8673dd21eb0 viona_worker_rx+0x81(fffffd3ad5cf4000, fffffd3ad63533c0)
  fffff8673dd21ef0 viona_worker+0x10f(fffffd3ad5cf4000)
  fffff8673dd21f00 thread_start+0xb()
stack pointer for thread fffffd3a8bd31400 (propolis-server/35 [viona_tx_1_fffffd3ad5cf4218]): fffff86746eb4d60
[ fffff86746eb4d60 _resume_from_idle+0x130() ]
  fffff86746eb4d90 swtch+0x139()
  fffff86746eb4dc0 cv_wait+0x70(fffffd3a2c5a171c, fffffd3a2c5a16f0)
  fffff86746eb4e20 vmm_drv_lease_sign+0xbb(fffffd3a4b306d58, fffffffff7d89ee0, fffffd3ad5cf4218)
  fffff86746eb4e50 viona_ring_lease_renew+0x2e(fffffd3ad5cf4218)
  fffff86746eb4eb0 viona_worker_tx+0x135(fffffd3ad5cf4218, fffffd3ad63533c0)
  fffff86746eb4ef0 viona_worker+0x223(fffffd3ad5cf4218)
  fffff86746eb4f00 thread_start+0xb()

I'm not sure what triggered it and unfortunately the clean-slate seems to have killed it off before I could gather any more info. But it looked enough like a potential deadlock that it seemed worth filing.

Lingua principale
Rust
Stelle
326
Fork
49
Merge medio
1g 13h
PR unite (30g)
10

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oxidecomputer/propolis

Tutte le issue di oxidecomputer/propolis

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.