Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: sysupgrade warning VFS: Busy inodes after unmount of jffs2 on spi flash devices #12891

Closed
1 task done
DragonBluep opened this issue Jun 12, 2023 · 1 comment
Closed
1 task done
Labels
bug issue report with a confirmed bug

Comments

@DragonBluep
Copy link
Contributor

DragonBluep commented Jun 12, 2023

Describe the bug

When applying upgrade image in LuCI, system throws a warning VFS: Busy inodes after unmount of jffs2.

on kernel 5.15 or below (ramips):

Wed May 24 10:32:38 CST 2023 upgrade: Sending TERM to remaining processes ...
Wed May 24 10:32:42 CST 2023 upgrade: Sending KILL to remaining processes ...
[   98.600279] stage2 (2473): drop_caches: 3
Wed May 24 10:32:48 CST 2023 upgrade: Switching to ramdisk...
mount: mounting /dev/mtdblock6 on /overlay failed: Resource busy
[  102.232605] VFS: Busy inodes after unmount of jffs2. Self-destruct in 5 seconds.  Have a nice day...
Wed May 24 02:32:52 UTC 2023 upgrade: Performing system upgrade...
[  102.313515] do_stage2 (2473): drop_caches: 3
Unlocking firmware ...

Writing from <stdin> to firmware ...
Wed May 24 02:33:25 UTC 2023 upgrade: Upgrade completed
Wed May 24 02:33:26 UTC 2023 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
[  136.210390] reboot: Restarting system

on kernel 6.1 (ath79):

Sun Jun 11 18:40:31 CST 2023 upgrade: Sending TERM to remaining processes ...
Sun Jun 11 18:40:35 CST 2023 upgrade: Sending KILL to remaining processes ...
[  145.733179] stage2 (2605): drop_caches: 3
Sun Jun 11 18:40:42 CST 2023 upgrade: Switching to ramdisk...
mount: mounting /dev/mtdblock4 on /overlay failed: Resource busy
[  150.044230] ------------[ cut here ]------------
[  150.049018] WARNING: CPU: 0 PID: 2605 at fs/super.c:503 generic_shutdown_super+0x140/0x170
[  150.057468] VFS: Busy inodes after unmount of jffs2 (jffs2)
[  150.057478] Modules linked in: ath9k ath9k_common pppoe ppp_async nft_fib_inet ath9k_hw ath pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_conntrack mac80211 lzo cfg80211 slhc rng_core nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 lzo_rle lzo_decompress lzo_compress libcrc32c crc_ccitt compat sha512_generic seqiv jitterentropy_rng drbg hmac cmac crypto_acompress gpio_button_hotplug crc32c_generic
[  150.119629] CPU: 0 PID: 2605 Comm: busybox Not tainted 6.1.32 #0
[  150.125741] Stack : 00000000 77e6a000 00000000 800c0d54 00000000 00000004 00000000 00000000
[  150.134256]         818b5d34 80930000 80800000 806bfd64 80e3cd68 00000001 818b5cd8 a24a9c16
[  150.142775]         00000000 00000000 806bfd64 818b5c08 ffffefff 00000000 00000000 ffffffea
[  150.151293]         000000a4 818b5c14 000000a4 8077b9c0 00000001 806bfd64 00000000 801e79d8
[  150.159811]         00000009 0000007c 00000000 77e6a000 00000018 8038c41c 00000000 80930000
[  150.168321]         ...
[  150.170813] Call Trace:
[  150.173293] [<80066d4c>] show_stack+0x28/0xf0
[  150.177760] [<805f6338>] dump_stack_lvl+0x38/0x60
[  150.182579] [<800851d8>] __warn+0x9c/0xe8
[  150.186663] [<800852b0>] warn_slowpath_fmt+0x8c/0xac
[  150.191714] [<801e79d8>] generic_shutdown_super+0x140/0x170
[  150.197398] [<803c5520>] kill_mtd_super+0x14/0x30
[  150.202185] [<802800e8>] jffs2_kill_sb+0x5c/0x74
[  150.206893] [<801e8e84>] deactivate_locked_super+0x4c/0xa4
[  150.212473] [<8020df04>] cleanup_mnt+0xa8/0x158
[  150.217084] [<800a1ac0>] task_work_run+0x84/0xcc
[  150.221792] [<8006631c>] do_notify_resume+0x240/0x254
[  150.226940] [<800620f0>] work_notifysig+0x10/0x18
[  150.231729]
[  150.233270] ---[ end trace 0000000000000000 ]---
Sun Jun 11 10:40:46 UTC 2023 upgrade: Performing system upgrade...
[  150.339188] do_stage2 (2605): drop_caches: 3
Unlocking firmware ...

Writing from <stdin> to firmware ...
Sun Jun 11 10:41:45 UTC 2023 upgrade: Upgrade completed
Sun Jun 11 10:41:46 UTC 2023 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
[  209.572163] reboot: Restarting system

This problem can be traced back to 2021/02, refer to the logs #3627 (comment)

OpenWrt version

56f821f

OpenWrt target/subtarget

ath79/generic && ramips/mt7620 && more

Device

all spi flash devices

Image kind

Self-built image

Steps to reproduce

  1. Connect the TTL serial port.
  2. Applying upgrade image in LuCI, do not save configs.

Actual behaviour

No response

Expected behaviour

No response

Additional info

It is just a warning, all functions are normal. But I think it should be fixed.

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@DragonBluep DragonBluep added the bug issue report with a confirmed bug label Jun 12, 2023
@brada4
Copy link

brada4 commented Jun 12, 2023

sysupgrade process itself runs from force-unmounted filesystem which then is rewritten with new system image.
Devices with AB partition scheme https://github.com/openwrt/luci/tree/openwrt-22.03/applications/luci-app-advanced-reboot/root/usr/share/advanced-reboot/devices can be installed cleanly on alternate partition and will not get message in that case. Maybe disabling backtrace in this codepath saves some tty terminal wear.

@DragonBluep DragonBluep closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants