Bug 90667 - coredump crash - reason unclear
Summary: coredump crash - reason unclear
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/glamor (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: highest blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 90299 90941 91923 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-26 19:18 UTC by m.kaffanke
Modified: 2018-06-12 15:43 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
backtrace of the crash (4.23 KB, text/plain)
2015-05-26 19:18 UTC, m.kaffanke
no flags Details
Xorg.0.log - the xorg logfile (44.48 KB, text/plain)
2015-05-26 19:19 UTC, m.kaffanke
no flags Details
.xsession-errors (4.77 KB, text/plain)
2015-05-26 19:19 UTC, m.kaffanke
no flags Details
emacs core dump (14.27 KB, text/plain)
2015-05-28 19:00 UTC, m.kaffanke
no flags Details
Xorg log (71.87 KB, text/plain)
2015-05-30 12:38 UTC, André
no flags Details
gdb backtrace (2.31 KB, text/plain)
2015-05-30 12:39 UTC, André
no flags Details
rc.lua for my awesome windowmanager (18.09 KB, text/plain)
2015-06-02 10:31 UTC, m.kaffanke
no flags Details
GDB output emacs (4.61 KB, text/plain)
2015-06-21 10:33 UTC, André
no flags Details
GDB output git gui (5.03 KB, text/plain)
2015-06-21 10:34 UTC, André
no flags Details
GDB output LibreOffice (4.97 KB, text/plain)
2015-06-21 10:34 UTC, André
no flags Details
Valgrind output from Xorg (4.51 KB, text/plain)
2015-06-22 10:15 UTC, André
no flags Details
GDB output LibreOffice (41.74 KB, text/plain)
2015-06-22 10:16 UTC, André
no flags Details
GDB output git gui (41.74 KB, text/plain)
2015-06-22 10:16 UTC, André
no flags Details
Assert that glMapBuffer returns non-NULL (469 bytes, patch)
2015-06-23 08:40 UTC, Michel Dänzer
no flags Details | Splinter Review
X server patch to make current in some fallback paths (1.06 KB, patch)
2015-07-15 07:57 UTC, Dave Airlie
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description m.kaffanke 2015-05-26 19:18:36 UTC
Created attachment 116056 [details]
backtrace of the crash

Hello there,

I hope you can help me.

I have the same crash backtrace again and again but from different reasons.  Sometimes its emacs, than its libreoffice, but it can also be chromium browser or firefox.  Mostly - I'm not sure its when i resize the windows - but that is just a guess, because it does not happen systematically from my point of view.  (its the same with awesome windowmanager or enlightenment)

It just coredumps....

I will add the core dump and also the X log file and the .xsession-error (which differs a bit)
Comment 1 m.kaffanke 2015-05-26 19:19:17 UTC
Created attachment 116058 [details]
Xorg.0.log - the xorg logfile
Comment 2 m.kaffanke 2015-05-26 19:19:55 UTC
Created attachment 116059 [details]
.xsession-errors
Comment 3 m.kaffanke 2015-05-26 19:20:35 UTC
Please help me soon, I will try also patches for you...

Thanks very much.
Comment 4 m.kaffanke 2015-05-28 18:59:52 UTC
As I mentioned allready, the bug comes from different applications, because I work most with emacs, so I will give you the emacs core dump too, maybe you can help me now... :(
Comment 5 m.kaffanke 2015-05-28 19:00:47 UTC
Created attachment 116125 [details]
emacs core dump

But I think emacs core dumps just because of the xorg coredump which comes first.
Comment 6 André 2015-05-30 12:38:48 UTC
Created attachment 116170 [details]
Xorg log
Comment 7 André 2015-05-30 12:39:16 UTC
Created attachment 116171 [details]
gdb backtrace
Comment 8 André 2015-05-30 12:40:04 UTC
I have the same problem. It seems to mostly happen when I resize frames in certain programs. 

I can more or less reproduce it by resizing the frames in 'git gui' but it also occurs in LibreOffice and Emacs.

I'm running on an Intel i5-2500k and use a Radeon R9 290 graphics card with xf86-video-radeon.

I added my own log file and backtraces.
Comment 9 Michel Dänzer 2015-06-01 07:14:32 UTC
(In reply to André from comment #8)
> I can more or less reproduce it by resizing the frames in 'git gui' but it
> also occurs in LibreOffice and Emacs.

Which window manager(s) does it happen with for you?

Do you guys use any special window manager configuration, e.g. non-opaque window resizes?
Comment 10 m.kaffanke 2015-06-02 10:31:02 UTC
I also had the Idea about window resizing, until today it also crashed while using mu4e for my mails, just switching from one mail to another.  That worked for 20 emails, but now it crashed with the same Xorg backtrace.

I use awesome windowmanager, and will add my rc.lua for you.  I don't think there are special configurations.

Here is my xorg config:

------  begin .xinitrc ------
#!/bin/bash

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?* ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

exec awesome
------ end .xinitrc -----

------ begin .Xresources ------
! This is a comment placed above some Xft settings
!Xft.dpi:       115      ! this is an inline comment
Xft.dpi:	122
Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintslight
------ end .Xresources ------

having 2 files in my /etc/X11/xinit/xinitrc.d:

------ begin 30-dbus.sh -----
#!/bin/bash

# launches a session dbus instance
if [ -z "${DBUS_SESSION_BUS_ADDRESS-}" ] && type dbus-launch >/dev/null; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
fi
------ end 30-dbus.sh -------
------ begin 40-libcanberra-gtk-module.sh ------
#!/bin/bash

case "${DESKTOP_SESSION-}" in
  gnome) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [[ -z ${GNOME_DESKTOP_SESSION_ID-} ]]; then
      if [[ -z ${GTK_MODULES-} ]]; then
        GTK_MODULES="canberra-gtk-module"
      else
        GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
      fi
      export GTK_MODULES
    fi
  ;;
esac
--------- end 40-libcaberra-gtk-module.sh ------

ok and then i have no xorg.conf in my /etc/X11 directory but a /etc/X11/xorg.conf.d dirctory, having one file:
------ begin 20-tastatur.conf -----
# Deutsches Layout
Section "InputClass"
	Identifier "keyboard"
	MatchIsKeyboard "yes"
	Option "XkbLayout" "de,se"
	Option "XkbVariant" "nodeadkeys"
	Option "XkbOptions" "grp:alt_space_toggle"
EndSection
------- end 20-tastatur.conf ----

I will send my rc.lua via attachment.

Any hints about that configuration?

Thanks,
Martin
Comment 11 m.kaffanke 2015-06-02 10:31:51 UTC
Created attachment 116238 [details]
rc.lua for my awesome windowmanager
Comment 12 m.kaffanke 2015-06-04 19:15:31 UTC
could you tell me where you would start to fix that problem?

I know some C, but I don't know where to start with that problem.  Just tell me your thoughts what you as a developer would try, and I try to test that.

thanks.
Comment 13 Michel Dänzer 2015-06-10 02:39:58 UTC
I've been unable to reproduce the crash with xserver Git master, although I've confirmed I'm hitting the same code path with git gui.

After reproducing the crash with gdb attached, please run the following commands at the gdb prompt and post their output:

frame 2
p *(PixmapPtr)dst
p *(glamor_pixmap_private*)dixLookupPrivate(&((PixmapPtr)dst)->devPrivates, &glamor_pixmap_private_key)
Comment 14 m.kaffanke 2015-06-20 17:47:02 UTC
Hi Michael,

I get:

(gdb) frame 2
#2  0x0000000000598d2e in OsAbort () at utils.c:1342
1342    utils.c: File or direcotry not found.
(gdb) p *(PixmapPtr)dst
No symbol "dst" in current context.
(gdb) p *(glamor_pixmap_private*)dixLookupPrivate(&((PixmapPtr)dst)->devPrivates, &glamor_pixmap_private_key)
No symbol "dst" in current context.

so I think I have to install or do something before doing that?

Thanks,
Martin
Comment 15 André 2015-06-21 10:33:52 UTC
Created attachment 116628 [details]
GDB output emacs
Comment 16 André 2015-06-21 10:34:08 UTC
Created attachment 116629 [details]
GDB output git gui
Comment 17 André 2015-06-21 10:34:25 UTC
Created attachment 116630 [details]
GDB output LibreOffice
Comment 18 André 2015-06-21 10:43:40 UTC
I added three stacktraces from different programs with the output of the commands you have given.

LibreOffice crashes when I add a frame (Insert -> Frame) and then resize it with the handles. Sometimes it takes two or three resize operations before the crash occurs.

git gui crashes when I move the splitter seperating the different parts of the window. It also take several move operations before the crash. It seems that in this case the dst argument for fbBltOne is not 0x0.

Emacs crashes when I resize the window. It occurs less often and I have to resize the window 10 times or so. It has a different stacktrace than the others so I tried to get the right variable for your commands.

If you need any other output or things to try out just tell me.
Comment 19 André 2015-06-21 10:58:31 UTC
I'm running Arch Linx with xfce4.

xfwm4 (4.12.3-1)
xorg-server (1.17.2-1)
xf86-video-ati (1:7.5.0-2)

As mentioned before I have a Radeon R9 290 graphics card with 2 monitors on DVI and one on HDMI. But the crashes occur even if I connect only one monitor.
Comment 20 Michel Dänzer 2015-06-22 01:40:04 UTC
(In reply to André from comment #18)
> I added three stacktraces from different programs with the output of the
> commands you have given.

Thanks. Can you also print *glamor_priv?

So far, the only way I could see this happen is if glMapBuffer() fails.

Or, maybe there's memory corruption going on. Any chance one of you could run Xorg in valgrind, try reproducing a crash and see if valgrind finds anything wrong?
Comment 21 André 2015-06-22 10:15:54 UTC
Created attachment 116650 [details]
Valgrind output from Xorg
Comment 22 André 2015-06-22 10:16:17 UTC
Created attachment 116651 [details]
GDB output LibreOffice
Comment 23 André 2015-06-22 10:16:40 UTC
Created attachment 116652 [details]
GDB output git gui
Comment 24 André 2015-06-22 10:25:44 UTC
I updated the gdb output to include glamor_priv.

I also tried to run valgrind. I've run a bare Xorg without my usual xfce4 environment. I disabled the leak checks because after the crash I got around 40MB of leak output.

Do you have any clue what component could cause the corruption, then I could try to change it.

(In reply to m.kaffanke from comment #10)
> I use awesome windowmanager, and will add my rc.lua for you.  I don't think
> there are special configurations.

What graphics card and driver are you using?
Comment 25 Michel Dänzer 2015-06-23 08:40:39 UTC
Created attachment 116666 [details] [review]
Assert that glMapBuffer returns non-NULL

Thanks for the valgrind output, but unfortunately, it doesn't shed any more light on this mystery for me.

Can you try applying this xserver patch and reproducing the problem with gdb attached to Xorg? Does it fail the added assertion before it crashes?
Comment 26 Michel Dänzer 2015-06-25 08:09:47 UTC
BTW, has one of you tried if this also happens with xserver 1.16.y?
Comment 27 Dave Airlie 2015-07-15 07:57:52 UTC
Created attachment 117133 [details] [review]
X server patch to make current in some fallback paths

this X server patch should fix this.
Comment 28 Michel Dänzer 2015-07-16 00:47:18 UTC
*** Bug 90941 has been marked as a duplicate of this bug. ***
Comment 29 André 2015-07-20 09:05:25 UTC
I'm now running xorg-server-1.17.2-4 on Arch (which includes the patch) and didn't had a crash with the programs I tested.
Comment 30 Michel Dänzer 2015-07-21 03:43:08 UTC
commit db5337afb248edf81087cf8d74006fc496d70589
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jul 15 17:56:11 2015 +1000

    glamor: make current in prepare paths
Comment 31 Michel Dänzer 2015-09-09 02:43:57 UTC
*** Bug 91923 has been marked as a duplicate of this bug. ***
Comment 32 Adam Jackson 2018-06-12 15:43:03 UTC
*** Bug 90299 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.