Bug#989220: solvespace: crashes when starting on Debian stable.

Zuluaga, Juan P juan.zuluaga at my.sctcc.edu
Tue Jul 6 06:45:10 BST 2021


Thank you Bernhard,

according to your instructions, here I present:

juan at widgy:~$ gdb solvespace
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from solvespace...Reading symbols from /usr/lib/debug/.build-id/08/b34dccc7ada9d003ba80595f1a686a34256288.debug...done.
done.
(gdb) run
Starting program: /usr/bin/solvespace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xaf702b40 (LWP 12876)]
malloc(): invalid size (unsorted)

Thread 1 "solvespace" received signal SIGABRT, Aborted.
0xb7fd4d61 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fd4d61 in __kernel_vsyscall ()
#1  0xb6c23382 in __libc_signal_restore_set (set=0xbfffda5c) at ../sysdeps/unix/sysv/linux/internal-signals.h:84
#2  __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3  0xb6c0d2b6 in __GI_abort () at abort.c:79
#4  0xb6c64d2c in __libc_message (action=do_abort, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:181
#5  0xb6c6baed in malloc_printerr (str=str at entry=0xb6d775e8 "malloc(): invalid size (unsorted)") at malloc.c:5341
#6  0xb6c6e80b in _int_malloc (av=av at entry=0xb6dce7a0 <main_arena>, bytes=bytes at entry=236) at malloc.c:3732
#7  0xb6c70c34 in __libc_calloc (n=1, elem_size=236) at malloc.c:3428
#8  0xb312b867 in nv50_rasterizer_state_create (pipe=0xb59fa0, cso=0xc82780) at ../src/gallium/drivers/nouveau/nv50/nv50_state.c:230
#9  0xb2ec0ea9 in cso_set_rasterizer (ctx=0xb8b3e0, templ=0xb76964) at ../src/gallium/auxiliary/cso_cache/cso_context.c:604
#10 0xb3445465 in st_update_rasterizer (st=<optimized out>) at ../src/mesa/state_tracker/st_atom_rasterizer.c:317
#11 0xb3442e0f in st_validate_state (st=0xb768c0, pipeline=ST_PIPELINE_RENDER) at ../src/util/bitscan.h:103
#12 0xb339fea7 in prepare_draw (ctx=0xb5b460, st=0xb768c0) at ../src/mesa/state_tracker/st_draw.c:123
#13 st_draw_vbo (ctx=0xb5b460, prims=0xb7800c, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=<optimized out>, max_index=<optimized out>,
    tfb_vertcount=0x0, stream=0, indirect=0x0) at ../src/mesa/state_tracker/st_draw.c:149
#14 0xb329843e in vbo_exec_vtx_flush (exec=<optimized out>, keepUnmapped=1 '\001') at ../src/mesa/vbo/vbo_exec_draw.c:393
#15 0xb3297e57 in vbo_exec_FlushVertices_internal (unmap=1 '\001', exec=<optimized out>) at ../src/mesa/vbo/vbo_exec_api.c:1255
#16 vbo_exec_FlushVertices (ctx=0xb5b460, flags=1) at ../src/mesa/vbo/vbo_exec_api.c:1255
#17 0xb334477f in line_width (no_error=false, width=<optimized out>, ctx=0xb5b460) at ../src/mesa/main/lines.c:70
#18 _mesa_LineWidth (width=<optimized out>) at ../src/mesa/main/lines.c:95
#19 0x004df59f in SolveSpace::ssglLineWidth (width=<optimized out>) at ./src/glhelper.cpp:97
#20 0x004b2dc1 in SolveSpace::Entity::Draw (this=0xbdbe90, drawAsHidden=false) at ./src/drawentity.cpp:117
#21 0x004b2ece in SolveSpace::Entity::DrawAll (drawAsHidden=false) at ./src/drawentity.cpp:103
#22 0x0049d4d5 in SolveSpace::GraphicsWindow::Paint (this=<optimized out>) at ./src/draw.cpp:724
#23 0x0048470e in SolveSpace::GraphicsWidget::on_gl_draw (this=0xb57f00) at ./src/gtk/gtkmain.cpp:524
#24 0x00486f4f in SolveSpace::GlWidget::on_draw (cr=..., this=0xb57f00) at ./src/gtk/gtkmain.cpp:334
#25 SolveSpace::GlWidget::on_expose_event (this=<optimized out>) at ./src/gtk/gtkmain.cpp:350
#26 0xb7c8f579 in Gtk::Widget_Class::expose_event_callback(_GtkWidget*, _GdkEventExpose*) () from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
--Type <RET> for more, q to quit, c to continue without paging--c
#27 0xb76396e7 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#28 0xb7273138 in g_closure_invoke () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#29 0xb72863fd in ?? () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#30 0xb728f9a1 in g_signal_emit_valist () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#31 0xb7290465 in g_signal_emit () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#32 0xb775b4d4 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#33 0xb7637b71 in gtk_main_do_event () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#34 0xb74400ca in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#35 0xb7440077 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#36 0xb7470f0c in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#37 0xb743c6d4 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#38 0xb743d052 in gdk_window_process_all_updates () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#39 0xb75b8cc3 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#40 0xb741a8c5 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#41 0xb68a2ef5 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#42 0xb68a32f9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#43 0xb68a3699 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#44 0xb7636675 in gtk_main () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#45 0xb7c1ec8e in Gtk::Main::run(Gtk::Window&) () from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
#46 0x004624bf in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:342
(gdb) quit
A debugging session is active.

Inferior 1 [process 12869] will be killed.

Quit anyway? (y or n) y
juan at widgy:~$


------------------------------------------------------------------------------------------------------------

juan at widgy:~$ valgrind solvespace
==9540== Memcheck, a memory error detector
==9540== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9540== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==9540== Command: solvespace
==9540==
cannot load settings: Resource temporarily unavailable
==9540== Syscall param ioctl(generic) points to uninitialised byte(s)
==9540==    at 0x5B31DA9: ioctl (syscall-template.S:78)
==9540==    by 0x8ED0A9D: drmIoctl (in /usr/lib/i386-linux-gnu/libdrm.so.2.4.0)
==9540==    by 0x8ED3E21: drmCommandWriteRead (in /usr/lib/i386-linux-gnu/libdrm.so.2.4.0)
==9540==    by 0xD34652B: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0)
==9540==    by 0xD346915: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0)
==9540==    by 0xD34738C: nouveau_device_new (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0)
==9540==    by 0x91D1C1A: nouveau_drm_screen_create (nouveau_drm_winsys.c:101)
==9540==    by 0x8F53868: pipe_nouveau_create_screen (drm_helper.h:71)
==9540==    by 0x8FFAD56: pipe_loader_create_screen (pipe_loader.c:137)
==9540==    by 0x8F58256: dri2_init_screen (dri2.c:2130)
==9540==    by 0x8F5527D: driCreateNewScreen2 (dri_util.c:153)
==9540==    by 0x8E76C88: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0)
==9540==  Address 0x6bf00e2 is 2 bytes inside a block of size 72 alloc'd
==9540==    at 0x483463B: malloc (vg_replace_malloc.c:299)
==9540==    by 0xD3468B7: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0)
==9540==    by 0xD34738C: nouveau_device_new (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0)
==9540==    by 0x91D1C1A: nouveau_drm_screen_create (nouveau_drm_winsys.c:101)
==9540==    by 0x8F53868: pipe_nouveau_create_screen (drm_helper.h:71)
==9540==    by 0x8FFAD56: pipe_loader_create_screen (pipe_loader.c:137)
==9540==    by 0x8F58256: dri2_init_screen (dri2.c:2130)
==9540==    by 0x8F5527D: driCreateNewScreen2 (dri_util.c:153)
==9540==    by 0x8E76C88: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0)
==9540==    by 0x8E66E31: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0)
==9540==    by 0x8E625E3: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0)
==9540==    by 0x8E63A41: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0)
==9540==
==9540== Invalid write of size 4
==9540==    at 0x922AB73: nv50_rasterizer_state_create (nv50_state.c:338)
==9540==    by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604)
==9540==    by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317)
==9540==    by 0x9541E0E: st_validate_state (st_atom.c:259)
==9540==    by 0x949EEA6: prepare_draw (st_draw.c:123)
==9540==    by 0x949EEA6: st_draw_vbo (st_draw.c:149)
==9540==    by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9540==    by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643)
==9540==    by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255)
==9540==    by 0x947FB4A: set_depth_range_no_notify (viewport.c:295)
==9540==    by 0x9480013: _mesa_DepthRange (viewport.c:341)
==9540==    by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714)
==9540==    by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27)
==9540==    by 0x1BA5A0: SolveSpace::Entity::DrawOrGetDistance() (drawentity.cpp:668)
==9540==  Address 0x107ac1f4 is 0 bytes after a block of size 236 alloc'd
==9540==    at 0x4836A16: calloc (vg_replace_malloc.c:752)
==9540==    by 0x922A866: nv50_rasterizer_state_create (nv50_state.c:230)
==9540==    by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604)
==9540==    by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317)
==9540==    by 0x9541E0E: st_validate_state (st_atom.c:259)
==9540==    by 0x949EEA6: prepare_draw (st_draw.c:123)
==9540==    by 0x949EEA6: st_draw_vbo (st_draw.c:149)
==9540==    by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9540==    by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643)
==9540==    by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255)
==9540==    by 0x947FB4A: set_depth_range_no_notify (viewport.c:295)
==9540==    by 0x9480013: _mesa_DepthRange (viewport.c:341)
==9540==    by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714)
==9540==    by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27)
==9540==
==9540== Invalid read of size 4
==9540==    at 0x48398A4: memcpy (vg_replace_strmem.c:1035)
==9540==    by 0x922CF3B: memcpy (string_fortified.h:34)
==9540==    by 0x922CF3B: PUSH_DATAp (nouveau_winsys.h:44)
==9540==    by 0x922CF3B: nv50_validate_rasterizer (nv50_state_validate.c:408)
==9540==    by 0x922E0FA: nv50_state_validate (nv50_state_validate.c:549)
==9540==    by 0x922E313: nv50_state_validate_3d (nv50_state_validate.c:572)
==9540==    by 0x922F98D: nv50_draw_vbo (nv50_vbo.c:799)
==9540==    by 0x949EE35: st_draw_vbo (st_draw.c:236)
==9540==    by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9540==    by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643)
==9540==    by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255)
==9540==    by 0x947FB4A: set_depth_range_no_notify (viewport.c:295)
==9540==    by 0x9480013: _mesa_DepthRange (viewport.c:341)
==9540==    by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714)
==9540==    by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27)
==9540==  Address 0x107ac1f4 is 0 bytes after a block of size 236 alloc'd
==9540==    at 0x4836A16: calloc (vg_replace_malloc.c:752)
==9540==    by 0x922A866: nv50_rasterizer_state_create (nv50_state.c:230)
==9540==    by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604)
==9540==    by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317)
==9540==    by 0x9541E0E: st_validate_state (st_atom.c:259)
==9540==    by 0x949EEA6: prepare_draw (st_draw.c:123)
==9540==    by 0x949EEA6: st_draw_vbo (st_draw.c:149)
==9540==    by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9540==    by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643)
==9540==    by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255)
==9540==    by 0x947FB4A: set_depth_range_no_notify (viewport.c:295)
==9540==    by 0x9480013: _mesa_DepthRange (viewport.c:341)
==9540==    by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714)
==9540==    by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27)
==9540==
==9540==
==9540== HEAP SUMMARY:
==9540==     in use at exit: 1,909,602 bytes in 28,062 blocks
==9540==   total heap usage: 178,039 allocs, 149,977 frees, 181,345,705 bytes allocated
==9540==
==9540== LEAK SUMMARY:
==9540==    definitely lost: 5,485 bytes in 35 blocks
==9540==    indirectly lost: 84,543 bytes in 1,007 blocks
==9540==      possibly lost: 188,779 bytes in 980 blocks
==9540==    still reachable: 1,472,527 bytes in 24,221 blocks
==9540==                       of which reachable via heuristic:
==9540==                         newarray           : 15,225 bytes in 456 blocks
==9540==                         multipleinheritance: 14,400 bytes in 269 blocks
==9540==         suppressed: 0 bytes in 0 blocks
==9540== Rerun with --leak-check=full to see details of leaked memory
==9540==
==9540== For counts of detected and suppressed errors, rerun with: -v
==9540== Use --track-origins=yes to see where uninitialised values come from
==9540== ERROR SUMMARY: 216 errors from 3 contexts (suppressed: 0 from 0)

-------------------------------------------------------------------------------------------------

juan at widgy:~$ valgrind --tool=cachegrind solvespace
==9879== Cachegrind, a cache and branch-prediction profiler
==9879== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==9879== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==9879== Command: solvespace
==9879==
malloc(): invalid size (unsorted)
==9879==
==9879== Process terminating with default action of signal 6 (SIGABRT)
==9879==    at 0x5A5D382: raise (raise.c:51)
==9879==    by 0x5A472B5: abort (abort.c:79)
==9879==    by 0x5A9ED2B: __libc_message (libc_fatal.c:181)
==9879==    by 0x5AA5AEC: malloc_printerr (malloc.c:5341)
==9879==    by 0x5AA880A: _int_malloc (malloc.c:3732)
==9879==    by 0x5AAAC33: calloc (malloc.c:3428)
==9879==    by 0x8E18866: nv50_rasterizer_state_create (nv50_state.c:230)
==9879==    by 0x8BADEA8: cso_set_rasterizer (cso_context.c:604)
==9879==    by 0x9132464: st_update_rasterizer (st_atom_rasterizer.c:317)
==9879==    by 0x912FE0E: st_validate_state (st_atom.c:259)
==9879==    by 0x908CEA6: st_draw_vbo (st_draw.c:123)
==9879==    by 0x8F8543D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9879==
==9879== I   refs:      604,726,756
==9879== I1  misses:        860,858
==9879== LLi misses:        102,468
==9879== I1  miss rate:        0.14%
==9879== LLi miss rate:        0.02%
==9879==
==9879== D   refs:      289,014,318  (200,277,631 rd   + 88,736,687 wr)
==9879== D1  misses:     14,465,701  ( 13,373,610 rd   +  1,092,091 wr)
==9879== LLd misses:      1,242,020  (    367,246 rd   +    874,774 wr)
==9879== D1  miss rate:         5.0% (        6.7%     +        1.2%  )
==9879== LLd miss rate:         0.4% (        0.2%     +        1.0%  )
==9879==
==9879== LL refs:        15,326,559  ( 14,234,468 rd   +  1,092,091 wr)
==9879== LL misses:       1,344,488  (    469,714 rd   +    874,774 wr)
==9879== LL miss rate:          0.2% (        0.1%     +        1.0%  )
Aborted

-------------------------------------------------------------------------------------------------

juan at widgy:~$ valgrind --tool=callgrind solvespace
==9956== Callgrind, a call-graph generating cache profiler
==9956== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
==9956== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==9956== Command: solvespace
==9956==
==9956== For interactive control, run 'callgrind_control -h'.
malloc(): invalid size (unsorted)
==9956==
==9956== Process terminating with default action of signal 6 (SIGABRT)
==9956==    at 0x5A5D382: raise (raise.c:51)
==9956==    by 0x5A472B5: abort (abort.c:79)
==9956==    by 0x5A9ED2B: __libc_message (libc_fatal.c:181)
==9956==    by 0x5AA5AEC: malloc_printerr (malloc.c:5341)
==9956==    by 0x5AA880A: _int_malloc (malloc.c:3732)
==9956==    by 0x5AAAC33: calloc (malloc.c:3428)
==9956==    by 0x8E18866: nv50_rasterizer_state_create (nv50_state.c:230)
==9956==    by 0x8BADEA8: cso_set_rasterizer (cso_context.c:604)
==9956==    by 0x9132464: st_update_rasterizer (st_atom_rasterizer.c:317)
==9956==    by 0x912FE0E: st_validate_state (st_atom.c:259)
==9956==    by 0x908CEA6: st_draw_vbo (st_draw.c:123)
==9956==    by 0x8F8543D: vbo_exec_vtx_flush (vbo_exec_draw.c:393)
==9956==
==9956== Events    : Ir
==9956== Collected : 604833322
==9956==
==9956== I   refs:      604,833,322
Aborted
---------------------------------------------------

Valgrind tools Helgrind and DRD create huge reports size 3.9 and 6 MB, respectively. Let me know if I should attach them whole or in part.

Cheers!
-j

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210706/e1ad2e85/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: errorsvalgrindEXPBBV.txt
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210706/e1ad2e85/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: errorsvalgrindNone.txt
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210706/e1ad2e85/attachment-0005.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: errorsvalgrindLackey.txt
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210706/e1ad2e85/attachment-0006.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: errorsvalgrindMASSIF.txt
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210706/e1ad2e85/attachment-0007.txt>


More information about the debian-science-maintainers mailing list