Code Monkey home page Code Monkey logo

Comments (8)

brettkettering avatar brettkettering commented on August 15, 2024

BTW, this was discovered on Cielito, which is running an old version of FUSE, 2.7.2. This may be an issue with FUSE.

We should test this some place where we have a 2.8.5 or preferably 2.8.6 version of FUSE installed.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

I have access to Cub which has fuse 2.8.3 (the latest version we can get at the moment). Unfortunately, Cub is unavailable for the next few days due to some io node testing. Once that is out of the way we can test this problem against the newer version of fuse.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

I decided to run this on rr-dev to see if I could find anything interesting in the mlog files and I couldn't reproduce this using FUSE. Is this an adio specific problem? The ticket doesn't give me that impression.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

This is a FUSE thing. You shouldn't need mlog, you should get a seg fault. I don't seem to have an account on rr-dev, so I can't see what version of FUSE is installed there.

If it does not happen on FUSE 2.8.x (rr-dev has this version?), then try on Smog's front-end (2.7.2) and see if you get the error.

If you get the error on 2.7.2, but not on 2.8.x, then my hypothesis is it is fixed in later versions of FUSE. If you don't get the error on either, I wonder why we do with Crestone, maybe the compiler they use? We can try their compiler.

If you are using trunk rather than 2.1, try with 2.1 and see if you get the error. Maybe we have it fixed in the PLFS code now.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

The version of FUSE on rr-dev is 2.7.4, I am currently running the 2.1.1 version of PLFS for testing. I will try to run this on Smog using 2.1.1 and if I still don't run into this error I'll try 2.1.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

After running this test on Smog I can recreate the problem only with version 2.1. With version 2.1.1 the results of rewinddir were what you would expect, it resets the stream and you get the proper count for the elements in the directory. However, with version 2.1 the result of rewinddir is that the directory stream is not rewound and dirent is NULL as expected from the problem description.

Considering how little was supposedly changed between 2.1 and 2.1.1 it may not be too difficult to find why one works while the other does not.

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

I think I've found the problem here. In version 2.1 the function f_readdir in plfs_fuse.cpp has the line:
if(ret!=0) PLFS_EXIT;
while version 2.1.1 does not.

Unfortunately, since PLFS_EXIT is a multiline macro only the first line of the macro isn't executed on the condition. Therefore, the rest of the PLFS_EXIT macro is run regardless of the value of ret, and since PLFS_EXIT includes the line
return ret;
the function always exits whenever it hits this line. Which means that it will skip the call to the fuse_fill_dir_t that adds directory entries.

You can see the multiline macro problem for yourself, if you compile and run:

1 #include <stdio.h>
2
3 #define MACRO printf("Line1\n"); \
4 printf("Line2\n");
5
6 int main() {
7 if (1 == 0) MACRO;
8 return 0;
9 }

you should always see:

$./macro
$Line2

from plfs-core.

brettkettering avatar brettkettering commented on August 15, 2024

Moving the PLFS_EXIT in 2.1.1 was a side-effect of the exception catching added to 2.1.1 a couple of weeks ago. I've added the code to trunk now as well.

from plfs-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.