UFS root filesystem remount oops

I got this FreeBSD 14.3 instance that's using ufs. 1GB of ram, available between 60-40%.
it's got / mounted read-only and /var is r/w in order to protect the filesystem against the unexpected.
whenever I need to install new packages I mount -u -o rw /, do the install, sometimes tweak the packet filter, pfctl -f /etc/pf.conf and then mount -u -o ro /.

most of the time this works without issues. however sometimes the ro remount takes a lot of time and I repeat the command the kernel oops-es.
I need to force a restart of the instance from the ISP's control panel since reboot hangs.
Unfortunately the crash never seems to get logged, even if the /var partition remains rw.

What steps should I take to better debug this issue the next time it happens?

and this is not a new regression, it was also happening with 14.2.

thanks!
 
I never used this trick, while I find it interesting it is also binding in some aspect but I should probably try it one day, sounds funny.

What steps should I take to better debug this issue the next time it happens?
If I were you I'd start by digging the logs, launch a sysutils/tmux (or sysutils/screen) session where in one window you run your usual commands and in another window you watch the logs.
I'd probably also test few times with and without the pfctl command just to be sure that pf is not the culprit.
Good luck.
 
What steps should I take to better debug this issue the next time it happens?
You should configure a dump device which the kernel will use to write a core dump when it panics. Search for dumpdev in rc.conf(5).
You can verify with dumpon -l that there is a dump device active.

Remounting / read-only while /var remains read-write sounds to me like a weird configuration that might be unsupported.
 
Remounting / read-only while /var remains read-write sounds to me like a weird configuration that might be unsupported.

been using this trick in both Linux and OpenBSD for years. In these OS-es sometimes the kernel refuses to remount / ro because 'filesystem is in use', but it never crashes.

A panic should certainly not happen. Please do as Jordan suggests and file a bug report with the kernel backtrace.
thanks, will do.
 
Back
Top