-
Notifications
You must be signed in to change notification settings - Fork 85
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
"Illegal instruction" when running docker #56
Comments
I just tried to rebuild my image with the bsp from that branch... the problem still persists. I'm currently building your kas-with-docker.yml, I will let you know the result as soon it completes |
Unfortunately, the build fails during do_rootfs. I attached the log of the stage. The actual error seems to be |
Package does not exist - the error must have happened earlier. BTW, are you building natively or inside the kas docker image? The latter succeeded 2 months ago here. |
Could you point me to a log that could be useful to identify the problem? |
First step would be the full console log. From that we can look into which detailed log is needed (if any). |
I didn't have infinite scrollback on my terminal emulator at that time, so the stuff left was not very useful.
I managed to recompile my bsp + docker recipe image, and this time it run. So I guess that somehow go is not picking up the GO386 parameter and consequently producing code not compatible with Quark. Regarding the problem I had with the kas-with-docker.yml image, I deleted the dummy recipe in the docker folder, and the package manager stopped complaining. I don't know if this was just a coincidence though |
Hi, looks like the go-cross patches are working only for the docker executable. Other dependency packages like containerd and runc still give illegal instruction. |
Not when building the jan/docker branch. I have tested the patches locally with an hello-world Go app using oe-meta-go, and that worked as well. |
Yes, the problem lies specifically in containerd and runc. I did a gdb run and both are crashing on a xorps instruction. But I don't understand why the instruction is inside the runtime.check() function of the glibc library. Do you know a proper (yocto) way to force a global -mno-mmx flag for all the generated code? |
containerd and runc are built with different makefiles in the docker, but they are still built with the Go compiler, not gcc. And that is being told by go-wrapper (774746e#diff-bada823f163f0098a601378434ac3160) that it should switch to 386 mode (GOARCH). When does it crash, directly during startup? Do you have a backtrace at hand? |
That's why I find it very strange. They should use all the same C library and the same (patched) go compiler |
Your code is in go/src/runtime/runtime1.go, check(), not in glibc. So your compilation via Go went wrong. |
But I'm a using a clean BSP from jan/docker, why is it working with docker and not with the rest? |
I don't have a version of my build at hand, I can only tell that I used to have problems with those two targets as well until I added that go-wrapper concept. After that, I checked all docker binaries for unsupported MMX instructions and found none anymore. If you are building that branch as-is via the kas config, something must be going wrong in your setup with that wrapper. Maybe instrument it and rebuild containerd to check if it is being used at all. |
I tried to build containerd first with only the go-wrapper, then with the wrapper and a .bbappend file that enforces GO386=quark in do_compile (I wrote about that some comments ago). In both cases it doesn't work. Are you sure the wrapper is working properly? I always see this line in log builds: Also, I still can't get to run docker with only the wrapper. When I add my .bbappend in my layer instead, it's fine |
Finally! I found the problem! It's the script indeed. And maybe I have an explanation on why my bbappend files were working only for docker. I think it's in the way the packages are compiled. In the docker case bitbake calls a custom script inside the docker source tree, in the other two cases instead the Man, I was losing my mind on this. Do you want me to submit a PR? |
Oh, sorry for that. I'm indeed only on distros with sh=bash, so this slips through from time to time. Please send a PR! And, yes, that difference in building the docker binaries led to the not really clean but effective wrapper method. I tried to inject the necessary vars via bitbake means before that but eventually gave up. |
Starting from meta-iot2000-bsp, I added the docker recipe from the meta-virtualization layer, but every docker-related executable fails with "Illegal instruction".
I learned that this should work after this commit, so am I missing something?
By inspecting build/tmp the go-cross version used is 1.6 and looks like the patches are being picked up
The text was updated successfully, but these errors were encountered: