Bug #13304
bhyve ioport handling bungled on reinit
100%
Description
despair reports via IRC:
02:02 <despair> bhyve zones fail to reboot 02:02 <despair> { "time": "2020-11-11T08:01:43.985434000Z", "v": 0, "hostname": "sun-srv2", "name": "zoneadmd","pid": 13922, "level": 30, "msg":"Assertion failed: err == 0, file pm.c, line 453, function pmtmr_init\n", "stream":"stderr" } 02:03 <despair> am on latest release 02:04 <despair> to reproduce: install any operating system into a bhyve zone (bsd, illumos, linux, windows, etc) 02:04 <despair> after first boot, reboot vm 02:04 <despair> expected: system reboots 02:04 <despair> got: system reboots then halts immediately on that assertion
This is a symptom of the ioport handlers not being setup correctly when the VM is reinitialized on a reboot condition.
Related issues
Updated by Patrick Mooney 5 months ago
- Related to Bug #13244: bhyve PM timer should be movable added
Updated by Patrick Mooney 5 months ago
Without bhyve zones in my illumos test environment, I had missed this behavior in my OS smoke tests. After rewiring my run scripts to exercise the reinit path, I observed the assert(), just as despair was.
Updated by Patrick Mooney 5 months ago
Running a platform with the proposed fix in place, I was able to take all my test guests through the reinit (reboot) path without seeing the issue. This was done on a DEBUG kernel, and after rebooting then halting the guests, I dumped the host to confirm that ::findleaks
was clean.
Updated by Patrick Mooney 5 months ago
To clarify, this wasn't a question of bhyve-zones vs bhyve-not-in-a-zone. Rather it was a question of re-execing bhyve in order to reinitialize the guest as if it had rebooted. bhyve-branded zones do that automatically (re-exec bhyve when it exits with EXIT_SUCCESS). The rudimentary scripts I was using to run bhyve in the global zone (because bhyve zones aren't part of vanilla illlumos) did not exercise this path.
Updated by Electric Monk 5 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 509a605d87b8005c687f8d8264f1be379620e886
commit 509a605d87b8005c687f8d8264f1be379620e886 Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-11-14T17:21:46.000Z 13304 bhyve ioport handling bungled on reinit Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Approved by: Richard Lowe <richlowe@richlowe.net>