ARPA-SIMC / libsim

Command-line utilities and fortran modules for meteorological data processing
GNU General Public License v2.0
7 stars 1 forks source link

Tests failure for v7.1.6-1 on Fedora 38 #104

Closed edigiacomo closed 1 year ago

edigiacomo commented 1 year ago

Some tests of the last version (7.1.6-1) fail on Fedora 38 only.

From https://simc.arpae.it/moncic-ci/libsim/202306080700/master/fedora38/build.log:

2023-06-08 09:12:37 INFO system.fedora38 stdout: make  check-TESTS
2023-06-08 09:12:37 INFO system.fedora38 stdout: make[2]: Entering directory '/root/rpmbuild/BUILD/libsim/vol7d'
2023-06-08 09:12:37 INFO system.fedora38 stdout: make[3]: Entering directory '/root/rpmbuild/BUILD/libsim/vol7d'
2023-06-08 09:12:37 INFO system.fedora38 stderr: ../test-driver: line 112: 18843 Aborted                 (core dumped) "$@" >> "$log_file" 2>&1
2023-06-08 09:12:37 INFO system.fedora38 stdout: FAIL: vol7d_dballe_test
2023-06-08 09:12:38 INFO system.fedora38 stderr: ../test-driver: line 112: 18864 Aborted                 (core dumped) "$@" >> "$log_file" 2>&1
2023-06-08 09:12:38 INFO system.fedora38 stdout: FAIL: vol7d_dballe_test2
2023-06-08 09:12:38 INFO system.fedora38 stdout: PASS: dballe_test
2023-06-08 09:12:38 INFO system.fedora38 stdout: PASS: dballe_test2
2023-06-08 09:12:39 INFO system.fedora38 stdout: PASS: dballe_test3
2023-06-08 09:12:39 INFO system.fedora38 stdout: FAIL: vol7d_dballe_test.sh
2023-06-08 09:12:39 INFO system.fedora38 stdout: PASS: dballe_test.sh
2023-06-08 09:12:39 INFO system.fedora38 stdout: ============================================================================
2023-06-08 09:12:39 INFO system.fedora38 stdout: Testsuite summary for libsim 7.1.6
2023-06-08 09:12:39 INFO system.fedora38 stdout: ============================================================================
2023-06-08 09:12:39 INFO system.fedora38 stdout: # TOTAL: 7
2023-06-08 09:12:39 INFO system.fedora38 stdout: # PASS:  4
2023-06-08 09:12:39 INFO system.fedora38 stdout: # SKIP:  0
2023-06-08 09:12:39 INFO system.fedora38 stdout: # XFAIL: 0
2023-06-08 09:12:39 INFO system.fedora38 stdout: # FAIL:  3
2023-06-08 09:12:39 INFO system.fedora38 stdout: # XPASS: 0
2023-06-08 09:12:39 INFO system.fedora38 stdout: # ERROR: 0
pat1 commented 1 year ago

there is a previous version of libsim without failures on Fedora 38 ?

edigiacomo commented 1 year ago

It seems that libsim 7.1.6-1 was already packaged for F38:

$ monci run fedora38 dnf list libsim
Available Packages
libsim.src                                                                             7.1.6-1                                                                           copr:copr.fedorainfracloud.org:simc:stable
libsim.x86_64                                                                          7.1.6-1                                                                           copr:copr.fedorainfracloud.org:simc:stable

Maybe these tests failures are caused by a more recent version of one of the dependencies? I hope this could be used a hint to fix the issue.

dcesari commented 1 year ago

The test fails in this way

#0  0x0000155554e8c844 in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x0000155554e3babe in raise () from /lib64/libc.so.6
#2  0x0000155554e2487f in abort () from /lib64/libc.so.6
#3  0x0000155554e2560f in __libc_message.cold () from /lib64/libc.so.6
#4  0x0000155554f20979 in __fortify_fail () from /lib64/libc.so.6
#5  0x0000155554f20954 in __stack_chk_fail () from /lib64/libc.so.6
#6  0x0000155554de3221 in list_abstract::currentpoli (this=...) at /root/rpmbuild/BUILD/libsim/base/list_abstract.F03:262
#7  0x0000555555608e00 in ?? ()
#8  0x00000000000000ff in ?? ()
#9  0x00007fffffffb4c8 in ?? ()
#10 0x0000000000000000 in ?? ()

