Skip to content
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

An error occurred during compilation #3203

Closed
matrix97317 opened this issue Apr 29, 2021 · 6 comments
Closed

An error occurred during compilation #3203

matrix97317 opened this issue Apr 29, 2021 · 6 comments

Comments

@matrix97317
Copy link

gfortran -O2 -Wall -frecursive -fno-optimize-sibling-calls -m64 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mavx2 -o zblat3 zblat3.o ../libopenblas_haswellp-r0.3.14.dev.a -
lm -lpthread -lgfortran -lm -lpthread -lgfortran -L/usr/lib32/../lib -L/usr/libx32/../lib -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../x
86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/x86_64-
linux-gnu -L/usr/lib32 -L/usr/libx32 -L. -L/usr/lib/gcc/x86_64-linux-gnu/6/../../.. -lc
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat1

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Could not print backtrace: unrecognized DWARF version in .debug_info at 110
#0 0x7f9030668d1d in ???
#1 0x7f9030667f7d in ???
#2 0x7f902fdc005f in ???
#3 0x7f9030721488 in ???
#4 0x7f903072f807 in ???
#5 0x4034a8 in ???
#6 0x40183e in ???
#7 0x7f902fdad2e0 in ???
#8 0x4018b9 in ???
#9 0xffffffffffffffff in ???
Segmentation fault
Makefile:28: recipe for target 'level1' failed


OpenBLAS Version:0.3.13
gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/xxxxx/opt/gfortran/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk-source/gcc/configure --enable-languages=c,c++,fortran --enable-checking=yes,extra --enable-valgrind-annotations --disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=gold --prefix=/usr/local/gcc-trunk
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210429 (experimental) [master revision e4aefface2:b286a1e29d:e4ff4ffb43d3d8520f1c106e04421f2e6a021c39] (GCC)

@martin-frbg
Copy link
Collaborator

This does not look familiar, but I have not tried to compile with a snapshot of gcc 12 (which I believe is in early stage 1) yet. Do you get an error when you compile with a stable release of gcc as well ?

@brada4
Copy link
Contributor

brada4 commented Apr 29, 2021

0x7.... are libraries, not necessarily openblas.
0x0... adresses are syscalls

It claims DWARf version 6 binary 110, should be v5 for current releases of gdb to parse
If you could use more archaic dwarf debug info version, names of calls should tell better. So far we see 3 syscalls and 6 library calls far from the beginning it crashed accessing something OOB or null.

@martin-frbg
Copy link
Collaborator

gcc12 probably requires similarly recent versions of binutils and gdb... and just in case, did you use both gcc12 and gfortran12 in your build ? (mixing different versions of the two is known to fail)

@brada4
Copy link
Contributor

brada4 commented Apr 29, 2021

It is practically non-debuggable backtrace.
Maybe there is some success running command in GDB

OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 gdb ./sblat1
gdb> r
gdb> bt
gdb>

As a bare minimum module+offset from memory needs to be decoded to function name from disk file, that looks close to impossible with incompatible syms lurking around....

Not certain there is a compiler bug, it may introduce more stringent "checks" around calls and reveal decade old bug in OpenBLAS, that happens all the time.

@brada4
Copy link
Contributor

brada4 commented May 1, 2021

Cannot repeat fedora rawhide gcc 11.1 , suse tumbleweed gcc 10.3.

@martin-frbg
Copy link
Collaborator

Not reproduced with today's git checkouts of both gcc master and OpenBLAS develop branch on Kaby Lake (Haswell target).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants