Debugging a JDK Deadlock in 30 Minutes with Fray: A Concurrency Thriller

2025-06-07

While adding integration tests for Fray, the author encountered a deadlock in JDK's ScheduledThreadPoolExecutor triggered by seemingly innocuous code. Leveraging Fray's deterministic replay and schedule visualization, the root cause was quickly identified: In the SHUTDOWN state, FutureTask.get can indefinitely block. This stems from interleaved execution of the schedule and shutdown methods, leaving tasks in limbo. Fray provided a clear view of the thread interleaving, enabling the reproduction and reporting of this JDK concurrency bug.

Read more
Development

Chrome's caching mechanism caused a weird bug: A winding debugging journey

2025-03-03

While debugging a Parquet viewer, the author discovered a crash when accessing S3 storage. After some investigation, the problem was found not to be in the application code, but in Chrome's caching mechanism. When handling range requests, Chrome optimizes caching, but when the server returns a 403 error, Chrome still returns partial data, causing the application to crash. The author reported the issue to the Chromium team, but the team considered it a feature rather than a bug. Eventually, the author chose to fix the issue in OpenDAL. This story reminds us that finding the right trust boundary can significantly speed up debugging.

Read more