OverlayFS: Wrong mnt_id and path reported in /proc
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | linux (Ubuntu) |
Medium
|
Unassigned | ||
| | Trusty |
Medium
|
Unassigned | ||
| | Vivid |
Medium
|
Chris J Arges | ||
Bug Description
SRU Justification:
[Impact]
I am running Ubuntu Vivid (3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux). There are two issues in OverlayFS as follows:
1. /proc/<
2. /proc/<pid>/fd/<fd> shows incorrect path for the symlink target
[Fix]
These problems can be easily reproduced with the shell script below. Fortunately, both problems have been fixed in the upstream's master branch of the kernel via the following commits:
torvalds 4.0: 155e35d4d VFS: Introduce inode-getting helpers for layered/unioned fs environments (this is already in ubuntu-vivid)
torvalds 4.0: df1a085af VFS: Add a fallthrough flag for marking virtual dentries
torvalds 4.2-rc2: f25801ee4 overlay: Call ovl_drop_write() earlier in ovl_dentry_open()
torvalds 4.2-rc2: 4bacc9c92 overlayfs: Make f_path always point to the overlay and f_inode to the underlay
torvalds 4.2-rc2: 9391dd00d fix a braino in ovl_d_select_
(The commit df1a085af may technically not be needed but it prevents a conflict when applying 4bacc9c92.)
[Test Case]
Simple script to reproduce the problem:
#!/bin/bash
set -eu
ERROR=0
setup() {
setup_mount
start_python > /dev/null 2>&1 &
BASH_PID=$!
PYTHON_PID=$(ps -C python | awk '/python/ { print $1 }')
sleep 1
}
setup_mount() {
mkdir overlay_test
cd overlay_test
mkdir a b c z
sudo mount -t overlay -o lowerdir=
}
start_python() {
python << EOF
import time
fd = open("z/file", "w")
time.sleep(10)
EOF
}
check_path() {
WD=$(pwd)
if ! ls -l /proc/$
ERROR=1
echo "ERROR! expected $WD/z/file"
set -x
ls -l /proc/$
set +x
fi
}
check_mnt_id() {
FDINFO_
MOUNTINFO_
if [[ $FDINFO_MNT_ID -ne $MOUNTINFO_MNT_ID ]]; then
ERROR=1
echo "ERROR! mnt_id $FDINFO_MNT_ID not in /proc/self/
set -x
cat /proc/$
cat /proc/self/
set +x
fi
}
finish() {
kill -INT $PYTHON_PID > /dev/null 2>&1
sudo umount z
cd $ORIG_WD
rm -rf overlay_test
}
main() {
ORIG_WD=$(pwd)
setup
check_path
check_mnt_id
finish
[[ $ERROR -eq 0 ]] && echo "OverlayFS looks good."
}
main
Related branches
| Changed in linux (Ubuntu): | |
| importance: | Undecided → Medium |
| Changed in linux (Ubuntu Vivid): | |
| importance: | Undecided → Medium |
| tags: | added: kernel-da-key vivid |
| Changed in linux (Ubuntu): | |
| status: | New → Incomplete |
| Changed in linux (Ubuntu Vivid): | |
| status: | New → Incomplete |
| tags: | added: bot-stop-nagging |
| Changed in linux (Ubuntu): | |
| status: | Incomplete → Triaged |
| Changed in linux (Ubuntu Vivid): | |
| status: | Incomplete → Triaged |
| Changed in linux (Ubuntu Vivid): | |
| assignee: | nobody → Chris J Arges (arges) |
| description: | updated |
| Chris J Arges (arges) wrote : | #2 |
I posted these patches to the kernel team ML. I've tested the above reproducer script and it does indeed fix the issue, and in addition I've ran the unionmount-
| Saied Kazemi (saied) wrote : Re: [Bug 1479468] Re: OverlayFS: Wrong mnt_id and path reported in /proc | #3 |
Great! Thanks a lot Chris.
--Saied
On Thu, Jul 30, 2015 at 7:43 AM, Chris J Arges <email address hidden>
wrote:
> I posted these patches to the kernel team ML. I've tested the above
> reproducer script and it does indeed fix the issue, and in addition I've
> ran the unionmount-
> regressions were noticed (all test passing).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> OverlayFS: Wrong mnt_id and path reported in /proc
>
> Status in linux package in Ubuntu:
> Triaged
> Status in linux source package in Vivid:
> Triaged
>
> Bug description:
> SRU Justification:
>
> [Impact]
>
> I am running Ubuntu Vivid (3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16
> 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux). There are two
> issues in OverlayFS as follows:
>
> 1. /proc/<
> /proc/<
>
> 2. /proc/<pid>/fd/<fd> shows incorrect path for the symlink target
>
> [Fix]
>
> These problems can be easily reproduced with the shell script below.
> Fortunately, both problems have been fixed in the upstream's master
> branch of the kernel via the following commits:
>
> torvalds 4.0: 155e35d4d VFS: Introduce inode-getting helpers for
> layered/unioned fs environments (this is already in ubuntu-vivid)
>
> torvalds 4.0: df1a085af VFS: Add a fallthrough flag for marking
> virtual dentries
> torvalds 4.2-rc2: f25801ee4 overlay: Call ovl_drop_write() earlier
> in ovl_dentry_open()
> torvalds 4.2-rc2: 4bacc9c92 overlayfs: Make f_path always point to
> the overlay and f_inode to the underlay
> torvalds 4.2-rc2: 9391dd00d fix a braino in ovl_d_select_
>
> (The commit df1a085af may technically not be needed but it prevents a
> conflict when applying 4bacc9c92.)
>
> [Test Case]
>
> Simple script to reproduce the problem:
>
> #!/bin/bash
>
> set -eu
>
> ERROR=0
>
> setup() {
> setup_mount
> start_python > /dev/null 2>&1 &
> BASH_PID=$!
> PYTHON_PID=$(ps -C python | awk '/python/ { print $1 }')
> sleep 1
> }
>
> setup_mount() {
> mkdir overlay_test
> cd overlay_test
> mkdir a b c z
> sudo mount -t overlay -o lowerdir=
> }
>
> start_python() {
> python << EOF
> import time
> fd = open("z/file", "w")
> time.sleep(10)
> EOF
> }
>
> check_path() {
> WD=$(pwd)
> if ! ls -l /proc/$
> ERROR=1
> echo "ERROR! expected $WD/z/file"
> set -x
> ls -l /proc/$
> set +x
> fi
> }
>
> check_mnt_id() {
> FDINFO_MNT_ID=$(awk '/mnt_id:/ { print $2 }' /proc/$
> MOUNTINFO_
> if [[ $FDINFO_MNT_ID -ne $MOUNTINFO_MNT_ID ]]; then
> ERROR=1
> echo "ERROR! mnt_id $FDINFO_MNT_ID not in /proc/self/
> set -x
> cat /proc/$
> cat /proc/self/
> set +x
> fi
> }
>
> f...
| Changed in linux (Ubuntu Vivid): | |
| status: | Triaged → Fix Committed |
| Luis Henriques (henrix) wrote : | #4 |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/
| tags: | added: verification-needed-vivid |
| Saied Kazemi (saied) wrote : | #5 |
Installed from -proposed (see below) and verified that it fixes the OverlayFS mnt_id and symlink target path issues.
Selected version '3.19.0-27.29' (Ubuntu:
tags:changed: verification-
| tags: |
added: verification-done-vivid removed: verification-needed-vivid |
| Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package linux - 3.19.0-28.30
---------------
linux (3.19.0-28.30) vivid; urgency=low
[ Luis Henriques ]
* Release Tracking Bug
- LP: #1490606
[ Gary Wang ]
* SAUCE: i915_bpo: drm/i915: set CDCLK if DPLL0 enabled during resuming
from S3
- LP: #1490035
[ Timo Aaltonen ]
* Revert "SAUCE: i915_bpo: drm/i915/skl: DDI-E and DDI-A shares 4 lanes."
- LP: #1490038
linux (3.19.0-27.29) vivid; urgency=low
[ Brad Figg ]
* Release Tracking Bug
- LP: #1485113
[ Adam Lee ]
* SAUCE: serial: 8250_pci: Add support for Pericom PI7C9X795[1248]
- LP: #1480142
[ Arun Siluvery ]
* SAUCE: i915_bpo: drm/i915/gen8: Add infrastructure to initialize WA
batch buffers
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen8: Re-order init pipe_control in lrc mode
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen8: Add WaDisableCtxRes
workaround
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen8: Add
WaFlushCohe
- LP: #1484486
* SAUCE: i915_bpo: drm/i915: Bail out early if WA batch is not available
for given Gen
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen8: Add WaClearSlmSpace
workaround
- LP: #1484486
* SAUCE: i915_bpo: drm/i915: Update
WaFlushCohe
- LP: #1484486
* SAUCE: i915_bpo: drm/i915: Enable WA batch buffers for Gen9
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen9: Add WaDisableCtxRes
workaround
- LP: #1484486
* SAUCE: i915_bpo: drm/i915: Update wa_ctx_emit() macro as per kernel
coding guidelines
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen9: Add
WaFlushCohe
- LP: #1484486
* SAUCE: i915_bpo: drm/i915/gen9: Add
WaSetDisabl
- LP: #1484486
* SAUCE: i915_bpo: drm/i915:skl: Add WaEnableGapsTsv
- LP: #1484486
[ Chris Wilson ]
* SAUCE: i915_bpo: drm/i915: Use two 32bit reads for select 64bit
REG_READ ioctls
- LP: #1484482
* SAUCE: i915_bpo: drm/i915: Replace WARN inside I915_READ64_2x32 with
retry loop
- LP: #1484482
* SAUCE: i915_bpo: drm/i915: Mark PIN_USER binding as GLOBAL_BIND without
the aliasing ppgtt
- LP: #1484482
* SAUCE: i915_bpo: drm/i915: Declare the swizzling unknown for L-shaped
configurations
- LP: #1484482
[ Damien Lespiau ]
* SAUCE: i915_bpo: drm/i915/skl: Don't expose the top most plane on gen9
display
- LP: #1484486
[ Daniel Vetter ]
* SAUCE: i915_bpo: drm/i915: Fixup dp mst encoder selection
- LP: #1484482
[ David Weinehall ]
* SAUCE: i915_bpo: drm/i915: Allow parsing of variable size child device
entries from VBT
* SAUCE: i915_bpo: drm/i915: Allow parsing of variable size child device
entries from VBT, addendum v2
- LP: #1484482
[ Jani Nikula ]
* SAUCE: i915_bpo: drm/i915/skl: WaIgnoreDDIAStrap is forever, always
init DDI A
- LP: #1484486
* SAUCE: i915_bpo: drm/i915: reduce indent in i9xx_hpd_
- LP: #1484531
* SAUCE: i915_bpo: drm/i91...
| Changed in linux (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |
| oleg (overlayfs) wrote : | #8 |
Bug #1507463 has been filed for the 3.13 kernel in Ubuntu Trusty, which is also affected and has not yet been patched.
| Launchpad Janitor (janitor) wrote : | #9 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in linux (Ubuntu Trusty): | |
| status: | New → Confirmed |
| Changed in linux (Ubuntu Trusty): | |
| assignee: | nobody → Chris J Arges (arges) |
| importance: | Undecided → Medium |
| status: | Confirmed → In Progress |
| Changed in linux (Ubuntu): | |
| status: | Triaged → Fix Released |
| Changed in linux (Ubuntu Trusty): | |
| assignee: | Chris J Arges (arges) → nobody |
| status: | In Progress → Won't Fix |


This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1479468
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.