bugGNU Octave - Bugs: bug #65866, make check: Fatal segmentation...

 
 

bug #65866: make check: Fatal segmentation fault when running image/getframe.m test

Submitter:  Atri Bhattacharya <badshah400>
Submitted:  Mon 10 Jun 2024 09:52:47 AM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 9.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jun 2024 12:57:12 PM UTC, comment #2: 

Many thanks for the quick response.

comment #1:

> Thank you for the report.
>
> There is a known compatibility issue with Qt6 6.7.x in Octave 9.1.0. But that should have been addressed by the changes for Octave 9.2.0.
>
> ISTR that we have seen on other platforms (Windows iirc) that some headless runners have issues with that particular test.
> ISTR, that running the test suite with `make check RUN_OCTAVE_OPTIONS="--no-gui-libs"` worked around that issue.
> Using that flag means that `octave-cli` (instead of `octave-gui`) will be used for the test suite. That executable doesn't link to libgui (that is used for the OpenGL graphics toolkits among other things). That also means that the tests for getframe.m (and some other files) will be skipped.
>


Just tested that this works. So, indeed, this might be an issue with how xvfb-run is working inside the build system chroot. Weird thing is that the other GUI tests work, and our previously packaged version 8.4.0 also had the full test-suite running without any issue.

>
> Is xvfb correctly configured? Does Mesa work correctly on the runners that are used for that test?
>


I am going to test this more rigorously and try to figure out what is going on but, in the meantime, the "no-gui-libs" workaround should be just fine.

> If you opt in to the workaround with `--no-gui-libs`, please test manually that `test getframe` doesn't crash Octave on a local installation (with head). After all, that could be an issue in the GUI libraries that is not only triggered on headless systems.


Tested this, and it works:


~> octave --version
GNU Octave, version 9.2.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.

Octave was configured for "x86_64-suse-linux-gnu".

Home page:            https://octave.org
Support resources:    https://octave.org/support
Improve Octave:       https://octave.org/get-involved

~> octave --eval "test getframe"
PASSES 2 out of 2 tests


Thanks again for the help.

Atri Bhattacharya <badshah400>
Mon 10 Jun 2024 10:41:56 AM UTC, comment #1: 

Thank you for the report.

There is a known compatibility issue with Qt6 6.7.x in Octave 9.1.0. But that should have been addressed by the changes for Octave 9.2.0.

ISTR that we have seen on other platforms (Windows iirc) that some headless runners have issues with that particular test.
ISTR, that running the test suite with `make check RUN_OCTAVE_OPTIONS="--no-gui-libs"` worked around that issue.
Using that flag means that `octave-cli` (instead of `octave-gui`) will be used for the test suite. That executable doesn't link to libgui (that is used for the OpenGL graphics toolkits among other things). That also means that the tests for getframe.m (and some other files) will be skipped.

I'm seeing the following prior output in the test log which could be related:

[ 1056s]   libinterp/corefcn/gh-manager.cc-tst ............................MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
[ 1056s] libEGL warning: egl: failed to create dri2 screen
[ 1056s] libEGL warning: DRI2: failed to create any config
[ 1056s] MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
[ 1056s] libEGL warning: egl: failed to create dri2 screen
[ 1056s] libEGL warning: DRI2: failed to create any config
[ 1056s]  pass    1/1    [ 0.087s /  0.086s]


Is xvfb correctly configured? Does Mesa work correctly on the runners that are used for that test?

If you opt in to the workaround with `--no-gui-libs`, please test manually that `test getframe` doesn't crash Octave on a local installation (with head). After all, that could be an issue in the GUI libraries that is not only triggered on headless systems.

Does it make a difference if you run the test suite with that flag?

If it still crashes, would it be possible to get a backtrace from that crash?
If you can build Octave locally and reproduce the crash there, it should be possible to attach a debugger to Octave by starting it with `./run-octave -g --gui` in the build tree.

Markus Mützel <mmuetzel>
Group administrator
Mon 10 Jun 2024 09:52:47 AM UTC, original submission:  

Hi,
While trying to build a RPM package for openSUSE Tumbleweed, we run make check to ensure the test-suite succeeds. However, with version 9.2.0, we find that the test-suite encounters a segfault that leads to the test-suite failing. The relevant snippet from the full build log (attached) is as follows:


[ 1129s]   image/getframe.m ...............................................fatal: caught signal Segmentation fault -- stopping myself...
[ 1129s] /usr/bin/bash: line 1: 29829 Segmentation fault      ( /usr/bin/bash ../run-octave --no-init-file --silent --no-history -p /home/abuild/rpmbuild/BUILD/octave-9.2.0/t
est/mex /home/abuild/rpmbuild/BUILD/octave-9.2.0/test/fntests.m /home/abuild/rpmbuild/BUILD/octave-9.2.0/test "" )
[ 1129s] make[4]: *** [Makefile:3202: check-local] Error 139
[ 1129s] make[4]: Leaving directory '/home/abuild/rpmbuild/BUILD/octave-9.2.0/test'
[ 1129s] make[3]: *** [Makefile:3050: check-am] Error 2
[ 1129s] make[3]: Leaving directory '/home/abuild/rpmbuild/BUILD/octave-9.2.0/test'
[ 1129s] make[2]: *** [Makefile:3052: check] Error 2
[ 1129s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/octave-9.2.0/test'
[ 1129s] make[1]: *** [Makefile:28220: check-recursive] Error 1
[ 1129s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/octave-9.2.0'
[ 1129s] make: *** [Makefile:28518: check] Error 2


Thanks in advance for any suggestions to fix/work around this.




Here are some package versions that may help in diagnosing the issue:

  • GCC 13.3
  • Qt 6.7.1
  • java-21-openjdk 21.0.3


The following is the status after running configure:


[  117s] Octave is now configured for x86_64-suse-linux-gnu
[  117s]
[  117s]   Source directory:              .
[  117s]   Installation prefix:           /usr
[  117s]   C compiler:                    gcc  -pthread -fopenmp -fexceptions  -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g
[  117s]   C++ compiler:                  g++  -pthread -fopenmp  -Wall -W -Wshadow -Woverloaded-virtual -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g
[  117s]   Fortran compiler:              gfortran -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g  -std=legacy -fexceptions
[  117s]   CPPFLAGS:
[  117s]   Fortran libraries:              -L/usr/lib64/gcc/x86_64-suse-linux/13 -L/usr/lib64/gcc/x86_64-suse-linux/13/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/13/../../.. -lgfortran -lm -lquadmath
[  117s]   Lex libraries:
[  117s]   LIBS:                          -lpthread -lm
[  117s]   LDFLAGS:                       -flto=auto
[  117s]   Extra LDFLAGS:
[  117s]
[  117s]   AMD CPPFLAGS:                  -I/usr/include/suitesparse
[  117s]   AMD LDFLAGS:
[  117s]   AMD libraries:                 -lamd
[  117s]   ARPACK CPPFLAGS:               -I/usr/include/arpack
[  117s]   ARPACK LDFLAGS:
[  117s]   ARPACK libraries:              -larpack
[  117s]   BLAS libraries:                -lopenblas
[  117s]   BZ2 CPPFLAGS:
[  117s]   BZ2 LDFLAGS:
[  117s]   BZ2 libraries:                 -lbz2
[  117s]   CAMD CPPFLAGS:                 -I/usr/include/suitesparse
[  117s]   CAMD LDFLAGS:
[  117s]   CAMD libraries:                -lcamd
[  117s]   CARBON libraries:
[  117s]   CCOLAMD CPPFLAGS:              -I/usr/include/suitesparse
[  117s]   CCOLAMD LDFLAGS:
[  117s]   CCOLAMD libraries:             -lccolamd
[  117s]   CHOLMOD CPPFLAGS:              -I/usr/include/suitesparse
[  117s]   CHOLMOD LDFLAGS:
[  117s]   CHOLMOD libraries:             -lcholmod
[  117s]   COLAMD CPPFLAGS:               -I/usr/include/suitesparse
[  117s]   COLAMD LDFLAGS:
[  117s]   COLAMD libraries:              -lcolamd
[  117s]   CURL CPPFLAGS:
[  117s]   CURL LDFLAGS:
[  117s]   CURL libraries:                -lcurl
[  117s]   CXSPARSE CPPFLAGS:             -I/usr/include/suitesparse
[  117s]   CXSPARSE LDFLAGS:
[  117s]   CXSPARSE libraries:            -lcxsparse
[  117s]   DL libraries:
[  117s]   FFTW3 CPPFLAGS:
[  117s]   FFTW3 LDFLAGS:
[  117s]   FFTW3 libraries:               -lfftw3_threads -lfftw3
[  117s]   FFTW3F CPPFLAGS:
[  117s]   FFTW3F LDFLAGS:
[  117s]   FFTW3F libraries:              -lfftw3f_threads -lfftw3f
[  117s]   FLTK CPPFLAGS:
[  117s]   FLTK LDFLAGS:                  -flto=auto
[  117s]   FLTK libraries:                -lfltk_gl -lfltk
[  117s]   fontconfig CPPFLAGS:           -I/usr/include/freetype2
[  117s]   fontconfig libraries:          -lfontconfig -lfreetype
[  117s]   FreeType2 CPPFLAGS:            -I/usr/include/freetype2
[  117s]   FreeType2 libraries:           -lfreetype
[  117s]   GLPK CPPFLAGS:
[  117s]   GLPK LDFLAGS:
[  117s]   GLPK libraries:                -lglpk
[  117s]   HDF5 CPPFLAGS:
[  117s]   HDF5 LDFLAGS:
[  117s]   HDF5 libraries:                -lhdf5
[  117s]   Java home:                     /usr/lib64/jvm/java-21-openjdk-21
[  117s]   Java JVM path:                 /usr/lib64/jvm/java-21-openjdk-21/lib/server
[  117s]   Java CPPFLAGS:                 -I/usr/lib64/jvm/java-21-openjdk-21/include -I/usr/lib64/jvm/java-21-openjdk-21/include/linux
[  117s]   Java libraries:
[  117s]   KLU CPPFLAGS:                  -I/usr/include/suitesparse
[  117s]   KLU LDFLAGS:
[  117s]   KLU libraries:                 -lklu
[  117s]   LAPACK libraries:
[  117s]   Magick++ CPPFLAGS:             -I/usr/include/GraphicsMagick
[  117s]   Magick++ LDFLAGS:
[  117s]   Magick++ libraries:            -lGraphicsMagick++ -lGraphicsMagick
[  117s]   OpenGL libraries:              -lGL -lGLU
[  117s]   PCRE CPPFLAGS:
[  117s]   PCRE LDFLAGS:
[  117s]   PCRE libraries:                -lpcre2-8
[  117s]   PortAudio CPPFLAGS:
[  117s]   PortAudio LDFLAGS:
[  117s]   PortAudio libraries:           -lportaudio -lm -lpthread -lasound
[  117s]   PTHREAD flags:                 -pthread
[  117s]   PTHREAD libraries:             -lpthread
[  117s]   QHULL CPPFLAGS:
[  117s]   QHULL LDFLAGS:
[  117s]   QHULL libraries:               -lqhull_r
[  117s]   QRUPDATE CPPFLAGS:
[  117s]   QRUPDATE LDFLAGS:
[  117s]   QRUPDATE libraries:            -lqrupdate
[  117s]   Qt CPPFLAGS:                   -I/usr/include/qt6/QtHelp -I/usr/include/qt6 -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtSql -I/usr/include/qt6/QtNetwork -I/usr/include/qt6/QtOpenGL -I/usr/include/qt6/QtOpenGLWidgets -I/usr/include/qt6/QtPrintSupport -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtXml -I/usr/include/qt6/QtCore5Compat -I/usr/include/qt6/QtCore -I/usr/lib64/qt6/mkspecs/linux-g++
[  117s]   Qt LDFLAGS:
[  117s]   Qt GUI libraries:              -lQt6Help -lQt6Gui -lQt6Sql -lQt6Network -lQt6OpenGL -lQt6OpenGLWidgets -lQt6PrintSupport -lQt6Widgets -lQt6Xml -lQt6Core5Compat -lQt6Core -lqscintilla2_qt6
[  117s]   Qt moc:                        /usr/libexec/qt6/moc
[  117s]   Qt uic:                        /usr/libexec/qt6/uic
[  117s]   Qt rcc:                        /usr/libexec/qt6/rcc
[  117s]   Qt lrelease:                   /usr/lib64/qt6/bin/lrelease
[  117s]   Qt qcollectiongenerator:       /usr/libexec/qt6/qhelpgenerator
[  117s]   Qt qhelpgenerator:             /usr/libexec/qt6/qhelpgenerator
[  117s]   READLINE libraries:            /usr/lib64/libreadline.so
[  117s]   Sndfile CPPFLAGS:              -I/usr/include/opus
[  117s]   Sndfile LDFLAGS:
[  117s]   Sndfile libraries:             -lsndfile
[  117s]   SPQR CPPFLAGS:                 -I/usr/include/suitesparse
[  117s]   SPQR LDFLAGS:
[  117s]   SPQR libraries:                -lspqr
[  117s]   SuiteSparse config libraries:  -lsuitesparseconfig
[  117s]   SUNDIALS core CPPFLAGS:
[  117s]   SUNDIALS core LDFLAGS:
[  117s]   SUNDIALS core libraries:       -lsundials_core
[  117s]   SUNDIALS IDA CPPFLAGS:
[  117s]   SUNDIALS IDA LDFLAGS:
[  117s]   SUNDIALS IDA libraries:        -lsundials_ida
[  117s]   SUNDIALS NVECTOR CPPFLAGS:
[  117s]   SUNDIALS NVECTOR LDFLAGS:
[  117s]   SUNDIALS NVECTOR libraries:    -lsundials_nvecserial
[  117s]   SUNLINSOL KLU CPPFLAGS:
[  117s]   SUNLINSOL KLU LDFLAGS:
[  117s]   SUNLINSOL KLU libraries:       -lsundials_sunlinsolklu
[  117s]   UMFPACK CPPFLAGS:              -I/usr/include/suitesparse
[  117s]   UMFPACK LDFLAGS:
[  117s]   UMFPACK libraries:             -lumfpack
[  117s]   X11 include flags:
[  117s]   X11 libraries:                 -lX11
[  117s]   Z CPPFLAGS:
[  117s]   Z LDFLAGS:
[  117s]   Z libraries:                   -lz
[  117s]
[  117s]   Default pager:                 less
[  117s]   gnuplot:                       gnuplot
[  117s]
[  117s]   Build Octave Qt GUI:                  yes (version: 6)
[  117s]   Build Java interface:                 yes
[  117s]   Build static libraries:               no
[  117s]   Build shared libraries:               yes
[  117s]   Dynamic Linking API:                  dlopen
[  117s]   Use library visibility flags:         no
[  117s]   64-bit array dims and indexing:       yes
[  117s]   64-bit BLAS array dims and indexing:  no
[  117s]   Use std::pmr::polymorphic_allocator:  no
[  117s]   OpenMP SMP multithreading:            yes
[  117s]   Truncate intermediate FP results:     yes
[  117s]   Include support for GNU readline:     yes
[  117s]   Use push parser in command line REPL: yes
[  117s]   Build cross tools:                    no
[  117s]   Build docs:                           no
[  117s]   Embed Mercurial ID in libraries:      yes
[  117s]   Install build logs:                   no
[  117s]
[  117s] configure: WARNING:
[  117s]
[  117s] I didn't find texi2dvi, but it's only a problem if you need to
[  117s] reconstruct the DVI version of the manual
[  117s]
[  117s] configure: WARNING:
[  117s]
[  117s] I didn't find icotool, but it's only a problem if you need to
[  117s] reconstruct octave-logo.ico, which is the case if you're building from
[  117s] VCS sources.
[  117s]
[  117s] configure: WARNING:
[  117s]
[  117s] I didn't find rsvg-convert, but it's only a problem if you need to
[  117s] reconstruct octave-logo-*.png, which is the case if you're building
[  117s] from VCS sources.
[  117s]
[  117s] configure: WARNING: building documentation disabled; make dist will fail.


Atri Bhattacharya <badshah400>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #56152:  build.log.gz added by badshah400 (200KiB - application/gzip - Full build log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by badshah400 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-06-10 mmuetzel StatusNone Need Info
    2024-06-10 badshah400 Attached File- Added build.log.gz, #56152

    Back to the top

    Powered by Savane 3.14-49f2.
    Corresponding source code