-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
PackageCompiler: LLVM ERROR #295
Comments
It might as well submit issue to PackageCompiler.jl not here. |
I think this is fixed in 1.3.1. Please comment if not and give instructions how to reproduce. |
I just got this issue on an aarch64 system on PackageCompiler master with julia v1.3.1
|
It's on a private package, and PackageCompiler works with another private package on the same setup. Given it's on a private package with many deps, I can't easily post instructions to reproduce. Any ideas on what to test or look for? |
That just seems like a julia bug... Getting a repro would be pretty important for it to be fixable I feel. |
I would start by making a list of all of the dependencies of your private package. And try to compile each of those, to see if a dependency is the problem. If all of the dependencies are able to compile, then you should remove source code files from your package one file at a time until it compiles, so we can identify what the problem is. |
I'm happy to try that out. Although, there is a reproducible example in JuliaLang/julia#31156 though, and @tkf 's been bumping that. (I haven't tried that yet but will) |
Yeah, it's reproducible for me JuliaLang/julia#31156 (comment) Is the example given still relevant for PackageCompiler 1.0.0? |
@KristofferC , sorry, I cannot provide the code. Primary, I asked how to see what is happening. I can provide debug info or rebuild Julia in some specific mode to do it if it is implemented. |
If the problem is with the |
Can you guys try with #329? |
It still errors for me, but it might just be that my package is trying to precompile
or a regex of the full statement that allows for a variable array dimension? |
I'm trying hardcoding more dimensions into the blacklist for now |
Just blacklist the whole |
I’ve blacklisted bool and uint8 arrays up to 10 dimensions. I’ll see how this goes. (Each attempt takes ~30 mins on this system) |
Yep, I know it is a slow process :D |
Just hit the same error.. Time to try blacklisting permutedims entirely |
If that doesn't work I guess you will have to print out all the precompile statements and start bisecting heh. |
regarding the mentioned
Regarding the own project, as the PackageCompiler was completely changed, I have some issues with compiling.... Trying to call
And first 6 lines of that file are looking correct.
|
What is the command you run? PackageCompiler should make |
|
Should be |
ok. Next error:
|
That's the main issue in this thread |
Am I understand right that the purpose is to localize |
Yeah, we need to figure out a better way than judt bisecting (which is probably to make LLVM print out what julia function it has troubles with) |
Is any way to run the compiler in a verbose mode line by line with that file and find all failing statements? In worst case, bisecting of the file by a script and keeping it working for a night, looks not so bad idea..... |
Maybe if we run with an assertion build of llvm? |
how to do it? |
There is a setting that can be set in Make.user to enable assertions,I don't remember exactly the name right now. |
https://github.com/JuliaLang/julia/blob/master/Make.inc#L296 Do you mean this group?
|
I'm just giving this a go with Julia master and |
These ones doesn't help:
Completely nothing new comparing with the default build. Julia v 1.3.1 (#34151) / 2d5741174ce3e6a394010d2e470e4269ca54607f. |
If you check the main julia issue, I found that the nightly reports the function when the LLVM fails. It doesn’t tell us much more than that it’s from permutedims though |
Am I understand right that if I'm taking master branch, then all previously compiled packages from |
I wrote a Multithreaded Randomized Precompile Statement Bisector™ to hunt out the precompile statements that are failing, and whittled down the 6406 precompile statements to these 2 which all individually fail (in 3 hrs across 6 parallel threads on an aarch64 machine)
For record, the number of precompile statements after each step of the bisector: 6406, 1067, 355, 118, 19, 6, 2 |
If you remove those 2 statements from the list of 6406, do all of the remaining 6404 statements run without error? |
Yeah! Just produced a sysimage on aarch64 using So, there's a viable work-around for me! However, I also tried using
but that didn't work. I still hit the error. Although maybe I got the regex wrong? or the |
You need to escape special characters such as parentheses and periods when you make a regex. You may find https://regex101.com/ helpful for testing out regexes. And in the Julia REPL, you should try running For example, in your case, I would recommend trying this instead for the blacklist: [r"typeof\(Base\.copyto!\), Array{UInt8"i,
r"typeof\(Base\.circshift!\), Array{UInt8"i,
r"typeof\(Base\.permutedims\), Array{Bool"i] You see that I have escaped all periods, left parentheses, and right parentheses. @ianshmean Can you try that blacklist and let me know if it works? This is very exciting. I feel like we have almost solved this. |
I've always felt my regex skills were lacking.. Just running |
Argh... It still errored, and that was after I checked each of your regex's worked against the target statements, and even broadened the regex's to just the first half. The complexity of the package I'm trying to compile, which is very multithreaded and asynchronous seems to be creating a rather chaotic precompile statements list. My strategy for now is to stick with the list I bisected, and quash those listed above from it. As for a proper fix, I'm shifting my hope to this being fixed upstream tbh, and backported. It just seems too hard to trace back to specific precompile statements |
For me the issue was fixed with Julia 1.4.0 update
|
That's surprising.. the LLVM patch isn't included in the LLVM build that ships with 1.4.0. You/we may just be lucky with some subtle change in 1.4.0 avoiding the issue. But for a proper fix, there is a patch on the LLVM version used by julia master (9.0.1) and an upcoming backport of the patch for 8.0.1 that I hope will make it into 1.4.1 JuliaPackaging/Yggdrasil#619 |
Ok. I'm using your script on Julia 1.3.1 with few modifications - replaced threads number by fixed number of slices. Now it is 20. It should be really much more than number of functions which are failing the compilation. And I see that number of messages:
doesn't correspond to number of error functions. And second, in most cases, the part with failing function contains one of our functions. It is still working. But one of samples - |
I'm not sure why you're still trying to bisect the issue.. It's been identified and patched in LLVM in https://github.com/JuliaLang/julia/pull/34860/files and worked through into master in the link above (and awaiting release in 1.4.1). Sorry if you've been out of the loop! The issue has been discussed in a variety of places |
I tried to clarify the reason, why it is working in Julia 1.4.0 without that patch and is not working up to 1.3.1. Sorry, the issue was really low priority for us. It is just an inconvenience for the service activation in k8s but is not a blocking issue. And time, when you shared your script, was overlapped for me by a business trip. The final list of failing functions:
Let me know please if that case is interesting for somebody for more investigation. Or, will think that it is finally fixed in Julia 1.4.0. Thank you for the help. |
This should be fixed in 1.4.1 |
Hi, I’m getting the following error while compiling my package:
Is any way to understand what exactly produces that error?
The text was updated successfully, but these errors were encountered: