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

avoid hang when only threads are starting IO #48433

Merged
merged 1 commit into from
Jan 29, 2023
Merged

avoid hang when only threads are starting IO #48433

merged 1 commit into from
Jan 29, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Jan 27, 2023

When not in threaded region, only thread 0 will manage IO events, but it may go to sleep if there are none started for it to watch.

Fix #48430

@vtjnash vtjnash added multithreading Base.Threads and related functionality backport 1.9 Change should be backported to release-1.9 labels Jan 27, 2023
@vtjnash vtjnash requested a review from bkamins January 27, 2023 21:51
@vtjnash vtjnash added the DO NOT MERGE Do not merge this PR! label Jan 27, 2023
src/partr.c Outdated Show resolved Hide resolved
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.

Fix #48430
@bkamins
Copy link
Member

bkamins commented Jan 28, 2023

Build of this branch using Cygwin-to-MinGW on Windows works and does not hang.

Julia Version 1.10.0-DEV.445
Commit d7693f1a19 (2023-01-28 05:20 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 4 on 12 virtual cores

@bkamins
Copy link
Member

bkamins commented Jan 28, 2023

The tests fail with several EOFError: read end of file problems, but you probably understand better than me if this is related or not.

@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Jan 29, 2023
@vtjnash vtjnash merged commit 45b7e7a into master Jan 29, 2023
@vtjnash vtjnash deleted the jn/48430 branch January 29, 2023 04:06
@vtjnash vtjnash removed the merge me PR is reviewed. Merge when all tests are passing label Jan 29, 2023
KristofferC pushed a commit that referenced this pull request Feb 1, 2023
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.

Fix #48430

(cherry picked from commit 45b7e7a)
@KristofferC KristofferC mentioned this pull request Feb 1, 2023
35 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sleep causes Julia to hang in multi-threaded context
4 participants