Bug 1804849 - fuse-overlayfs segfault
Summary: fuse-overlayfs segfault
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: fuse-overlayfs
Version: 8.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
Depends On: 1805013 1805014 1805015 1805016 1805017
TreeView+ depends on / blocked
Reported: 2020-02-19 18:21 UTC by Adrian Reber
Modified: 2020-04-28 15:54 UTC (History)
8 users (show)

Fixed In Version: fuse-overlayfs-0.7.2-5.el8, container-tools-rhel8-8020020200319160326.0d58ad57
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-28 15:53:22 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1650 0 None None None 2020-04-28 15:54:06 UTC

Description Adrian Reber 2020-02-19 18:21:20 UTC
Trying to run easybuild in a rootless containers gives me a fuse-overlayfs segfault.


Process 24374 (fuse-overlayfs) of user 1000 dumped core.
Stack trace of thread 24374:
#0  0x000000000040d5c0 hash_get_first (fuse-overlayfs)
#1  0x0000000000405074 count_dir_entries.isra.15 (fuse-overlayfs)
#2  0x000000000040c1cc do_rm (fuse-overlayfs)
#3  0x00007f9de6ef6afa fuse_session_process_buf_int (libfuse3.so.3)
#4  0x00007f9de6ef1f5b fuse_session_loop (libfuse3.so.3)
#5  0x0000000000403835 main (fuse-overlayfs)
#6  0x00007f9de671c6a3 __libc_start_main (libc.so.6)
#7  0x00000000004038ee _start (fuse-overlayfs)

Steps to reproduce (rootless):

$ cat Dockerfile.ohpc-gnu9-easybuild
FROM quay.io/ohpc/ohpc-gnu9:1.9.9


RUN useradd -ms /bin/bash openhpc

RUN yum -y install EasyBuild-ohpc && \
    yum -y install patch make perl && \
    yum clean all

WORKDIR /home/openhpc
USER openhpc

ENV PATH="/opt/ohpc/pub/libs/easybuild/4.1.1/software/EasyBuild/4.1.1/bin:${PATH}"
ENV PYTHONPATH="/opt/ohpc/pub/libs/easybuild/4.1.1/software/EasyBuild/4.1.1/lib/python3.6/site-packages"

# This way all commands passed into the container are executed in a
# login shell which is necessary to get lmod working. Commands
# need to be enclosed in quotes.
ENTRYPOINT ["/bin/bash", "-l", "-c"]

$ podman build . -f Dockerfile.ohpc-gnu9-easybuild --tag=ohpc-gnu9-easybuild:1.9.9 
$ podman run ohpc-gnu9-easybuild:1.9.9 'eb --robot lz4-1.9.2-GCCcore-8.3.0.eb'

Now it will abort and the segfault from above can be seen in the logs. 

The segfault does not happen when running as root.

Comment 1 Giuseppe Scrivano 2020-02-19 21:44:41 UTC
it is fixed upstream with:

commit 214d606084453f0d2831317a9048a3cbc554fcc4
Author: Giuseppe Scrivano <gscrivan@redhat.com>
Date:   Wed Jan 15 00:02:43 2020 +0100

    main: check if file is whiteout
    when doing a lookup, make sure the returned file is not a whiteout for
    functions that expect the file to exist.
    Close: https://github.com/containers/fuse-overlayfs/issues/169
    Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

I had to add bzip2 to the Dockerfile for the command to complete

Comment 16 Alex Jia 2020-03-21 06:00:22 UTC
Verified in fuse-overlayfs-0.7.2-5.module+el8.2.0+6060+9dbc027d.x86_64.

Please also see known bug - fuse-overlayfs: could not find file with easybuild - https://bugzilla.redhat.com/show_bug.cgi?id=1815139

Comment 18 errata-xmlrpc 2020-04-28 15:53:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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