containers / containers/fuse-overlayfs

kernel crash (task blocked) when using fuse-overlayfs on tmpfs

Open
#386 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
691
Forks
109
Avg merge
5d 7h
Merged PRs (30d)
2

Description

Hello!

Using fuse-overlayfs on tmpfs (/dev/shm/[folder]) causing system to freeze during suspend / resume cycle. With kernel message:

```
[60730.265604] task:systemd-sleep state:D stack:0 pid:88748 ppid:1 flags:0x00004002
[60730.267480] Call Trace:
[60730.269418]
[60730.271199] __schedule+0x351/0xa20
[60730.273102] ? __ia32_sys_tee+0xd0/0xd0
[60730.274827] schedule+0x5d/0xe0
[60730.276542] wb_wait_for_completion+0x82/0xb0
[60730.278412] ? dequeue_task_stop+0x70/0x70
[60730.280135] sync_inodes_sb+0xda/0x2b0
[60730.281958] ? __ia32_sys_tee+0xd0/0xd0
[60730.283632] iterate_supers+0x85/0xe0
[60730.285397] ksys_sync+0x40/0xa0
[60730.287002] ksys_sync_helper+0x13/0x80
[60730.288597] pm_suspend.cold+0x126/0x35e
[60730.290276] state_store+0x68/0xd0
[60730.291765] kernfs_fop_write_iter+0x11b/0x1f0
[60730.293304] vfs_write+0x241/0x400
[60730.294638] ksys_write+0x6b/0xf0
[60730.295916] do_syscall_64+0x58/0xc0
[60730.297302] ? exit_to_user_mode_prepare+0x3c/0x1c0
[60730.298552] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[60730.299869] RIP: 0033:0x7f74082f4190
[60730.301228] RSP: 002b:00007fff12152e88 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[60730.302451] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f74082f4190
[60730.303688] RDX: 0000000000000004 RSI: 00007fff12152f70 RDI: 0000000000000004
[60730.304731] RBP: 00007fff12152f70 R08: 0000000000000007 R09: 0000558b894ce590
[60730.305098] R10: f664a9c3885c4633 R11: 0000000000000202 R12: 0000000000000004
[60730.305447] R13: 0000558b894cc2d0 R14: 0000000000000004 R15: 00007f74083ca9e0
[60730.305780]
```

Steps to reproduce:

```
mkdir -p /dev/shm/test/up
mkdir -p /dev/shm/test/tmp
mkdir -p /dev/shm/test/data

fuse-overlayfs -o "static_nlink,noacl,upperdir=/dev/shm/test/up,lowerdir=$HOME/.mozilla/firefox/,workdir=/dev/shm/test/tmp" /dev/shm/test/data

firefox --profile /dev/shm/test/data/c9933.default
```

Start youtube music video. Then:

```
systemctl suspend
```

Anyone can fail from the list:

* fuse-overlayfs
* fuse
* kernel
* systemd

Full logs:

* https://linux-hardware.org/?probe=5300c136fd&log=dmesg.1

My full firefox profile tmpfs daemon:

* https://gitlab.com/axet/homebin/-/blob/debian/homebin.d/firefox

EDIT: starting firefox from tmpfs or dev/shm does not cause system to freeze:

```
cp -r ~/.mozilla/firefox/ /dev/shm/ # tmpfs
/usr/bin/firefox --profile /dev/shm/firefox/c9999.default/
```
nor
```
cp -r ~/.mozilla/firefox/ /var/tmp # tmpfs
/usr/bin/firefox --profile /var/tmp/c9999.default/
```

so. it is most likely fuse or overlayfs bug

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported fuse-overlayfs command using upperdir, lowerdir, and workdir on /dev/shm, then reproduce the Firefox workload and systemctl suspend cycle. Compare the kernel trace and linked dmesg log to determine where suspend becomes blocked; done means suspend and resume no longer freeze the system under this setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.