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

fix: deadlock #43

Merged
merged 2 commits into from
Jul 4, 2023
Merged

fix: deadlock #43

merged 2 commits into from
Jul 4, 2023

Conversation

MrCroxx
Copy link
Collaborator

@MrCroxx MrCroxx commented Jul 4, 2023

fix deadlocks:

  1. exclusive lock was not Send but unsafe impled.
  2. submit flush task await blocks set_region_evictable
  3. no new reclamation task created after set_region_evctable if all write process are waiting

add deadlock detection with 1 worker thread

close #42

fix deadlocks:

1. exclusive lock was not `Send` but unsafe impled.
2. submit flush task await blocks `set_region_evictable`
3. no new reclamation task created after `set_region_evctable` if all
   write process are waiting

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@MrCroxx MrCroxx added the bug Something isn't working label Jul 4, 2023
@MrCroxx MrCroxx self-assigned this Jul 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Merging #43 (b8e3910) into main (691054a) will increase coverage by 0.94%.
The diff coverage is 1.93%.

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   41.10%   42.05%   +0.94%     
==========================================
  Files          33       33              
  Lines        3484     3365     -119     
==========================================
- Hits         1432     1415      -17     
+ Misses       2052     1950     -102     
Impacted Files Coverage Δ
foyer-storage-bench/src/main.rs 0.31% <0.00%> (-0.02%) ⬇️
foyer-storage/src/flusher.rs 0.00% <0.00%> (ø)
foyer-storage/src/reclaimer.rs 0.00% <ø> (ø)
foyer-storage/src/region.rs 0.00% <0.00%> (ø)
foyer-storage/src/region_manager.rs 0.00% <0.00%> (ø)
foyer-storage/src/store.rs 0.00% <0.00%> (ø)
foyer-storage/src/device/fs.rs 77.08% <100.00%> (-1.49%) ⬇️
foyer-storage/src/device/mod.rs 1.88% <100.00%> (-10.62%) ⬇️

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@MrCroxx MrCroxx merged commit f067d1c into main Jul 4, 2023
@MrCroxx MrCroxx deleted the xx/fix/deadlock branch July 4, 2023 07:12
MrCroxx added a commit that referenced this pull request Apr 17, 2024
* fix: deadlock

fix deadlocks:

1. exclusive lock was not `Send` but unsafe impled.
2. submit flush task await blocks `set_region_evictable`
3. no new reclamation task created after `set_region_evctable` if all
   write process are waiting

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

* update ci

Signed-off-by: MrCroxx <mrcroxx@outlook.com>

---------

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

bug: deadlock with 1 worker thread
2 participants