-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Segfault when spawned task uses regex during exit #57817
Labels
bug
Indicates an unexpected problem or unintended behavior
multithreading
Base.Threads and related functionality
Comments
On a quick look it seems like uses of Lines 401 to 429 in 5595d20
|
I got a core dump with the segfault.
|
Here is an MWE. This illustrates that PCRE is not safe to use from another thread while Julia is exiting. re = Regex("")
Threads.@spawn match(re, "", 1, UInt32(0)) segfaults with
from gdb:
|
I can't get this to reproduce on master, but I have a proposed fix for 1.11 & 1.10 #57834 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Indicates an unexpected problem or unintended behavior
multithreading
Base.Threads and related functionality
Update: this appears to be just the regex finalizer being called at exit before the task has finished. i.e. one fix is #51466
I have a test suite that uses a custom logger, and a task that continues beyond the end of a test run that sometimes hits this segfault.
It seems pcre is in a bad state
julia/base/regex.jl
Line 689 in 213feae
On 1.10.8
The text was updated successfully, but these errors were encountered: