conda-forge / astrometry-feedstock

A conda-smithy repository for astrometry.
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Core Dump (Illegal Instruction) #10

Closed juliotux closed 4 years ago

juliotux commented 4 years ago

Issue:

Debugging the stock package here, I got:

(astrometry) [julio@Dell7995 ~]$ gdb --args solve-field '/home/julio/Downloads/1_08D69jNUsgFzJZAvtsT5Hw.jpeg' 
...
Thread 1 "solve-field" received signal SIGILL, Illegal instruction.
main (argc=2, args=0x7fffffffe0e8) at solve-field.c:996
996 solve-field.c: No such file or directory.
...

Witch points to a memset function. https://github.com/dstndstn/astrometry.net/blob/97153471255c54b954e9fc4b9b191033cb9fa520/blind/solve-field.c#L996

However, I could not get layout asm of the debug, that returned:

Multi-thre Thread 0x7ffff506a7 In:                                 L??   PC: ??/home/conda/feedstock_root/build_artifacts/astrometry_1584289740927/_build_env/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/bits/string3.h: No such file or directory.

So I couldn't find what illegal instruction happend.

dstndstn commented 4 years ago

Thanks for digging into this. We don't use BLAS directly, though gsl is used. If a system gsl is available, we use that (see SYSTEM_GSL in Makefile and util/makefile.gsl); otherwise, we use a vendored subset, in gsl-an (looks like we've currently got v 1.16).

As previously mentioned, architecture-specific flags (including preventing any defaults) can be set with the ARCH_FLAGS= environment variable).

You can also turn off optimization flags via OPTIMIZE=no . All this happens in util/makefile.common

To really dig into this, I would need to know:

It will also build on clang or icc if that's an option :)

And note that only setting CFLAGS is NOT sufficient; ARCH_FLAGS still get auto-detected.

juliotux commented 4 years ago

Thanks @dstndstn

My new test with manual setting generic arch flags in #9 it looks that the problem is solved. But this can be considered just a temporary solution. I will make more tests later, but all the log builds and system info are located in the conda-forge CI:

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=131361&view=results

This correspond to the following recipe build: https://github.com/conda-forge/astrometry-feedstock/blob/47ed8e35a87aa0083134c15b898dd5d45f0fcb37/recipe/build.sh

dstndstn commented 4 years ago

Okay, that's great. If you need any changes to the astrometry.net code to address this, or make it easier to handle, please let me know. Thanks again for your work here.

juliotux commented 4 years ago

With the new build configs it seems to be solved.