octave-cli crashed with SIGSEGV in llvm::TargetRegistry::lookupTarget()

Bug #1293876 reported by Ravi Kumar Arya
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
octave (Debian)
Fix Released
Unknown
octave (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Octave crashes while plotting.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: octave 3.8.0-5ubuntu5
ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
Uname: Linux 3.13.0-17-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Mon Mar 17 20:17:28 2014
Disassembly: => 0x0: Cannot access memory at address 0x0
ExecutablePath: /usr/bin/octave-cli
InstallationDate: Installed on 2014-02-15 (31 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
ProcCmdline: octave-cli
SegvAnalysis:
 Segfault happened at: 0x0: Cannot access memory at address 0x0
 PC (0x00000000) not located in a known VMA region (needed executable region)!
SegvReason: executing NULL VMA
Signal: 11
SourcePackage: octave
StacktraceTop:
 ?? ()
 llvm::TargetRegistry::lookupTarget(std::string const&, std::string&) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.3.so.1
 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
 lp_build_create_jit_compiler_for_module () from /usr/lib/x86_64-linux-gnu/libgallium.so.0
 gallivm_create () from /usr/lib/x86_64-linux-gnu/libgallium.so.0
Title: octave-cli crashed with SIGSEGV in llvm::TargetRegistry::lookupTarget()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
Ravi Kumar Arya (raviarya) wrote :
information type: Private → Private Security
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ?? ()
 llvm::TargetRegistry::lookupTarget (TT=..., Error=...) at /build/buildd/llvm-toolchain-3.3-3.3/lib/Support/TargetRegistry.cpp:77
 llvm::EngineBuilder::selectTarget (this=0x7fff8d4f1810, TargetTriple=..., MArch=..., MCPU=..., MAttrs=...) at /build/buildd/llvm-toolchain-3.3-3.3/lib/ExecutionEngine/TargetSelect.cpp:74
 lp_build_create_jit_compiler_for_module (OutJIT=OutJIT@entry=0x280fc98, M=0x281a460, OptLevel=OptLevel@entry=2, useMCJIT=useMCJIT@entry=0, OutError=OutError@entry=0x7fff8d4f1918) at ../../../../../src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:329
 init_gallivm_engine (gallivm=0x280fc90) at ../../../../../src/gallium/auxiliary/gallivm/lp_bld_init.c:267

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in octave (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private Security → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in octave (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike Miller (mtmiller) wrote :

As noted in #1294116, this crash occurs when plotting using the fltk plotting toolkit, which is now the default with Octave 3.8. Plotting with fltk requires an X environment with working OpenGL support, for some definition of "working". A sufficient workaround for this crash is to use the gnuplot toolkit instead, which was the default in previous versions of Octave.

This can be achieved by issuing the command

  graphics_toolkit gnuplot

at the Octave prompt. This can also be added to ~/.octaverc to make this preference effective every time Octave is started.

I have been able to reproduce this bug in a 14.04 beta VM running Unity.

Revision history for this message
Mike Miller (mtmiller) wrote :

I've investigated this crash further, and I think it may be due to Octave linking against LLVM 3.3 while the Mesa software direct rendering drivers are linked against LLVM 3.4. A locally-built Octave without the experimental JIT (not linked to LLVM) does not crash in the same way.

In addition to using gnuplot, another workaround that works for me is to disable direct rendering:

  $ export LIBGL_ALWAYS_INDIRECT=y
  $ octave
  octave:1> plot (...

Changed in octave (Debian):
status: Unknown → New
Changed in octave (Debian):
status: New → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Sponsored for Trusty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package octave - 3.8.0-5ubuntu6

---------------
octave (3.8.0-5ubuntu6) trusty; urgency=medium

  * Disable JIT on all archs to fix LLVM library conflicts. (LP: #1293876)
 -- Mike Miller <email address hidden> Mon, 07 Apr 2014 11:19:12 -0500

Changed in octave (Ubuntu):
status: Confirmed → Fix Released
Changed in octave (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.