Skip to content

JansiLoader.cleanup() throws OutOfMemory error if /tmp/ has 250,000+ directories #300

@tcstellin

Description

@tcstellin

The org.fusesource.jansi.internal.JansiLoader.cleanup() method may throw an OutOfMemory error if your /tmp/ directory has a large number of directories. With Xmx set to 16MB, 250,000 directories reproduced the error on my ubuntu 24 system.

Exception in thread "cleanup" java.lang.OutOfMemoryError: Java heap space                                                                                                                          
        at java.base/java.io.UnixFileSystem.list(Native Method)                                                                                                                                    
        at java.base/java.io.File.normalizedList(File.java:1176)                                                                                                                                   
        at java.base/java.io.File.listFiles(File.java:1310)                                                                                                                                        
        at org.fusesource.jansi.internal.JansiLoader.cleanup(JansiLoader.java:113)   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions