totem crashed with SIGTRAP in __glXSendError() from MakeContextCurrent()

Bug #1758287 reported by dinamic on 2018-03-23
48
This bug affects 5 people
Affects Status Importance Assigned to Milestone
GStreamer
Fix Released
Unknown
gstreamer-vaapi (Ubuntu)
Undecided
Unassigned
mesa (Ubuntu)
Undecided
Unassigned
totem (Ubuntu)
Medium
Unassigned

Bug Description

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/153 DUPLICATE OF:
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/143

https://bugs.freedesktop.org/show_bug.cgi?id=110452 (RESOLVED NOTOURBUG)
https://errors.ubuntu.com/problem/c7d8b2eb8ea371781ada6f2182d6926557d2fa91

---

Backtrace goes through:

totem -> clutter-gst (frame update) -> cogl (pipeline free) -> gstreamer (buffer free) -> gstreamer-vaapi (destroy objects) -> Nvidia libglvd (CommonMakeCurrent / InternalMakeCurrentVendor) -> Mesa GLX (MakeContextCurrent) -> Xlib (XError)

Ubuntu bug doesn't say anything about what's the use-case / when this happens and whether it's reproducible (is it e.g. timing related), it seems just some random crash that Apport collects.

In the backtrace Mesa MakeContextCurrent() calls __glXSendError() to tell that it was given invalid/bad context. Corresponding Mesa code:
---------------------------
   if (gc) {
      /* Attempt to bind the context. We do this before mucking with
       * gc and __glXSetCurrentContext to properly handle our state in
       * case of an error.
       *
       * If an error occurs, set the Null context since we've already
       * blown away our old context. The caller is responsible for
       * figuring out how to handle setting a valid context.
       */
      if (gc->vtable->bind(gc, oldGC, draw, read) != Success) {
         __glXSetCurrentContextNull();
         __glXUnlock();
         __glXSendError(dpy, GLXBadContext, None, X_GLXMakeContextCurrent,
                        False);
         return GL_FALSE;
      }
---------------------------

I.e. bug is in what is given to Mesa, not what Mesa does.

-> NOTOURBUG

To me it looks something that could happen when Totem is exiting, gst-vaapi is trying to use resources that have already been freed, and X catching that when Gstreamer gstvaapitexture_glx.c::destroy_objects() ask libglvnd to do CommonMakeCurrent().

ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: totem 3.26.0-0ubuntu5
ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 23 11:26:51 2018
ExecutablePath: /usr/bin/totem
InstallationDate: Installed on 2017-05-04 (323 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170503)
ProcCmdline: /usr/bin/totem --gapplication-service
Signal: 5
SourcePackage: totem
StacktraceTop:
 ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libGLX.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libGLX.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
Title: totem crashed with signal 5
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

dinamic (dinamic6661) wrote :

StacktraceTop:
 __glXSendError (dpy=dpy@entry=0x56326c2d49e0, errorCode=errorCode@entry=0 '\000', resourceID=resourceID@entry=0, minorCode=minorCode@entry=26, coreX11error=coreX11error@entry=false) at ../../../src/glx/glx_error.c:62
 MakeContextCurrent (dpy=0x56326c2d49e0, draw=39845959, read=39845959, gc_user=0x56326d414050) at ../../../src/glx/glxcurrent.c:216
 InternalMakeCurrentVendor (dpy=dpy@entry=0x56326c2d49e0, draw=draw@entry=39845959, read=read@entry=39845959, ctxInfo=ctxInfo@entry=0x56326d3f6910, callerOpcode=<optimized out>, threadState=threadState@entry=0x56326c6aee90, vendor=0x56326c479200) at ../../../src/GLX/libglx.c:823
 CommonMakeCurrent (dpy=0x56326c2d49e0, draw=39845959, read=39845959, context=<optimized out>, callerOpcode=<optimized out>) at ../../../src/GLX/libglx.c:1005
 destroy_objects (texture=0x56326c71fed0) at ../../../../gst-libs/gst/vaapi/gstvaapitexture_glx.c:87

Changed in totem (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
summary: - totem crashed with signal 5
+ totem crashed with SIGTRAP in __glXSendError() from MakeContextCurrent()
information type: Private → Public
Launchpad Janitor (janitor) wrote :

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

Changed in totem (Ubuntu):
status: New → Confirmed
tags: added: cosmic
tags: added: disco
Download full text (22.2 KiB)

Open bug in launchpad.net
https://bugs.launchpad.net/bugs/1758287

"totem crashed with signal 5"

BackTrace:
#0 _g_log_abort (breakpoint=breakpoint@entry=1) at ../../../../glib/gmessages.c:583
        debugger_present = 1
#1 0x00007f07050f8571 in g_log_writer_default (log_level=6, log_level@entry=G_LOG_LEVEL_ERROR, fields=fields@entry=0x7fff141276e0, n_fields=n_fields@entry=6, user_data=user_data@entry=0x0) at ../../../../glib/gmessages.c:2735
        __func__ = "g_log_writer_default"
#2 0x00007f07050f67de in g_log_structured_array (log_level=G_LOG_LEVEL_ERROR, fields=0x7fff141276e0, n_fields=6) at ../../../../glib/gmessages.c:1970
        writer_func = 0x7f07050f8400 <g_log_writer_default>
        writer_user_data = 0x0
        recursion = 0
        depth = <optimized out>
        n_fields = 6
        log_level = G_LOG_LEVEL_ERROR
        writer_user_data = <optimized out>
        depth = <optimized out>
        fields = 0x7fff141276e0
        writer_func = <optimized out>
        recursion = <optimized out>
        _g_boolean_var_ = <optimized out>
        writer_func = <optimized out>
        writer_user_data = <optimized out>
        recursion = <optimized out>
        depth = <optimized out>
        _g_boolean_var_ = <optimized out>
#3 0x00007f07050f722e in g_log_structured_standard (log_domain=log_domain@entry=0x7f070236b28e "Gdk", log_level=log_level@entry=G_LOG_LEVEL_ERROR, file=file@entry=0x7f0702389a78 "../../../../../gdk/x11/gdkdisplay-x11.c", line=line@entry=0x7f07023894cf "2766", func=func@entry=0x7f070238a190 <__func__.74387> "_gdk_x11_display_error_event", message_format=message_format@entry=0x7f070238a50b "%s") at ../../../../glib/gmessages.c:2027
        fields = {{key = 0x7f0705142464 "PRIORITY", value = 0x7f07051422f9, length = -1}, {key = 0x7f070514246d "CODE_FILE", value = 0x7f0702389a78, length = -1}, {key = 0x7f0705142477 "CODE_LINE", value = 0x7f07023894cf, length = -1}, {key = 0x7f0705142481 "CODE_FUNC", value = 0x7f070238a190 <__func__.74387>, length = -1}, {key = 0x7f0705142451 "MESSAGE", value = 0x56326c71ad30, length = -1}, {key = 0x7f07051424be "GLIB_DOMAIN", value = 0x7f070236b28e, length = -1}}
        n_fields = <optimized out>
        message_allocated = 0x56326c71ad30 "The program 'totem' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'GLXBadContext'.\n (Details: serial 53257 error_code 169 request_code 155 (GLX) minor_"...
        buffer = "vec2 UV)\n{\n vec\377\377\377\377\000\000\000\000l_sample0\222\n\005\a\177\000\000\020\272\247\005\a\177\000\000\000XProtoError\000LIB", '\000' <repeats 17 times>, "\200?D", '\000' <repeats 14 times>, "?\303\000\000\000\000(\345[\002\a\177\000\000\240\202;l2V\000\000\251\000\000\000\000\000\000\000`|\022\024\377\177\000\000\032\000\000\000\000\000\000\000\233\000\000\000\000\000\000\000\303>\211\005\a\177\000\000\005", '\000' <repeats 23 times>, "\060\222\n\005\a\177\000\000\060|\022\024\377\177\000\000"...
        args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fff14127c58, reg_save_area = 0x7fff14127b80}}
#4 0x00007f070232de31 in _gdk_x11_display_error_event (display=display@entry=0x56326c2e3110, e...

description: updated
description: updated

Which exact Mesa/GLX version has this been tested with?

Changed in mesa:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in mesa (Ubuntu):
status: New → Invalid
description: updated
description: updated
no longer affects: gstreamer (Ubuntu)
Changed in totem (Ubuntu):
status: Confirmed → Invalid
Changed in gstreamer:
status: Unknown → New
no longer affects: mesa
El jinete sin cabeza (ejsc) wrote :
description: updated
no longer affects: gstreamer
description: updated
affects: totem → gstreamer
Changed in gstreamer:
status: Unknown → Fix Released
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.