Bug 256586 - running firefox from a tmpfs backed unionfs causes instant crash, no panic seen. system resets
Summary: running firefox from a tmpfs backed unionfs causes instant crash, no panic se...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2021-06-13 23:00 UTC by ruben
Modified: 2023-05-11 13:56 UTC (History)
3 users (show)

See Also:


Attachments
video displaying instant crash (277.71 KB, video/mp4)
2021-06-13 23:00 UTC, ruben
no flags Details
panic: lockmgr_xlock_hard observed during other trail to reproduce the crash (226.51 KB, image/png)
2021-06-13 23:06 UTC, ruben
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ruben 2021-06-13 23:00:50 UTC
Created attachment 225782 [details]
video displaying instant crash

For the purpose of testing new hardware without installing anything on it I created a nanobsd image that unionfs mounts some tmpfs filesystems over the readonly ones so some testing can be done:

/dev/gpt/rescuebins1a on / (ufs, local, read-only)
devfs on /dev (devfs)
tmpfs on /etc (tmpfs, local)
tmpfs on /var (tmpfs, local)
fdescfs on /dev/fd (fdescfs)
tmpfs on /boot/zfs (tmpfs, local)
tmpfs on /mnt/localfs/boot (tmpfs, local)
tmpfs on /mnt/localfs/home (tmpfs, local)
tmpfs on /mnt/localfs/usrlocal (tmpfs, local)
<above>:/mnt/localfs/boot on /boot (unionfs, local)
<above>:/mnt/localfs/home on /home (unionfs, local)
<above>:/mnt/localfs/usrlocal on /usr/local (unionfs, local)

This makes it somewhat easier to install packages on the fly without rebuilding the nanobsd image.

I'm able to reset the system instantaneously when I install X, and run firefox from there

sudo pkg install xfce xinit xf86-video-vmware open-vm-tools xf86-input-evdev firefox
pkg info xfce xinit xf86-video-vmware open-vm-tools xf86-input-evdev firefox        
xfce-4.16
xinit-1.4.1,1
xf86-video-vmware-13.3.0_6
open-vm-tools-11.2.5,2
xf86-input-evdev-2.10.6_6
firefox-89.0_2,2

startxfce

then from the desktop enviroment start the browser where xfce will select firefox.
Just after firefox started the system resets.

I realise that this is an unusual setup. However, it should not cause an unprivileged user to instantaneously reset the system without a panic and indicates an issue.

There might be an easier way to reproduce it, by installing / uninstalling software. But I couldn't reproduce this in a reliable manner. 

the vm has 12GB memory

space before installing:

Filesystem                       Size    Used   Avail Capacity  Mounted on
/dev/gpt/rescuebins1a            2.0G    1.8G     63M    97%    /
devfs                            1.0K    1.0K      0B   100%    /dev
tmpfs                            2.0G    3.2M    2.0G     0%    /etc
tmpfs                            2.0G     56M    1.9G     3%    /var
fdescfs                          1.0K    1.0K      0B   100%    /dev/fd
tmpfs                            100K    4.0K     96K     4%    /boot/zfs
tmpfs                            1.0G    4.0K    1.0G     0%    /mnt/localfs/boot
tmpfs                            100M    4.0K    100M     0%    /mnt/localfs/home
tmpfs                            4.0G     12K    4.0G     0%    /mnt/localfs/usrlocal
<above>:/mnt/localfs/boot        3.0G    2.0G    1.0G    67%    /boot
<above>:/mnt/localfs/home        2.1G    2.0G    100M    95%    /home
<above>:/mnt/localfs/usrlocal    6.0G    2.0G    4.0G    33%    /usr/local


space after installing mentioned packages

Filesystem                       Size    Used   Avail Capacity  Mounted on
/dev/gpt/rescuebins1a            2.0G    1.8G     63M    97%    /
devfs                            1.0K    1.0K      0B   100%    /dev
tmpfs                            2.0G    3.9M    2.0G     0%    /etc
tmpfs                            2.0G    457M    1.6G    22%    /var
fdescfs                          1.0K    1.0K      0B   100%    /dev/fd
tmpfs                            100K    4.0K     96K     4%    /boot/zfs
tmpfs                            1.0G     84K    1.0G     0%    /mnt/localfs/boot
tmpfs                            100M    4.0K    100M     0%    /mnt/localfs/home
tmpfs                            4.0G    2.4G    1.6G    60%    /mnt/localfs/usrlocal
<above>:/mnt/localfs/boot        3.0G    2.0G    1.0G    67%    /boot
<above>:/mnt/localfs/home        2.1G    2.0G    100M    95%    /home
<above>:/mnt/localfs/usrlocal    6.0G    4.4G    1.6G    73%    /usr/local


fstab

/dev/gpt/rescuebins1a / ufs ro 1 1
/dev/gpt/rescuebins3 /cfg ufs rw,noauto 2 2
fdesc   /dev/fd         fdescfs         rw      0       0
tmpfs /boot/zfs   tmpfs   rw,size=100k    0   0
tmpfs /mnt/localfs/boot   tmpfs   rw,size=1G    0   0
tmpfs /mnt/localfs/home   tmpfs   rw,size=100M    0   0
tmpfs /mnt/localfs/usrlocal   tmpfs   rw,size=4G    0   0
/mnt/localfs/boot	/boot   unionfs   rw,noatime,late	0   0
/mnt/localfs/home	/home   unionfs   rw,noatime,late	0   0
/mnt/localfs/usrlocal	/usr/local   unionfs   rw,noatime,late	0   0

after xfce4 startup approximately 4G is still free
Comment 1 ruben 2021-06-13 23:06:32 UTC
Created attachment 225784 [details]
panic: lockmgr_xlock_hard observed during other trail to reproduce the crash

Panic observed:

 panic: lockmgr_xlock_hard: recursing on non recursive lockmgr