Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to process init request #1579

Open
xujihui1985 opened this issue May 20, 2024 · 4 comments
Open

unable to process init request #1579

xujihui1985 opened this issue May 20, 2024 · 4 comments
Labels

Comments

@xujihui1985
Copy link
Contributor

xujihui1985 commented May 20, 2024

When downloading the release binary directly from GitHub, I'm unable to mount a simple daemon with version v2.2.5. The error message is as follows:
2fb9a19f-be0e-4b26-9b7f-2562ca14e98a

After debugging for a while, I discovered an undocumented feature fuse-t. According to the code, if the fuse-t feature is not enabled, it expects the fuse_init_extend flag to be set. This causes the initialization process to hang.
image

When I commented out this code, the daemon started normally.

reproduce

create a bootstrap and blob file from a local directory

nydus-image create -B image.boot -b image.blob ./glibc-2.28

start nydusd with newly created image.boot with localfs-dir

nydusd fuse -l trace -M ./testdir -B image.boot -D ./

@imeoer
Copy link
Collaborator

imeoer commented May 24, 2024

After offline discussion, we should make FsOptions::INIT_EXT optional.

@imeoer imeoer added the feature label May 24, 2024
@xujihui1985
Copy link
Contributor Author

xujihui1985 commented May 25, 2024

After offline discussion, we should make FsOptions::INIT_EXT optional.

I would like to take this PR if no one has been assigned

@xujihui1985
Copy link
Contributor Author

xujihui1985 commented Jun 16, 2024

it seems not trivial to toggle this options in runtime by extend a config object on Filesystem instance like this

  #[cfg(target_os = "linux")]
        if self.fs.enable_fuse_init {
          if flags_u64 & FsOptions::INIT_EXT.bits() != 0 {
              let InitIn2 { flags2, unused: _ } = ctx.r.read_obj().map_err(Error::DecodeMessage)?;
              flags_u64 |= (flags2 as u64) << 32;
          }
        }

as there is no way to extend the fs instance or self at this moment, as an alternative, we could add a new build feature like this, although I'm not quite happy this cfg approach

         #[cfg(all(target_os = "linux", feature="fuse_init_ext"))]
          if flags_u64 & FsOptions::INIT_EXT.bits() != 0 {
              let InitIn2 { flags2, unused: _ } = ctx.r.read_obj().map_err(Error::DecodeMessage)?;
              flags_u64 |= (flags2 as u64) << 32;
          }

what's your idea? @imeoer

@imeoer
Copy link
Collaborator

imeoer commented Jun 18, 2024

@xujihui1985 It seems that using feature to control the option is a bit heavy, whether we can add option as the param of Server::new ?
cc @jiangliu @bergwolf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants