Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure backtrace printed by STW straggler goes into safe-log-file #210

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Feb 4, 2025

PR Description

MWE:

function main()
    t = Threads.@spawn begin
        ccall(:uv_sleep, Cvoid, (Cuint,), 5000)
    end
    # Force a GC
    ccall(:uv_sleep, Cvoid, (Cuint,), 1000)
    GC.gc()
    wait(t)
end
main()

Command:

julia -t4 --timeout-for-safepoint-straggler=1 --safe-crash-log-file=/tmp/foobar.txt mwe.jl

Output:

Ran:

cat /tmp/foobar.txt 

And got:


{"level":"Error", "timestamp":"2025-02-04T18:27:20.513", "message": "===== Thread 2 failed to reach safepoint after 1 seconds, printing backtrace below =====\n"}

{"level":"Error", "timestamp":"2025-02-04T18:27:20.651", "message": "thread (1) __semwait_signal at /usr/lib/system/libsystem_kernel.dylib (unknown line)\n"}

{"level":"Error", "timestamp":"2025-02-04T18:27:21.651", "message": "===== Thread 2 failed to reach safepoint after 1 seconds, printing backtrace below =====\n"}

{"level":"Error", "timestamp":"2025-02-04T18:27:21.652", "message": "thread (1) __semwait_signal at /usr/lib/system/libsystem_kernel.dylib (unknown line)\n"}

{"level":"Error", "timestamp":"2025-02-04T18:27:22.652", "message": "===== Thread 2 failed to reach safepoint after 1 seconds, printing backtrace below =====\n"}

{"level":"Error", "timestamp":"2025-02-04T18:27:22.652", "message": "thread (1) __semwait_signal at /usr/lib/system/libsystem_kernel.dylib (unknown line)\n"}

Checklist

Requirements for merging:

  • I have opened an issue or PR upstream on JuliaLang/julia: N/A.
  • I have removed the port-to-* labels that don't apply.
  • I have opened a PR on raicode to test these changes:

@d-netto d-netto changed the title introduce safepoint_waiter Make sure backtrace printed by STW straggler goes into safe-log-file Feb 4, 2025
@d-netto d-netto force-pushed the dcn-make-sure-bt-goes-to-safe-log-file branch from 2ded1c0 to ce74bb5 Compare February 4, 2025 19:04
@d-netto d-netto force-pushed the dcn-make-sure-bt-goes-to-safe-log-file branch from ce74bb5 to 9da122e Compare February 4, 2025 19:07
@d-netto d-netto merged commit 94ace4c into v1.10.2+RAI Feb 4, 2025
2 checks passed
@d-netto d-netto deleted the dcn-make-sure-bt-goes-to-safe-log-file branch February 4, 2025 20:34
nickrobinson251 pushed a commit that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants