Skip to content

Conversation

@Strech
Copy link
Member

@Strech Strech commented Oct 7, 2025

What does this PR do?

Fix intermittent bug in RSpec test case for JRuby 9.4 (TESTS ONLY)

Motivation:

The test is suboptimal and will hammer the lifting method which will cause the remote worker thread to continue lifting when RSpec is already finished the test case.

That will lead to exception that Mutex is not locked. And boiled down as Deadlocks and Havoc

Change log entry

None.

Additional Notes:

The test should be improved because the worker thread consider itself unhealthy.

How to test the change?

CI

@Strech Strech requested a review from a team as a code owner October 7, 2025 15:45
@github-actions github-actions bot added the core Involves Datadog core libraries label Oct 7, 2025
@datadog-official
Copy link

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 101.95% (-0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 99076bd | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Oct 7, 2025

Benchmarks

Benchmark execution time: 2025-10-07 16:13:02

Comparing candidate commit 99076bd in PR branch langplat-871-fix-jruby-rspec-race-condition with baseline commit 0a32491 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 43 metrics, 2 unstable metrics.

scenario:profiling - intern_all 1000 repeated strings

  • 🟥 throughput [-1558.987op/s; -1498.474op/s] or [-6.480%; -6.229%]

# it is not preventing a race condition. But in some rare cases
# in RSpec of JRuby 9.4 the test case will not let locking happen.
# That will cause specs to fail.
@mutex.unlock if @mutex.locked?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does really not look right to me at all...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal: #4957

@Strech
Copy link
Member Author

Strech commented Oct 8, 2025

Closing in favor of long-term solution #4957

@Strech Strech closed this Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants