[Pkg-octave-devel] Bug#743260: octave: fltk plotting segfaults when using llvmpipe direct rendering

Mike Miller mtmiller at debian.org
Tue Apr 1 04:48:38 UTC 2014


Package: octave
Version: 3.8.1-1+b1
Severity: normal

Octave segfaults when plotting anything with the fltk toolkit when
Octave is built with JIT and when using one of the Gallium llvmpipe Mesa
drivers for direct rendering. JIT does not have to be enabled in Octave
for the crash to occur. This is perhaps some kind of LLVM conflict,
since Octave uses LLVM for JIT and Mesa uses LLVM for the software
rendering drivers.

At a minimum, just drawing an empty axes object is enough:

  $ gdb --args /usr/bin/octave --persist --eval "axes"
  ...
  (gdb) run
  ...
  Program received signal SIGSEGV, Segmentation fault.
  0x0000000000000000 in ?? ()
  (gdb) bt
  (gdb) bt
  #0  0x0000000000000000 in ?? ()
  #1  0x00007ffff1f12779 in llvm::TargetRegistry::lookupTarget(std::string const&, std::string&) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.3.so.1
  #2  0x00007ffff19b27a1 in llvm::EngineBuilder::selectTarget(llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::SmallVectorImpl<std::string> const&) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.3.so.1
  #3  0x00007fffe4aa9a58 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #4  0x00007fffe4a8660d in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #5  0x00007fffe4af69bc in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #6  0x00007fffe4aef4a0 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #7  0x00007fffe4ad8471 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #8  0x00007fffe48d05fc in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #9  0x00007fffe48a57f7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #10 0x00007fffe488de6f in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #11 0x00007fffe48a2946 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #12 0x00007fffe47ecd57 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
  #13 0x00007ffff757b233 in opengl_renderer::set_polygon_offset (this=<optimized out>, on=<optimized out>, offset=<optimized out>) at corefcn/gl-render.cc:2761
  #14 0x00007ffff757d1d4 in opengl_renderer::draw_axes_planes (this=this at entry=0xca9a90, props=...) at corefcn/gl-render.cc:868
  #15 0x00007ffff7583208 in opengl_renderer::draw_axes (this=0xca9a90, props=...) at corefcn/gl-render.cc:1418
  #16 0x00007ffff757b89e in opengl_renderer::draw (this=0xca9a90, go=..., toplevel=<optimized out>) at corefcn/gl-render.cc:566
  #17 0x00007ffff758db0e in opengl_renderer::draw (this=this at entry=0xca9a90, hlist=..., toplevel=toplevel at entry=false) at corefcn/gl-render.h:73
  #18 0x00007ffff7584816 in opengl_renderer::draw_figure (this=0xca9a90, props=...) at corefcn/gl-render.cc:592
  #19 0x00007ffff757b89e in opengl_renderer::draw (this=this at entry=0xca9a90, go=..., toplevel=toplevel at entry=true) at corefcn/gl-render.cc:566
  #20 0x00007fffe5fef209 in OpenGL_fltk::draw (this=0xca9970) at dldfcn/__init_fltk__.cc:200
  #21 0x00007fffe5db8275 in Fl_Gl_Window::flush() () from /usr/lib/x86_64-linux-gnu/libfltk_gl.so.1.3
  #22 0x00007fffe5aaec62 in Fl::flush() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
  #23 0x00007fffe5aafba8 in Fl::wait(double) () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
  #24 0x00007fffe5aafc3d in Fl::check() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
  #25 0x00007fffe5fdf321 in __fltk_redraw__ () at dldfcn/__init_fltk__.cc:1886
  #26 0x00007fffe5feeea5 in fltk_graphics_toolkit::redraw_figure (this=<optimized out>, go=...) at dldfcn/__init_fltk__.cc:2010
  #27 0x00007ffff76131de in redraw_figure (go=..., this=0x7fffffffd830) at corefcn/graphics.h:2169
  #28 Fdrawnow (args=...) at corefcn/graphics.cc:9737
  ...

I think this bug has affected a handful of people now and again on the
upstream mailing list and bug tracker but AFAICT the specific
configuration was never identified. Rebuilding Octave without LLVM
(--disable-jit) appears to resolve this problem.

Another workaround is to disable Mesa direct rendering:

  (gdb) set env LIBGL_ALWAYS_INDIRECT y
  (gdb) run
  ...

No segfault.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages octave depends on:
ii  default-jre-headless             2:1.7-51
ii  libamd2.3.1                      1:4.2.1-3
ii  libarpack2                       3.1.5-2
ii  libatlas3-base [liblapack.so.3]  3.10.1-4
ii  libblas3 [libblas.so.3]          1.2.20110419-7
ii  libc6                            2.18-4
ii  libcamd2.3.1                     1:4.2.1-3
ii  libccolamd2.8.0                  1:4.2.1-3
ii  libcholmod2.1.2                  1:4.2.1-3
ii  libcolamd2.8.0                   1:4.2.1-3
ii  libcxsparse3.1.2                 1:4.2.1-3
ii  libfftw3-double3                 3.3.3-7
ii  libfftw3-single3                 3.3.3-7
ii  libfltk-gl1.3                    1.3.2-4
ii  libfltk1.3                       1.3.2-4
ii  libfontconfig1                   2.11.0-5
ii  libfreetype6                     2.5.2-1
ii  libgcc1                          1:4.8.2-18
ii  libgl1-mesa-glx [libgl1]         10.1.0-5
ii  libglpk36                        4.53-2
ii  libglu1-mesa [libglu1]           9.0.0-2
ii  libgomp1                         4.8.2-18
ii  libgraphicsmagick++3             1.3.18-1
ii  libgraphicsmagick3               1.3.18-1
ii  liblapack3 [liblapack.so.3]      3.5.0-2
ii  liboctave2                       3.8.1-1+b1
ii  libqhull6                        2012.1-4
ii  libqrupdate1                     1.1.2-1
ii  libqscintilla2-11                2.8.1-1
ii  libqt4-network                   4:4.8.5+git242-g0315971+dfsg-2
ii  libqtcore4                       4:4.8.5+git242-g0315971+dfsg-2
ii  libqtgui4                        4:4.8.5+git242-g0315971+dfsg-2
ii  libstdc++6                       4.8.2-18
ii  libumfpack5.6.2                  1:4.2.1-3
ii  libx11-6                         2:1.6.2-1
ii  octave-common                    3.8.1-1
ii  texinfo                          5.2.0.dfsg.1-2

Versions of packages octave recommends:
ii  gnuplot-x11     4.6.5-1
ii  libatlas3-base  3.10.1-4
ii  pstoedit        3.62-1

Versions of packages octave suggests:
pn  octave-doc      <none>
pn  octave-htmldoc  <none>
pn  octave-info     <none>

-- no debconf information



More information about the Pkg-octave-devel mailing list