Skip to content

Conversation

sbrantq
Copy link
Member

@sbrantq sbrantq commented Jul 3, 2025

No description provided.

@sbrantq
Copy link
Member Author

sbrantq commented Jul 31, 2025

@wsmoses So I added GC.@preservings to fix the deadlock issue with the ConcreteRArray that specifies rng.seed (for context GC triggered by EnzymeJaXMapSymbol'd functions somehow tries to free only(rng.seed.data).buffer):

seed_buffer = only(rng.seed.data).buffer
GC.@preserve seed_buffer constraint begin
trace, _, _ = compiled_fn(rng, constraint_ptr, args...)

Also GC triggered by mapped functions in src/probprog/FFI.jl can cause jl_gc_wait_for_the_world to wait forever for the main Julia thread which is waiting during Base.convert to Julia Array, like this one

trace = unsafe_pointer_to_objref(Ptr{Any}(Array(trace)[1]))

So I added
while !isready(trace)
yield()
end

(Adding trivial Base.isready for ConcretePJRTArray and ConcreteIFRTArray).

Does that sound like an ok-ish fix, or am i missing something?

Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 4.17537% with 459 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.02%. Comparing base (20c6a4c) to head (a2951d5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/probprog/Modeling.jl 0.00% 163 Missing ⚠️
src/probprog/FFI.jl 10.06% 143 Missing ⚠️
src/probprog/Display.jl 0.00% 58 Missing ⚠️
src/probprog/Types.jl 0.00% 44 Missing ⚠️
src/probprog/Inference.jl 0.00% 35 Missing ⚠️
src/Compiler.jl 17.64% 14 Missing ⚠️
src/Types.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1444      +/-   ##
==========================================
- Coverage   68.76%   66.02%   -2.74%     
==========================================
  Files         103      109       +6     
  Lines       11380    12040     +660     
==========================================
+ Hits         7825     7949     +124     
- Misses       3555     4091     +536     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbrantq
Copy link
Member Author

sbrantq commented Sep 20, 2025

@wsmoses Can we merge this large execution trace PR first and add new MH and MCMC interfaces into a new PR?

@sbrantq sbrantq requested a review from wsmoses September 20, 2025 02:50
@avik-pal
Copy link
Collaborator

We would need a rebase, the test failures should have been fixed a few weeks back. Also let's get the jll changes in first as a separate PR?

@sbrantq sbrantq marked this pull request as draft September 30, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants