HackerPapers

arXiv:2501.12618cs.PL

Fray: An Efficient General-Purpose Concurrency Testing Platform for the JVM (Extended Version)

Ao Li, Byeongjee Kang, Vasudev Vikram, Isabella Laybourn, Samvid Dharanikota, Shrey Tiwari, Rohan Padhye

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Concurrency bugs are hard to discover and reproduce. Prior work has developed sophisticated algorithms to search for concurrency bugs, such as partial order sampling (POS); however, fundamental limitations with existing platforms for concurrency control hinder effective testing of real-world software. We observe that the design space for concurrency control on managed code involves complex trade-offs between expressibility, applicability, and maintainability on the one hand, and bug-finding efficiency on the other hand. This paper presents Fray, a platform for performing push-button concurrency testing of data-race-free JVM programs. The key insight behind Fray is that effective controlled concurrency testing requires orchestrating thread interleavings without replacing existing concurrency primitives, while encoding their semantics for faithfully expressing the set of all possible program behaviors. Fray incorporates a novel concurrency control mechanism called shadow locking, designed to make controlled concurrency testing practical and efficient for JVM programs. In an empirical evaluation on 53 benchmark programs with known bugs (SCTBench and JaConTeBe), Fray with random search finds 70% more bugs than JPF and 77% more bugs than RR's chaos mode. We also demonstrate Fray's push-button applicability on 2,655 tests from Apache Kafka, Lucene, and Google Guava. In these mature projects, Fray successfully discovered 18 real-world concurrency bugs that can cause 363 tests to fail reproducibly.

arXiv comments
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.DCDistributed, Parallel, and Cluster Computing cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Feb 2025 to Feb 2025. Found in 1 HN submission from Feb 2025 to Feb 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • AFAIK, Antithesis uses a hypervisor to achieve deterministic execution. This can be less effective because the hypervisor does not have language semantics and faces a larger search space. You may check Figures 5 and 6 in our technical report[1], where we compare Fray against RR…

      aoli-alView on HNParent context

Submitted to Hacker News

  • Show HN: Fray: A controlled concurrency testing framework for the JVM

    Hi HN, I’m excited to share Fray, a controlled concurrency testing framework for the JVM. Fray systematically explores different thread interleavings in your concurrency tests, helping to uncover tricky race conditions. It can also deterministically reproduce concurrency-related failures, making debugging significantly easier. For a deep dive into how Fray is designed, check out our technical report: https://arxiv.org/abs/2501.12618 The Lucene team recently wrote about how Fray helped them…

Connected through shared HN threads, not inferred similarity or a recommendation.