You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Illegal instruction" error on HaikuPorts buildbot #1916
Note, we call x86 as x86_gcc2, as it got 2 compiler toolchain, the primary is gcc2 and the secondary is gcc7. The x86_64 platform have only gcc7. Blas was built on both arch with gcc7.
Sadly i have currently no information about the buildbots hw, but i can ask the admins.
I built openblas on x86_64 locally with the same recipe, works fine.
Yes please find out what the actual hardware is, if it works locally it looks like some problem with your buildbot. (Can you get it working with a different TARGET ?)
Not sure I see where make is invoked with different parameters ? To me this looks like one contiguous build and not separate invocations, what am i missing ?
Hmm. I still do not see the different parameters (or separate invocation of make test). Given that this is a DYNAMIC_ARCH build, runtime failure would still be a bug (unless the buildbot runs on some virtual setup that happens to lack x86 fpu features from ten years ago). Given that it happens with the provided tests, at least it seems unlikely that this could be another case of unaligned data access.
Any progress on this ? (One option could be to inspect config.h and Makefile.conf , or better yet dump /proc/cpuinfo somewhere early in the build process)
You have to set NO_AVX512=1 since haiku "sysinfo" does not have bits to decode AVX512 ISA-s, thus permitting me to deduce that XSAVE and stuff ignores respective register file too (though GCC7 would try to use it)
I mean I looked here , might be also NO_AVX2 is needed: https://git.haiku-os.org/haiku/tree/src/bin/sysinfo.cpp
Not sure if that would really preclude running AVX512 code if that is what the buildbot hardware is. (Any word on that ?) Another option would be to set OPENBLAS_CORETYPE explicitly on the make test to override whatever cpu is detected by the DYNAMIC_ARCH library at runtime. (I assume the idea here is to get the tests to pass and have SkylakeX AVX512 support available as an option in the library)
I am not sure I understand what you are getting at, do you suggest that Haiku OS itself does not support AVX512 (or even AVX, which would be all the more unlikely) ? If it is just the buildbot that is incapable, I do not think they would want to cripple their binaries to match.
Eigen 'make check' (piledriver VM with CXXFLAGS=-march=native) finished without any breakage (i applied the only distro patch in existence over 3.3.7)
I set a virtualbox VM for haiku exactly according to doc recipe , it has slow ide disk, gets significantly faster attaching VDI to SATA disk emulation EDIT: proably guide can be updated a little.
I changed hardware type to linux to no success - (openblas build under) Linux says Piledriver is Piledriver, Haiku says Piledriver is Barcelona
Forcing target to Piledriver or Sandybridge goes into SIGILL in R DGEMM benchmark. Quicker if running many parallel threads(it is processes under R foreach, more than cores)
I would speculate that Haiku does not move threads between CPUs until last chance, so this problem is somewhat less visible as in effect 2 AVX+ threads rarely meet on same CPU
EDIT2 there is no problem for 32bit, no matter gcc2 gcc7 clang7, AVX is only available in 64bit mode.
I think as a temporary measure you set port to exclude AVX - this is not video decoder where one survives short glitch, we do care about numeric accuracy in the end. It needs two parameters added.
btw while building eigen I saw sigill-s in smpeg library and sdl
Would be unfair to record it here "upstream" that Haiku had limited AVX support before beginning 2019, and quite impractical to try to detect it for short moment before Haiku shines EDIT3 it is not like simple thing to just copy/paste that breaks nothing, it will take time to implement.
In sysinfo in the bug report:
family 6, model 85, stepping 4
It is SKYLAKE-X series "Scalable Xeon", not showing a problem as long as tests run in same (Linux,BSD) system as built, just that by pure (un)luck it hit context from previous AVX512 use during tests.
To make result library universally usable - an old target without -march flags like TARGET=CORE2 needs to be added to make.
They say it was deduced from sysinfo alone, actually looking further after seeing no display of any AVX-512 bits in outout - core assembly implementing context switcher that has no chance to get around AVX(1) was located.
(not)glad to see numpy joining the party. It is actually OpenBLAS skylake-X code that triggers SIGILL, also context dump shows only xmm aka SSE registers.
As a side effect of #1947 this may get mitigated by #1949 assuming that HaikuOS does not advertise the availability of the unsupported AVX* features in the cpuid bits. Up to this point, it was simply assumed that AVX2 and/or AVX512 was available if the model number of the cpu matched.
Activity
martin-frbg commentedon Dec 14, 2018
Yes please find out what the actual hardware is, if it works locally it looks like some problem with your buildbot. (Can you get it working with a different TARGET ?)
brada4 commentedon Dec 14, 2018
You make tests with different parameters than build
You should either patch Makefile.rule or copy over all parameters to all invocations of make.
https://github.com/haikuports/haikuports/blob/662967332f95a4c5e0f44f8fefcb3fcd7e652564/sci-libs/openblas/openblas-0.3.4.recipe#L87
martin-frbg commentedon Dec 14, 2018
Not sure I see where make is invoked with different parameters ? To me this looks like one contiguous build and not separate invocations, what am i missing ?
brada4 commentedon Dec 14, 2018
If it helps repeating TARGET and OPENMP option....
extrowerk commentedon Dec 15, 2018
Oh, that could be the culprit, lemme fix it then.
martin-frbg commentedon Dec 15, 2018
Hmm. I still do not see the different parameters (or separate invocation of
make test). Given that this is a DYNAMIC_ARCH build, runtime failure would still be a bug (unless the buildbot runs on some virtual setup that happens to lack x86 fpu features from ten years ago). Given that it happens with the provided tests, at least it seems unlikely that this could be another case of unaligned data access.brada4 commentedon Dec 16, 2018
If it would be possible to somehow get backtrace text, and disassembly of the instruction generating the exception....
martin-frbg commentedon Dec 23, 2018
Any progress on this ? (One option could be to inspect config.h and Makefile.conf , or better yet dump /proc/cpuinfo somewhere early in the build process)
brada4 commentedon Dec 23, 2018
You have to set NO_AVX512=1 since haiku "sysinfo" does not have bits to decode AVX512 ISA-s, thus permitting me to deduce that XSAVE and stuff ignores respective register file too (though GCC7 would try to use it)
I mean I looked here , might be also NO_AVX2 is needed:
https://git.haiku-os.org/haiku/tree/src/bin/sysinfo.cpp
martin-frbg commentedon Dec 23, 2018
Not sure if that would really preclude running AVX512 code if that is what the buildbot hardware is. (Any word on that ?) Another option would be to set OPENBLAS_CORETYPE explicitly on the
make testto override whatever cpu is detected by the DYNAMIC_ARCH library at runtime. (I assume the idea here is to get the tests to pass and have SkylakeX AVX512 support available as an option in the library)brada4 commentedon Dec 23, 2018
actually context switch uses fxsaveq , i.e NO_AVX=1 NO_AVX512=1 is needed, though running single AVX-512 thread may go unpunished on 1-cpu system.
martin-frbg commentedon Dec 23, 2018
I am not sure I understand what you are getting at, do you suggest that Haiku OS itself does not support AVX512 (or even AVX, which would be all the more unlikely) ? If it is just the buildbot that is incapable, I do not think they would want to cripple their binaries to match.
brada4 commentedon Dec 23, 2018
No support whatsoever of AVX, unconditionally:
https://git.haiku-os.org/haiku/tree/src/system/kernel/arch/x86/64/interrupts.S#n226
In addition webkit gets SIGILL at times, apparently very faraway relative ffmpeg is better at CPUID stuff.
EDIT: compiler(s) are good enough, once context switch handles AVX* it is good to go.
martin-frbg commentedon Dec 23, 2018
Weird. How would that mesh with e.g. existing Eigen port to Haiku ?
brada4 commentedon Dec 24, 2018
Eigen is with minimal patch, changing some file IO
I will run its self-tests, probably GSL ones too.
extrowerk commentedon Dec 24, 2018
Bugticket on the Haiku issue tracker: https://dev.haiku-os.org/ticket/14775
martin-frbg commentedon Dec 24, 2018
Was your successful local build test also under Haiku ?
brada4 commentedon Dec 24, 2018
Eigen 'make check' (piledriver VM with CXXFLAGS=-march=native) finished without any breakage (i applied the only distro patch in existence over 3.3.7)
I set a virtualbox VM for haiku exactly according to doc recipe , it has slow ide disk, gets significantly faster attaching VDI to SATA disk emulation EDIT: proably guide can be updated a little.
I changed hardware type to linux to no success - (openblas build under) Linux says Piledriver is Piledriver, Haiku says Piledriver is Barcelona
Forcing target to Piledriver or Sandybridge goes into SIGILL in R DGEMM benchmark. Quicker if running many parallel threads(it is processes under R foreach, more than cores)
I would speculate that Haiku does not move threads between CPUs until last chance, so this problem is somewhat less visible as in effect 2 AVX+ threads rarely meet on same CPU
EDIT2 there is no problem for 32bit, no matter gcc2 gcc7 clang7, AVX is only available in 64bit mode.
I think as a temporary measure you set port to exclude AVX - this is not video decoder where one survives short glitch, we do care about numeric accuracy in the end. It needs two parameters added.
btw while building eigen I saw sigill-s in smpeg library and sdl
Would be unfair to record it here "upstream" that Haiku had limited AVX support before beginning 2019, and quite impractical to try to detect it for short moment before Haiku shines EDIT3 it is not like simple thing to just copy/paste that breaks nothing, it will take time to implement.
Merry Christmas everyone,
brada4 commentedon Dec 24, 2018
In sysinfo in the bug report:
family 6, model 85, stepping 4
It is SKYLAKE-X series "Scalable Xeon", not showing a problem as long as tests run in same (Linux,BSD) system as built, just that by pure (un)luck it hit context from previous AVX512 use during tests.
To make result library universally usable - an old target without -march flags like TARGET=CORE2 needs to be added to make.
They say it was deduced from sysinfo alone, actually looking further after seeing no display of any AVX-512 bits in outout - core assembly implementing context switcher that has no chance to get around AVX(1) was located.
(not)glad to see numpy joining the party. It is actually OpenBLAS skylake-X code that triggers SIGILL, also context dump shows only xmm aka SSE registers.
Openblas: disable AVX and AVX512
Openblas: disable AVX and AVX512 (#3505)
martin-frbg commentedon Jan 5, 2019
As a side effect of #1947 this may get mitigated by #1949 assuming that HaikuOS does not advertise the availability of the unsupported
AVX*features in the cpuid bits. Up to this point, it was simply assumed that AVX2 and/or AVX512 was available if the model number of the cpu matched.