Skip to content

Improve robustness of initial cleanup #255

@gnodet

Description

@gnodet
          I second this issue.  I've been seeing IntelliJ hang recently, when I start a maven command.  I attached a debugger to maven, and it's stuck here:
"main" #1 prio=5 os_prio=0 cpu=250.00ms elapsed=167.88s tid=0x0000023b2d9c8710 nid=0x3bc4 runnable  [0x000000505eafd000]
   java.lang.Thread.State: RUNNABLE
        at java.io.WinNTFileSystem.delete0(java.base@17.0.2/Native Method)
        at java.io.WinNTFileSystem.delete(java.base@17.0.2/WinNTFileSystem.java:580)
        at java.io.File.delete(java.base@17.0.2/File.java:1073)
        at org.fusesource.jansi.internal.JansiLoader.cleanup(JansiLoader.java:103)
        at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:59)
        - locked <0x0000000623416228> (a java.lang.Class for org.fusesource.jansi.internal.JansiLoader)
        at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:36)
        at org.fusesource.jansi.AnsiConsole.ansiStream(AnsiConsole.java:255)
        at org.fusesource.jansi.AnsiConsole.initStreams(AnsiConsole.java:559)
        - locked <0x0000000623be3f58> (a java.lang.Class for org.fusesource.jansi.AnsiConsole)
        at org.fusesource.jansi.AnsiConsole.systemInstall(AnsiConsole.java:513)
        - locked <0x0000000623be3f58> (a java.lang.Class for org.fusesource.jansi.AnsiConsole)
        at org.apache.maven.shared.utils.logging.MessageUtils.systemInstall(MessageUtils.java:67)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.2/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.2/NativeMethodAccessorImpl.java:77)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.2/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@17.0.2/Method.java:568)
...

So AnsiConsole.systemInstall wants to delete a file. Not what I would have expected. I checked and "System" has the file open. Even after closing all applications, the file is still locked, and I cannot delete it.

Originally posted by @mrsalt in #244 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions