-
Notifications
You must be signed in to change notification settings - Fork 1
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
Segmentation fault trying to brute_build_julia() on: using Blink; w = Window() and several others #3
Comments
Fezzik uses PackageCompiler so there is probably not much I can do for you. But it worked for me using the following steps.
restart julia
restart julia On my machine (osx) when a window is created using blink and the user closes it(presses the x) it crashes julia |
I just deleted ~/.julia folder, started again and it worked! I don't know what caused such issue before, maybe my previous compilations using PackageCompiler.
I didn't observe this on my machine (Arch Linux). Closing window do not throw error or crash julia. But thanks for reply |
After fresh julia v1.1.1 download I did |
It depends on what you are trying to add to the sysimg, for my use cases it works doing several times with no problem. However if there are some packages that causes the seg fault on the second build... |
It is strange, let me give an example:
|
Ok, I just realized that when I compile first time |
Two MWE:
One of given example compile error:
|
It is beyond my level to debug this... |
@SimonDanisch maybe you could help? |
Is this using compile_incremental with a previously compiled sysimage? That's supposed to work, but does segfault in certain cases |
Yes, sysimage was compiled by Fezzik, which is using compile_incremental. Also it is interesting that compilation of both examples at once (one compile_incemental call with original sysimage) was successful. But if I compile one after another (no maters which is first) compilation segfaults. |
Yes, but can you run a debug version of Julia and say which precompile statement caused the segfault? It is hapenning in the C side of julia |
Actually segfault happens even if I do
after
or
|
Maybe you can open an issue with Julia and see if you can get someone to check out where is the segmentation fault coming from... |
Thanks for adding debug information in last Fezzik commit ;-)
|
When the script has printed the ”creating sysimg” msg it finished compiling and is now dumping the memory modules into one big sysimg... And here in this phase it crashes. |
So is |
Yes, today I compiled two times in a row successfully (earlier, same error was thrown on second run, but after I deleted .julia folder now it errors on third run): |
If |
I suspect the error stems from the type annotation on the function in structarrays.jl line 80 in StructArrays module, at least this is where the debug information leads to... |
Thanks for explanation, so compile_incremental can be ran only one time for explicit behavior? But sometimes it works, so if we could know why that happens it may be useful to prevent that? |
Using your's modification to gf.c. Tried brute_build_julia() this file after I compiled Interact, Blink, Makie:
And that showed:
|
Tried same in julia-debug (on fresh sys-debug.so), showed more about that error:
|
try to |
Tried, now sysimage was created successfully, but "time to first" is long. |
You are hitting ”world age” problems... The main problem is that it uses asserts in the C code which causes segfaults. |
How to fix it? :-) |
Actually commenting out line 1755 in subtype.c: |
Previous post was using Julia master branch, but trying to
Compilation was successful, but sysimg generation resulted in error (using julia-debug v1.1.1):
Any comments? |
I ran gdb on coredump file generated by the segfault. Here is backtrace:
|
I commented statement at line 1176 in codegen.cpp (julia v1.1.1) and that segfault are gone. Now Blink, Makie, Interact, JuMP and several other packages are compiling to sysimage without segfaults.
Error was because some pointers were not valid. |
Thanks for the update, post it also on Julia main repo it will get more attention. I will try you fix on my local build |
There also seems to be a PR that should fix this: JuliaLang/julia#32776 |
It'd be good to hear back too if that seems to work (I'm not sure all of the issues mentioned here are the same). |
@vtjnash
p.s. In my working version (Julia v1.1.1) I also removed all assertions (using bash command |
PackageCompiler compiles Blink#master, but Fezzik throws:
Also, I made post about this issue here https://discourse.julialang.org/t/segmentation-fault-trying-to-fezzik-brute-build-julia-on-using-blink-w-window/26491
The text was updated successfully, but these errors were encountered: