Skip to content

UI Freeze when starting REPL on WSL (blocking socketConnect on AWT thread) #3067

@sjovellar

Description

@sjovellar

Hello,

I'm experiencing a complete and permanent UI freeze when trying to start a Cursive nREPL.

Environment:

  • IntelliJ IDEA: 2025.2.3 (Ultimate Edition), Build #IU-252.26830.84
  • Cursive: Latest version as of October 2025
  • Operating System: Windows 11 with WSL2 (running Ubuntu 22.04)
  • Setup Details: I am running the Linux version of IntelliJ IDEA directly inside the WSL2 environment

Steps to Reproduce:

  1. Start the Linux version of IntelliJ IDEA inside WSL.
  2. Open any Clojure project.
  3. Try to launch a local Cursive nREPL.

Actual Result:
The entire IDE UI freezes instantly and permanently. The application becomes completely unresponsive and must be terminated using kill -9 from the WSL terminal.

Diagnosis:
I was able to capture thread dumps during the freeze. The analysis shows that the AWT Event Dispatch Thread (the main UI thread) is blocked by a network call, which is causing the freeze.

The thread is stuck trying to connect a socket inside Cursive's nREPL client code. This indicates that a blocking I/O operation is being performed on the main UI thread.

Here is the stack trace for the frozen AWT thread from the main IDE process:

"AWT-EventQueue-0" prio=6 tid=0x25 nid=0x26 runnable
  java.lang.Thread.State: RUNNABLE
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
      - locked <0x23f2> (a java.net.SocksSocketImpl)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:250)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:232)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
      at java.net.Socket.connect(Socket.java:609)
      at cursive.repl.nrepl.NreplClient.connect(NreplClient.kt:98)
      at cursive.repl.nrepl.NreplClient.<init>(NreplClient.kt:80)
      at cursive.repl.nrepl.NreplConnection.createClient(NreplConnection.clj:37)

I have attached the full thread dumps for all related processes for complete context.

Thank you for looking into this.

clojure_main_dump.txt
idea_dump_2.txt
idea_dump_1.txt

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