Scilab does not start after some upgrades on Ubuntu Xenial

Bug #1742894 reported by Norbert on 2018-01-12
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mesa
Confirmed
High
libjogl2-java (Ubuntu)
Undecided
Timo Aaltonen
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned
mesa (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned
scilab (Debian)
Fix Released
Unknown
scilab (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. have installed Scilab on Ubuntu Xenial system
2. install system updates
3. try to launch Scilab from GUI - it does not start
4. try to launch Scilab from terminal - it does not start with the following output in the terminal:

$ scilab
Could not create a Scilab main class. Error:
Exception in thread "main" java.lang.InternalError: XXX0 profile[1]: GL3bc -> profileImpl GL4bc !!! not mapped
 at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071)
 at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1954)
 at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1875)
 at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1842)
 at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80)
 at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216)
 at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297)
 at com.jogamp.opengl.GLProfile.get(GLProfile.java:988)
 at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722)
 at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733)
 at org.scilab.modules.gui.SwingView.<init>(Unknown Source)
 at org.scilab.modules.gui.SwingView.registerSwingView(Unknown Source)
 at org.scilab.modules.core.Scilab.<init>(Unknown Source)

Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

Expected results:
Scilab works normally on Ubuntu 16.04 LTS system.

Actual results:
see error above.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: scilab 5.5.2-2ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-104.127-generic 4.4.98
Uname: Linux 4.4.0-104-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: MATE
Date: Fri Jan 12 12:02:32 2018
PackageArchitecture: all
SourcePackage: scilab
UpgradeStatus: No upgrade log present (probably fresh install)

Norbert (nrbrtx) wrote :
Norbert (nrbrtx) wrote :

According to scilab changelog it does not changed since

scilab (5.5.2-2ubuntu3) xenial; urgency=medium

  * Enable debian/patches/fop-2.0.diff again to avoid a FTBFS
    since fop 2.0 is now in Ubuntu.

 -- Graham Inggs <email address hidden> Wed, 06 Apr 2016 18:32:35 +0200

So it is graphics issue. Possible related to bug 1741447.

Norbert (nrbrtx) wrote :

Installed `vainfo` and `mesa-va-drivers`
`sudo apt-get install mesa-va-drivers vainfo`

Here is my output of `vainfo`:

$ vainfo
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileNone : VAEntrypointVideoProc

$ lspci -knn | grep -A3 VGA
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7480D] [1002:9993]
    Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7480D] [1002:0123]
    Kernel driver in use: radeon
    Kernel modules: radeon

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-109-generic root=UUID=... ro splash quiet vt.handoff=7

$ glxinfo | grep -i 'direct\|vendor\|opengl'
direct rendering: Yes
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
    Vendor: X.Org (0x1002)
OpenGL vendor string: X.Org
OpenGL renderer string: AMD ARUBA (DRM 2.43.0 / 4.4.0-109-generic, LLVM 5.0.0)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 17.2.4
OpenGL core profile shading language version string: 4.10
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_ARB_direct_state_access, GL_ARB_draw_buffers,
    GL_ARB_draw_indirect, GL_ARB_draw_instanced,
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
OpenGL version string: 3.0 Mesa 17.2.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Norbert (nrbrtx) wrote :

Upgrading to HWE does not help.

Timo Aaltonen (tjaalton) wrote :

does it work on artful?

Timo Aaltonen (tjaalton) wrote :

also, you could try ppa:canonical-x/x-staging which has 17.2.8

Timo Aaltonen (tjaalton) wrote :

same bug on Debian, so probably doesn't work in artful either (nor bionic)

Changed in scilab (Debian):
status: Unknown → New
Norbert (nrbrtx) wrote :

