SerCeMan / jnr-fuse

FUSE implementation in Java using Java Native Runtime (JNR)
MIT License
361 stars 87 forks source link

JVM crash with jnr-fuse and javafx #162

Open evial opened 1 year ago

evial commented 1 year ago

Hi, I've recently upgraded my PC from Ubuntu 20.04 to 22.04 and I'm now facing a JVM crash on a program using jnr-fuse and javafx. A similar crash can be easily reproduced with a Hello World javafx code and a call to to the MemoryFS mount method. The same program runs properly on Ubuntu 20.04. I have no idea whether the problem comes from the jnr-fuse, javafx ou even jnr-ffi layers. Have you ever heard of such issues? Thanks Eric

public class HelloApplication extends Application {
    @Override
    public void start(Stage stage) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
        Scene scene = new Scene(fxmlLoader.load(), 320, 240);
        stage.setTitle("Hello!");
        stage.setScene(scene);
        stage.show();

        MemoryFS memfs = new MemoryFS();
        String path = "/tmp/mntm";
        memfs.mount(Paths.get(path), true, true);
    }

    public static void main(String[] args) {
        launch();
    }
}
/lib/jvm/java-17-openjdk-amd64/bin/java --module-path /usr/share/openjfx/lib --add-modules=javafx.controls,javafx.fxml -javaagent:/home/eric/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5080.210/lib/idea_rt.jar=34579:/home/eric/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5080.210/bin -Dfile.encoding=UTF-8 -classpath /home/eric/Documents/Vawlt/workspace/demo/target/classes:/home/eric/.m2/repository/org/openjfx/javafx-controls/19/javafx-controls-19.jar:/home/eric/.m2/repository/org/openjfx/javafx-controls/19/javafx-controls-19-linux.jar:/home/eric/.m2/repository/org/openjfx/javafx-graphics/19/javafx-graphics-19.jar:/home/eric/.m2/repository/org/openjfx/javafx-graphics/19/javafx-graphics-19-linux.jar:/home/eric/.m2/repository/org/openjfx/javafx-base/19/javafx-base-19.jar:/home/eric/.m2/repository/org/openjfx/javafx-base/19/javafx-base-19-linux.jar:/home/eric/.m2/repository/org/openjfx/javafx-fxml/19/javafx-fxml-19.jar:/home/eric/.m2/repository/org/openjfx/javafx-fxml/19/javafx-fxml-19-linux.jar:/home/eric/.m2/repository/com/github/serceman/jnr-fuse/0.5.7/jnr-fuse-0.5.7.jar:/home/eric/.m2/repository/com/github/jnr/jnr-ffi/2.2.7/jnr-ffi-2.2.7.jar:/home/eric/.m2/repository/com/github/jnr/jffi/1.3.5/jffi-1.3.5.jar:/home/eric/.m2/repository/com/github/jnr/jffi/1.3.5/jffi-1.3.5-native.jar:/home/eric/.m2/repository/org/ow2/asm/asm/9.2/asm-9.2.jar:/home/eric/.m2/repository/org/ow2/asm/asm-commons/9.2/asm-commons-9.2.jar:/home/eric/.m2/repository/org/ow2/asm/asm-analysis/9.2/asm-analysis-9.2.jar:/home/eric/.m2/repository/org/ow2/asm/asm-tree/9.2/asm-tree-9.2.jar:/home/eric/.m2/repository/org/ow2/asm/asm-util/9.2/asm-util-9.2.jar:/home/eric/.m2/repository/com/github/jnr/jnr-a64asm/1.0.0/jnr-a64asm-1.0.0.jar:/home/eric/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/home/eric/.m2/repository/com/github/jnr/jnr-posix/3.1.10/jnr-posix-3.1.10.jar:/home/eric/.m2/repository/com/github/jnr/jnr-constants/0.10.2/jnr-constants-0.10.2.jar com.example.demo.HelloApplication
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.34
flags=0x33fffffb
max_readahead=0x00020000
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb8bc807189, pid=19620, tid=19708
#
# JRE version: OpenJDK Runtime Environment (17.0.4+8) (build 17.0.4+8-Ubuntu-122.04)
# Java VM: OpenJDK 64-Bit Server VM (17.0.4+8-Ubuntu-122.04, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [jffi9068545089359757521.so+0x7189]
#
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>19</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>19</version>
        </dependency>
        <dependency>
            <groupId>com.github.serceman</groupId>
            <artifactId>jnr-fuse</artifactId>
            <version>0.5.7</version>
        </dependency>
    </dependencies>