Bug 104081 - Certain operations on nfsroot cause /proc to be forcefully unmounted
Summary: Certain operations on nfsroot cause /proc to be forcefully unmounted
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: NFS (show other bugs)
Hardware: IA-64 Linux
: P1 normal
Assignee: Trond Myklebust
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-05 18:04 UTC by Lubos Dolezel
Modified: 2016-03-20 10:17 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.19.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Lubos Dolezel 2015-09-05 18:04:06 UTC
I'm witnessing a very strange situation which happens ONLY if / is nfsroot. Whenever I start Valve's Steam client (http://store.steampowered.com/) on such a system, /proc gets immediately unmounted, even if manual "umount" would fail and report that /proc is in use.

I thought I was crazy, so I modified the kernel source to dump the stack whenever umount_tree() is called on proc and it confirmed by suspicions:

[  628.159735] umount_tree: proc
[  628.159737] Modules linked in: cts rpcsec_gss_krb5 nvidia(PO) snd_usb_audio
snd_usbmidi_lib x86_pkg_temp_thermal
[  628.159745] CPU: 2 PID: 3930 Comm: steam Tainted: P        W  O
3.19.1-gentoo #11
[  628.159747] Hardware name: System manufacturer System Product Name/P8Z77-V
LX, BIOS 2204 08/14/2013
[  628.159749]  ffffffff81be5418 ffff8800cad07a48 ffffffff818220da
ffffffff81e3fe58
[  628.159752]  ffff8800cad07a98 ffff8800cad07a88 ffffffff8104c5b5
dead000000100100
[  628.159755]  ffff88040c5772c0 0000000000000002 000000000000000f
ffff88040dc79000
[  628.159758] Call Trace:
[  628.159763]  [<ffffffff818220da>] dump_stack+0x45/0x57
[  628.159767]  [<ffffffff8104c5b5>] warn_slowpath_common+0x85/0xc0
[  628.159771]  [<ffffffff8104c631>] warn_slowpath_fmt+0x41/0x50
[  628.159775]  [<ffffffff811653a5>] ? d_walk+0x65/0x2e0
[  628.159778]  [<ffffffff81165720>] ? __d_drop+0xb0/0xb0
[  628.159782]  [<ffffffff8116e9f3>] umount_tree+0x33/0x2e0
[  628.159785]  [<ffffffff81828e21>] ? down_write+0x11/0x40
[  628.159789]  [<ffffffff8116f499>] __detach_mounts+0x59/0x90
[  628.159793]  [<ffffffff81166415>] d_invalidate+0xc5/0xf0
[  628.159797]  [<ffffffff811c0aa0>] nfs_readdir_page_filler+0x250/0x470
[  628.159801]  [<ffffffff811c0e97>] nfs_readdir_xdr_to_array+0x1d7/0x2b0
[  628.159806]  [<ffffffff811c0f70>] ? nfs_readdir_xdr_to_array+0x2b0/0x2b0
[  628.159809]  [<ffffffff811c0f8d>] nfs_readdir_filler+0x1d/0x80
[  628.159812]  [<ffffffff811029de>] do_read_cache_page+0x7e/0x1a0
[  628.159816]  [<ffffffff81102b17>] read_cache_page+0x17/0x20
[  628.159819]  [<ffffffff811c113e>] nfs_readdir+0x14e/0x540
[  628.159823]  [<ffffffff811d9fd0>] ? nfs3_xdr_dec_fsstat3res+0xe0/0xe0
[  628.159827]  [<ffffffff81162227>] iterate_dir+0x97/0x130
[  628.159830]  [<ffffffff8115ea81>] ? final_putname+0x21/0x50
[  628.159834]  [<ffffffff8119b729>] compat_SyS_getdents64+0x79/0x100
[  628.159836]  [<ffffffff81199b70>] ? compat_filldir+0x120/0x120
[  628.159839]  [<ffffffff8182c6ef>] sysenter_dispatch+0x7/0x1e
[  628.159841] ---[ end trace 1e197c39fef606b1 ]---

Here you can see the steam process listing a directory on a NFS3 filesystem, which leads to umount_tree being called on /proc.

If I boot the identical system through different means (anything else but nfsroot), then this does not happen.
Comment 1 Lubos Dolezel 2015-09-05 18:27:22 UTC
More information: the above does NOT happen when / is NFS mounted by dracut. It only happens when root=/dev/nfsroot is used.
Comment 2 Lubos Dolezel 2015-09-09 08:36:04 UTC
I take it back, random forced unmounts happen with / mounted via NFS by dracut as well. This time I noticed that apart from /proc, /dev was unmounted as well.

[ 5391.608196] ------------[ cut here ]------------
[ 5391.608205] WARNING: CPU: 2 PID: 5740 at fs/namespace.c:1335
umount_tree+0x33/0x2e0()
[ 5391.608207] umount_tree: proc
[ 5391.608209] Modules linked in: cts rpcsec_gss_krb5 snd_usb_audio
snd_usbmidi_lib nvidia(PO) x86_pkg_temp_thermal
[ 5391.608217] CPU: 2 PID: 5740 Comm: krusader Tainted: P        W  O
3.19.1-gentoo #12
[ 5391.608219] Hardware name: System manufacturer System Product Name/P8Z77-V
LX, BIOS 2204 08/14/2013
[ 5391.608221]  ffffffff81be50d8 ffff8803accdba38 ffffffff81821fba
ffffffff81e3fe58
[ 5391.608224]  ffff8803accdba88 ffff8803accdba78 ffffffff8104c5b5
dead000000100100
[ 5391.608227]  ffff8804098503c0 0000000000000002 000000000000000f
ffff880408cb5c00
[ 5391.608230] Call Trace:
[ 5391.608235]  [<ffffffff81821fba>] dump_stack+0x45/0x57
[ 5391.608240]  [<ffffffff8104c5b5>] warn_slowpath_common+0x85/0xc0
[ 5391.608243]  [<ffffffff8104c631>] warn_slowpath_fmt+0x41/0x50
[ 5391.608248]  [<ffffffff811653a5>] ? d_walk+0x65/0x2e0
[ 5391.608251]  [<ffffffff81165720>] ? __d_drop+0xb0/0xb0
[ 5391.608255]  [<ffffffff8116e9f3>] umount_tree+0x33/0x2e0
[ 5391.608258]  [<ffffffff81828cd1>] ? down_write+0x11/0x40
[ 5391.608262]  [<ffffffff8116f499>] __detach_mounts+0x59/0x90
[ 5391.608266]  [<ffffffff81166415>] d_invalidate+0xc5/0xf0
[ 5391.608270]  [<ffffffff811c0aa0>] nfs_readdir_page_filler+0x250/0x470
[ 5391.608275]  [<ffffffff811c0e97>] nfs_readdir_xdr_to_array+0x1d7/0x2b0
[ 5391.608279]  [<ffffffff811c0f70>] ? nfs_readdir_xdr_to_array+0x2b0/0x2b0
[ 5391.608283]  [<ffffffff811c0f8d>] nfs_readdir_filler+0x1d/0x80
[ 5391.608286]  [<ffffffff811029de>] do_read_cache_page+0x7e/0x1a0
[ 5391.608289]  [<ffffffff81102b17>] read_cache_page+0x17/0x20
[ 5391.608293]  [<ffffffff811c113e>] nfs_readdir+0x14e/0x540
[ 5391.608297]  [<ffffffff811d9fd0>] ? nfs3_xdr_dec_fsstat3res+0xe0/0xe0
[ 5391.608301]  [<ffffffff81162227>] iterate_dir+0x97/0x130
[ 5391.608305]  [<ffffffff811626ac>] SyS_getdents+0x7c/0xf0
[ 5391.608308]  [<ffffffff81162390>] ? fillonedir+0xd0/0xd0
[ 5391.608312]  [<ffffffff8182a752>] system_call_fastpath+0x12/0x17
[ 5391.608314] ---[ end trace c9220b75ce5879c3 ]---
Comment 3 bfields 2015-10-01 20:43:29 UTC
Apologies, doesn't ring a bell for me.  Might be worth just trying a more recent kernel to see if something's been fixed since 3.19.

Note You need to log in before you can comment on or make changes to this bug.