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

Add a safepoint in the maybe_destroy_plan spin lock #205

Merged

Conversation

Octogonapus
Copy link
Contributor

@Octogonapus Octogonapus commented Jun 1, 2021

This PR adds a safepoint in the maybe_destroy_plan spin lock to permit forward progress in that spin lock.
Without it, the spin lock blocks forward progress and can ultimately deadlock the program.
This was implemented according to this observation.
I have tested this locally by running the minimum reproducible example; I can't get the program to deadlock any more.

I would like to write an automated test for this, but I can't think of one that would be reliable and run in a timely manner. My best method of testing this is running the minimal example code locally repeatedly and seeing if the program deadlocks.

Fixes #163.

@stevengj
Copy link
Member

stevengj commented Jun 2, 2021

@vtjnash, looks good?

@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #205 (645b1fa) into master (e0bc05a) will decrease coverage by 0.14%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
- Coverage   62.79%   62.64%   -0.15%     
==========================================
  Files           5        5              
  Lines         422      423       +1     
==========================================
  Hits          265      265              
- Misses        157      158       +1     
Impacted Files Coverage Δ
src/fft.jl 63.25% <50.00%> (-0.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0bc05a...645b1fa. Read the comment docs.

@Octogonapus
Copy link
Contributor Author

@stevengj Anything else you want me to do on this PR so that it's RTM?

@stevengj stevengj merged commit df8f937 into JuliaMath:master Jun 8, 2021
@Octogonapus Octogonapus deleted the bug/RGB/163_fix_finalizer_deadlock branch June 8, 2021 20:45
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.

Deadlock bug in FFTW 1.2.4
3 participants