From: ebiederm@xmission.com (Eric W. Biederman)
To: Ross Lagerwall <rosslagerwall@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Mount propagation issue
Date: Mon, 29 Sep 2014 16:30:31 -0700 [thread overview]
Message-ID: <87iok657jc.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <20140926233125.GA6918@hobo.lan> (Ross Lagerwall's message of "Sat, 27 Sep 2014 00:31:25 +0100")
Ross Lagerwall <rosslagerwall@gmail.com> writes:
> Hi,
>
> I have encountered a strange bug (on 3.14, 3.16.3 and master) regarding
> mount namespaces and a particular directory. Somehow, mounts are being
> mounted successfully but disappearing when the process dies, but only
> for /mnt/puppy, not for any other directory in the system:
>
> # grep puppy /proc/mounts # nothing mounted yet
> # mount -t tmpfs tmpfs /mnt/puppy
> # grep puppy /proc/mounts # no output
>
> # mount -t tmpfs tmpfs /mnt/puppy2
> # grep puppy /proc/mounts
> tmpfs /mnt/puppy2 tmpfs rw,relatime 0 0
>
> Furthermore, I wrote a program to mount /mnt/puppy and immediately
> read /proc/mounts:
> # grep puppy /proc/mounts # no output
> # ./mounter
> tmpfs /mnt/puppy tmpfs rw,relatime 0 0
> # grep puppy /proc/mounts # no output
>
> Finally, I note that the problem seems to occur if the mount needs to be
> propagated to the default namespace (note that systemd causes namespaces
> to be shared by default):
> # unshare -m
>
> subshell # mount -t tmpfs tmpfs /mnt/puppy
> subshell # grep puppy /proc/mounts # no output
> subshell # mount --make-rprivate /
> subshell # mount -t tmpfs tmpfs /mnt/puppy
> subshell # grep puppy /proc/mounts # success!
> tmpfs /mnt/puppy tmpfs rw,relatime 0 0
> subshell # umount /mnt/puppy
> subshell # exit
>
> # mount --make-rprivate / # back in the default namespace
> # mount -t tmpfs tmpfs /mnt/puppy
> # grep puppy /proc/mounts # no output
>
> I hope someone has an idea of what's going on or how to debug this
> because I've run out of ideas...
My guess is that some process (systemd?) is configured to unmount that
directory if anything shows up mounted on it. So when the mount
propogates it gets unmounted and then the unmount propogates as well.
Eric
next prev parent reply other threads:[~2014-09-29 23:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 23:31 Ross Lagerwall
2014-09-29 23:30 ` Eric W. Biederman [this message]
2014-09-30 17:46 ` Ross Lagerwall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iok657jc.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosslagerwall@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome