NSP crashes when trying to run OpenGL graphics demo

40 views
Skip to first unread message

Mariusz Grecki

unread,
Aug 30, 2020, 7:48:05 AM8/30/20
to tumbi
It crashes with "Segmentation fault (core dumped)" but I cannot find any core file. The strace output is enclosed below. Maybe that helps? The machine is 32b (Intel PCU) with Ubuntu xenial. If needed I can provide more data. Other than OpenGL demos works smoothly and in general nsp works well. The nsp is cvs current version compiled on that machine.

....
[pid 25191] read(5, 0xbff2b54c, 16)     = -1 EAGAIN (Resource temporarily unavailable)
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 847629726}) = 0
[pid 25191] read(13, 0x8bfc43d, 8131)   = -1 EAGAIN (Resource temporarily unavailable)
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 847768501}) = 0
[pid 25191] brk(0x8c26000)              = 0x8c26000
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 847965244}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 848203473}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 848268845}) = 0
[pid 25191] recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\22\0\222\2\3\0\200\3\3\0\200\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 160
[pid 25191] recvmsg(4, 0xbff2b3f4, 0)   = -1 EAGAIN (Resource temporarily unavailable)
[pid 25191] poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}], 3, 0) = 0 (Timeout)
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 848743277}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 848801176}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 848885056}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 849065666}) = 0
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 849246275}) = 0
[pid 25191] poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
[pid 25195] +++ exited with 1 +++
[pid 25193] <... poll resumed> )        = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
[pid 25193] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=25195, si_uid=1000, si_status=1, si_utime=68, si_stime=84} ---
[pid 25193] write(10, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 25193] sigreturn({mask=[]})        = -1 EINTR (Interrupted system call)
[pid 25193] read(11, 0xb47ff02c, 16)    = -1 EAGAIN (Resource temporarily unavailable)
[pid 25193] poll([{fd=9, events=POLLIN}, {fd=11, events=POLLIN}], 2, -1 <unfinished ...>
[pid 25192] <... poll resumed> )        = 1 ([{fd=10, revents=POLLIN}])
[pid 25192] read(10, "\1\0\0\0\0\0\0\0", 16) = 8
[pid 25192] waitpid(25195, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG) = 25195
[pid 25192] write(5, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 25192] poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}], 2, -1 <unfinished ...>
[pid 25191] writev(4, [{"\2 \4\0\3\0`\3\1\0\0\0\0\0\0\0\n\4\2\0\26\0`\3\2\0\4\0\3\0`\3"..., 96}, {NULL, 0}, {"", 0}], 3) = 96
[pid 25191] recvmsg(4, 0xbff2b324, 0)   = -1 EAGAIN (Resource temporarily unavailable)
[pid 25191] clock_gettime(CLOCK_MONOTONIC, {6916, 850450691}) = 0
[pid 25191] write(5, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 25191] close(13)                   = 0
[pid 25191] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x100} ---
[pid 25194] +++ killed by SIGSEGV (core dumped) +++
[pid 25192] +++ killed by SIGSEGV (core dumped) +++
[pid 25193] +++ killed by SIGSEGV (core dumped) +++
[pid 25191] +++ killed by SIGSEGV (core dumped) +++
<... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0, NULL) = 25191
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=25191, si_uid=1000, si_status=SIGSEGV, si_utime=38, si_stime=19} ---
sigreturn({mask=[]})                    = 25191
write(2, "Segmentation fault (core dumped)"..., 33Segmentation fault (core dumped)
) = 33
read(10, "", 8192)                      = 0
exit_group(139)                         = ?
+++ exited with 139 +++

Jean-Philippe Chancelier

unread,
Sep 1, 2020, 3:39:25 AM9/1/20
to tu...@googlegroups.com
Hello Mariusz,

Just to check, is your version built with gtk3 + opengl ? you should look something like

*******************
*     Summary     *
*******************

FFTW3 support..........: yes
OpenGl support.........: yes
Sndfile support........: yes
Portaudio support......: yes
Mongodb support........: yes
Graphviz support.......: yes
Asound support.........: yes
Glpk support...........: yes
Clp support............: yes
Cholmod support........: yes
Umfpack support........: yes
Spqr support...........: yes
GtkSourceView support..: yes
gobject-introspection..: yes
epoxy support..........: yes
qhull support..........: yes
man vizualization......: webkit2

Managed by pkg-config..: gtk+-3.0 epoxy clp webkit2gtk-4.0 gtksourceview-3.0 gthread-2.0 fftw3 sndfile alsa portaudio-2.0 gthread-2.0 libgvc libmongoc-1.0 gobject-introspection-1.0
   
At the end of configure.  If you find gtk+-3.0 and epoxy then it should be OK for opengl with gtk+-3.0

Can you also check that opengl works fine independently of nsp for example by running glxgears from the package mesa-utils.
I will make a try to see if it should wrok with xenial (I am currently using Focal Fossa).

Regards
jpc
--
You received this message because you are subscribed to the Google Groups "tumbi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tumbi+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tumbi/5f81dfe0-a856-4eca-8558-26fbd9f9f4f4n%40googlegroups.com.

Mariusz Grecki

unread,
Sep 1, 2020, 8:12:09 AM9/1/20
to tumbi
Hi Jean-Philippe,
glxgears runs fine:

mgrecki@mglap:~$ glxgears 
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.240 FPS

The summary of configure also looks quite well (for me):

*******************
*     Summary     *
*******************

FFTW3 support..........: yes
OpenGl support.........: yes
Sndfile support........: no
Portaudio support......: no
Mongodb support........: no
Graphviz support.......: no
Asound support.........: no
Glpk support...........: no
Clp support............: no
Cholmod support........: yes
Umfpack support........: yes
GtkSourceView support..: no
gobject-introspection..: no
epoxy support..........: yes
qhull support..........: no
man vizualization......: webkit-gtk

Managed by pkg-config..: gtk+-3.0 epoxy webkitgtk-3.0 gthread-2.0 fftw3
Lapack and Blas........: -llapack -lblas
gmp....................: -lgmp
zlib...................: -lz
Terminal...............: -lreadline -lncurses
cholmod................: -lcholmod -lsuitesparseconfig -lcolamd
umfpack................: -lumfpack -lamd
spqr...................: -lspqr
default graphic driver.: gtk/cairo
cairo output files.....: pdf ps svg

man browser............:  webkit

C compiler.............: gcc
C options..............: -g -O2 -Wall -Wno-deprecated-declarations -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE -I/usr/include/suitesparse -I/usr/include/suitesparse
C ldflags..............: -lieee
Fortran compiler.......: f77
Fortran options........: -g -O2 -Wall
Fortran ldflags........: -lieee -ldl -rdynamic

ocamlc compiler........: ocamlc
ocamlopt compiler......: ocamlopt

nsp toolboxes..........: compilers scicos-4.4 codegen-peval modnum_nsp coselica-0.4.8-nsp distmesh

Jean-Philippe Chancelier

unread,
Sep 2, 2020, 3:10:34 AM9/2/20
to 'Mariusz Grecki' via tumbi

Hi Mariusz,
Can you try to recompile nsp in debug mode
./configure --disable-optimize --enable-debug

Then you run nsp in debug mode with

bin/nsp -debug
and type run when (gdb) prompt appears

Regards
jpc

Mariusz Grecki

unread,
Sep 8, 2020, 4:29:20 PM9/8/20
to tumbi
Hi Jean-Philippe,
sorry for my delayed answer. This is the output from the nsp window:

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/mgrecki/src/nsp2_trunk_2019-01-23/bin/scilex...done.
(gdb) run
Starting program: /home/mgrecki/src/nsp2_trunk_2019-01-23/bin/scilex 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb04d4b40 (LWP 7115)]
[New Thread 0xafcd3b40 (LWP 7116)]
scicos toolbox loaded
scilex: Couldn't find current GLX or EGL context.

[Thread 0xafcd3b40 (LWP 7116) exited]
[Thread 0xb04d4b40 (LWP 7115) exited]
[Inferior 1 (process 7106) exited with code 01]
(gdb) 


BTW. I had some problems with make. The Makefile.in in toolboxes seems to be broken. I had to manually remove some "========" lines to compile nsp without errors. My version of nsp is updated from cvs.

Greetings
Mariusz
Reply all
Reply to author
Forward
0 new messages