apache / buildstream

BuildStream, the software integration tool
https://buildstream.build/
Apache License 2.0
83 stars 28 forks source link

errMsg 'The FUSE stager child process unexpectedly died with exit code 2' #1930

Closed leoppark94 closed 2 months ago

leoppark94 commented 3 months ago

Description

I used Dockerhub - buildstream image (latest) and modified it a little bit to use freedesktop-sdk.

FROM fedora:38

ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

# install all system dependencies
RUN \
    # Install dependencies
    dnf install --assumeyes \
        # buildstream dependencies
        bubblewrap \
        fuse3 \
        fuse3-devel \
        # plugin dependencies
        bzr \
        git \
        lzip \
        ostree \
        patch \
        quilt \
        # python-build dependencies
        python3-pip \
        # utilities dependencies
        bash-completion \
        # toolbox dependencies
        toolbox-support \
        # GNU Make
        make \
    && \
    # install python dependencies
    # Force the ARCHI to be a generic x86_64 CPU. This is needed because of
    # PyRoaring, which compiles otherwise with '-march=native', which creates
    # problems when the builder has more features than hosts on which the
    # docker image is run afterwards.
    # Related to https://gitlab.com/BuildStream/buildstream-docker-images/issues/46
    ARCHI=x86-64 pip3 install \
        'BuildStream == 2.*' \
        'buildstream-plugins == 2.*' \
        arpy \
        git+https://gitlab.com/BuildStream/bst-plugins-experimental@1.100.1 \
        requests \
        'Dulwich==0.21.7' \
    && \
    # Cleanup afterwards
    dnf remove --assumeyes gcc gcc-c++ python3-devel && \
    dnf clean all

# Clone the freedesktop-sdk repository
RUN git clone https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git /opt/freedesktop-sdk

# Set the working directory (optional, if you need to work in the cloned repo)
WORKDIR /opt/freedesktop-sdk

But

Build Error Log

BuildStream 2.2.1 - Friday, 05-07-2024 at 14:41:56
[--:--:--] START   [3f525678] bootstrap/base-sdk/binary-seed.bst: Build
[--:--:--] LOG     [3f525678] bootstrap/base-sdk/binary-seed.bst: Build environment for element bootstrap/base-sdk/binary-seed.bst

    PATH: /cross/bin:/bin
    SHELL: /bin/sh
    TERM: dumb
    USER: tomjon
    USERNAME: tomjon
    LOGNAME: tomjon
    LC_ALL: en_US.UTF-8
    HOME: /tmp
    TZ: UTC
    SOURCE_DATE_EPOCH: 1320937200
    CFLAGS: '-O2 -pipe -g  '
    CXXFLAGS: '-O2 -pipe -g  '
    LDFLAGS: '-Wl,-z,relro,-z,now -Wl,--as-needed '
    RUSTFLAGS: '-Cforce-frame-pointers=yes '
    G_SLICE: always-malloc
    OMP_NUM_THREADS: 8
    PYTHON: /usr/bin/python3
    PYTHONHASHSEED: 0
    GZIP: --no-name
[--:--:--] START   [3f525678] bootstrap/base-sdk/binary-seed.bst: Staging dependencies
[--:--:--] STATUS  [ab108ad6] bootstrap/base-sdk/binary-seed-x86_64.bst: Staging bootstrap/base-sdk/binary-seed-x86_64.bst/ab108ad6
[00:00:00] SUCCESS [3f525678] bootstrap/base-sdk/binary-seed.bst: Staging dependencies
[--:--:--] START   [3f525678] bootstrap/base-sdk/binary-seed.bst: Computing split
[00:00:00] SUCCESS [3f525678] bootstrap/base-sdk/binary-seed.bst: Computing split
[--:--:--] START   [3f525678] bootstrap/base-sdk/binary-seed.bst: Integrating sandbox
[--:--:--] START   bootstrap/base-sdk/binary-seed.bst: Running commands

    ldconfig
    mkdir -p "/usr/lib/locale"
    localedef --no-archive -i en_US -f UTF-8 en_US.UTF-8
2024-07-05T14:41:56.669+0000 [31728:124672037195712] [buildboxcommon_runner.cpp:437] [ERROR] [actionDigest=fcb234a7fc2677fa87223c99898a8d495c7e535adb72b86c6f9b2580ebd5b40f/178] Error executing command: std::runtime_error exception thrown at [buildboxcommon_casclient.cpp:927], errMsg = "Error staging "bed3b6ae2814e8306a160e73e5365abe085240a3bc2579d3949cf8c272753185/528" into "": "std::runtime_error exception thrown at [buildboxcasd_fusestager.cpp:144], errMsg = "The FUSE stager child process unexpectedly died with exit code 2"""
[00:00:00] FAILURE bootstrap/base-sdk/binary-seed.bst: Running commands
[00:00:00] FAILURE [3f525678] bootstrap/base-sdk/binary-seed.bst: Integrating sandbox
[00:00:00] FAILURE [3f525678] bootstrap/base-sdk/binary-seed.bst: buildbox-run failed with returncode 1

This kind of error keeps occurring.

The same problem occurs when I run this example Buildstream Example2.

I don't know how to solve this problem.

juergbi commented 3 months ago

This means that the FUSE mount failed. Either /dev/fuse is not available or the container is not running with sufficient privileges for FUSE mounts. Passing --privileged --device /dev/fuse to docker run might fix the issue, although it may be somewhat overkill.

leoppark94 commented 2 months ago

@juergbi It works, thank you!