i suspect it is generated by some more restrictive fedora rpmbuild options, e.g. https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer. I continue testing.

dcesari commented 1 year ago

Useful info

Full rpmbuild configure line:

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info 'FCFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules' --enable-alchimia --enable-shapelib --enable-netcdf --enable-gribapi --disable-static --enable-gdal

To reproduce with debugger:

cd vol7d
libtool --mode=execute gdb ./vol7d_dballe_test

No success until now.

dcesari commented 1 year ago

this is the last intelligible backtrace

(gdb) step
58  getValue => this%value
(gdb) 
59  end function getValue
(gdb) 
0x00001555554bee30 in dballe_class::__copy_dballe_class_Dbametaanddata (src=..., dst=...) at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:4473
4473    end MODULE dballe_class
(gdb) where
#0  0x00001555554bee30 in dballe_class::__copy_dballe_class_Dbametaanddata (src=..., dst=...) at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:4473
#1  0x000015555530344b in list_abstract::currentpoli (this=...) at /root/rpmbuild/BUILD/libsim/base/list_abstract.F03:261
#2  0x00001555554cd549 in dballe_class::currentdbametaanddata (this=...) at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:646
#3  0x00001555554d6c7a in dballe_class::displaydbametaanddata (this=...) at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:635
#4  0x00001555554cab5d in dballe_class::dbametaanddatal_extrude (metaanddatal=..., session=..., noattr=<error reading variable: Cannot access memory at address 0x0>, filter=..., 
    attronly=<error reading variable: Cannot access memory at address 0x0>, template=<error reading variable: Cannot access memory at address 0x0>, _template=0)
    at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:2579
#5  0x00001555554d741f in vol7d_dballe_class::vol7d_dballe_export (this=..., filter=..., template=<error reading variable: Cannot access memory at address 0x0>, 
    attr_only=<error reading variable: Cannot access memory at address 0x0>, _template=_template@entry=0) at /root/rpmbuild/BUILD/libsim/vol7d/vol7d_dballe_class.F03:1923
#6  0x00001555554d8355 in vol7d_dballe_class::vol7d_dballe_export_old (this=..., network=<error reading variable: Cannot access memory at address 0x0>, 
    coordmin=<error reading variable: Cannot access memory at address 0x0>, coordmax=<error reading variable: Cannot access memory at address 0x0>, 
    timei=<error reading variable: Cannot access memory at address 0x0>, timef=<error reading variable: Cannot access memory at address 0x0>, 
    level=<error reading variable: Cannot access memory at address 0x0>, timerange=<error reading variable: Cannot access memory at address 0x0>, var=<incomplete type>, 
    attr=<incomplete type>, anavar=<incomplete type>, anaattr=<incomplete type>, ana=<error reading variable: Cannot access memory at address 0x0>, 
    dataonly=<error reading variable: Cannot access memory at address 0x0>, anaonly=<error reading variable: Cannot access memory at address 0x0>, 
    template=<error reading variable: Cannot access memory at address 0x0>, attr_only=<error reading variable: Cannot access memory at address 0x0>, _network=0, _var=0, _attr=0, _anavar=0, 
    _anaattr=0, _template=<optimized out>) at /root/rpmbuild/BUILD/libsim/vol7d/vol7d_dballe_class.F03:1895
#7  0x000000000040180d in v7ddballe_test () at /root/rpmbuild/BUILD/libsim/vol7d/vol7d_dballe_test.F90:77
(gdb) step

Program received signal SIGSEGV, Segmentation fault.
0x00001555554bef13 in dballe_class::__copy_dballe_class_Dbametaanddata (src=..., dst=...) at /root/rpmbuild/BUILD/libsim/vol7d/dballe_class.F03:4473
4473    end MODULE dballe_class
dcesari commented 1 year ago

Ho messo un dossier più esteso in https://docs.google.com/document/d/16tpe1bWzzHhmLy8sRSoieoeesmBRtkHwKzCkGWSkg-I/edit?usp=sharing

dcesari commented 1 year ago

This is probably due to a bug in gfortran 13 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111521 a workaround has been implemented in 4108fcc9815a62a1c98117ef7363c52313cd3a29 .