Commit 9cf118c
committed
qtvcp: stop QPin update timer before hal_exit to prevent shutdown SIGSEGV
On Ubuntu 24.04 (glibc 2.39) shutting down a qtvcp screen can SIGSEGV
because the QPin polling timer keeps firing after hal_exit detaches HAL
shared memory.
Path: qtvcp.py shutdown() calls HAL.exit() -> _hal.component.exit() ->
hal_exit(comp_id). When the last component exits, hal_lib.c calls
rtapi_shmem_delete, unmapping HAL shmem. QPin.REGISTRY still holds Python
QPins whose pyhalitem.pin.u is a value-snapshot pointer into that shmem,
and the QPin.update_all QTimer is never stopped, so its next tick
dereferences an unmapped page.
Older glibc/kernel combinations happened to keep the pages around after
detach, hiding the bug.
Fix: stop the QPin update timer before HAL.exit().1 parent daf366a commit 9cf118c
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
526 | 531 | | |
527 | 532 | | |
528 | 533 | | |
| |||
0 commit comments