Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6582b6b3fb434b4516a5470dcd782139bdec70ee
      
https://github.com/WebKit/WebKit/commit/6582b6b3fb434b4516a5470dcd782139bdec70ee
  Author: Yijia Huang <[email protected]>
  Date:   2026-01-30 (Fri, 30 Jan 2026)

  Changed paths:
    M Source/JavaScriptCore/wasm/debugger/WasmDebugServer.cpp

  Log Message:
  -----------
  [JSC][WASM][Debugger] Fix race condition causing debugger connection failures 
in JSC shell
https://bugs.webkit.org/show_bug.cgi?id=306642
rdar://169298750

Reviewed by Keith Miller.

The WebAssembly debugger's accept thread could exit immediately due to a
race condition during server startup. The thread checked isState(State::Running)
before setState(State::Running) was called, causing the loop to exit and
printing "Accept thread exiting". This prevented LLDB from connecting,
resulting in "failed to get reply to handshake packet" timeouts.

The fix sets the server state to Running before starting the accept thread,
ensuring the thread's state check succeeds and the thread continues accepting
connections.

This only affected JSC shell debugging (--wasm-debugger). Remote Web Inspector
mode was unaffected as it doesn't use an accept thread.

Canonical link: https://commits.webkit.org/306517@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to