Asked question on AskUbuntu (https://askubuntu.com/q/995093/66509).

Fixed by blacklisting `radeon`:

cat <<EOF | sudo tee /etc/modprobe.d/blacklist-radeon.conf
# blacklist radeon module to allow run at least Scilab after Mesa upgrade
blacklist radeon
EOF

sudo update-initramfs -k all -u

Timo Aaltonen (tjaalton) wrote :

that's a bad workaround if your gfx card is radeon..

Timo Aaltonen (tjaalton) wrote :

from https://wiki.scilab.org/Graphical%20issues%20with%20Scilab%205.X

try adding LIBGL_ALWAYS_SOFTWARE=1 in front of the scilab command

Timo Aaltonen (tjaalton) wrote :

this is actually a bug in jogl which seems to be doing stupid string checking to see if the driver is Mesa, and fails now that GL_RENDERER string doesn't have "Gallium" in it (wonder what happens with intel..)

Timo Aaltonen (tjaalton) wrote :

actually that LIBGL_ALWAYS_SOFTWARE=1 won't work either with current mesa

Changed in mesa:
importance: Unknown → High
status: Unknown → Confirmed
Norbert (nrbrtx) on 2018-01-12
no longer affects: scilab
Norbert (nrbrtx) wrote :

I saw this jogl bug (https://jogamp.org/bugzilla/show_bug.cgi?id=1357) today.
Potentially other programs are affected too (https://www.google.ru/search?q=GL3bc+->+profileImpl+GL4bc+!!!+not+mapped+com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java%3A2071)&oq=GL3bc+->+profileImpl+GL4bc+!!!+not+mapped+com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java%3A2071)).

With newest Mesa Scilab works normally on i915 and nvidia_340 drivers.

Timo Aaltonen (tjaalton) wrote :

yes I had a look at the code, it's just radeon and swrast which are busted because they no longer have "Gallium" in the renderer string

Changed in libjogl2-java (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: New → Triaged
Norbert (nrbrtx) wrote :

I do not know about Bionic, it maybe affected too.

I'll be watching this bug-report and re-enable `radeon` driver on my machine after fix.

Thank you for quick reaction, Timo!

Timo Aaltonen (tjaalton) wrote :

Bionic should be affected, but I've pushed a fixed libjogl2-java to Debian now and it'll get synced later. Next will be SRU uploads to artful and xenial.

Changed in scilab (Debian):
status: New → Fix Released
Norbert (nrbrtx) wrote :

My VESA solution is bad, I can't plot anything in Scilab even with LIBGL_ALWAYS_SOFTWARE=1.
SRU is really needed.

Norbert (nrbrtx) wrote :

Downgraded the following packages:

libegl1-mesa_11.2.0-1ubuntu2_amd64.deb
libgbm1_11.2.0-1ubuntu2_amd64.deb
libgl1-mesa-dri_11.2.0-1ubuntu2_amd64.deb
libgl1-mesa-dri_11.2.0-1ubuntu2_i386.deb
libgl1-mesa-glx_11.2.0-1ubuntu2_amd64.deb
libgl1-mesa-glx_11.2.0-1ubuntu2_i386.deb
libglapi-mesa_11.2.0-1ubuntu2_amd64.deb
libglapi-mesa_11.2.0-1ubuntu2_i386.deb
libgles2-mesa_11.2.0-1ubuntu2_amd64.deb
libosmesa6_11.2.0-1ubuntu2_amd64.deb
libosmesa6_11.2.0-1ubuntu2_i386.deb
libwayland-egl1-mesa_11.2.0-1ubuntu2_amd64.deb
mesa-va-drivers_11.2.0-1ubuntu2_amd64.deb
mesa-vdpau-drivers_11.2.0-1ubuntu2_amd64.deb

And pinned them:

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-mesa
Package: libegl1-mesa:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgbm1:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgl1-mesa-dri:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgl1-mesa-dri:i386
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgl1-mesa-glx:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgl1-mesa-glx:i386
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libglapi-mesa:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libglapi-mesa:i386
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libgles2-mesa:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libosmesa6:amd64
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libosmesa6:i386
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: libwayland-egl1-mesa
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: mesa-va-drivers
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

Package: mesa-vdpau-drivers
Pin: version 11.2.0-1ubuntu2
Pin-Priority: 1337

EOF

It is a temporarily fix, which works for me.

Norbert (nrbrtx) wrote :

As we predicted, 17.10 (artful) is affected too - see this AskUbuntu question ( https://askubuntu.com/q/997160/66509 ).

tags: added: artful
Launchpad Janitor (janitor) wrote :

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

Changed in libjogl2-java (Ubuntu Artful):
status: New → Confirmed
Changed in libjogl2-java (Ubuntu Xenial):
status: New → Confirmed
Changed in mesa (Ubuntu Artful):
status: New → Confirmed
Changed in mesa (Ubuntu Xenial):
status: New → Confirmed
Changed in mesa (Ubuntu):
status: New → Confirmed
Changed in scilab (Ubuntu Artful):
status: New → Confirmed
Changed in scilab (Ubuntu Xenial):
status: New → Confirmed
Changed in scilab (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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