Jump to content

KSP causes crashes in gnome 3


Recommended Posts

Hi,

since 1.1 I've experienced frequent issues starting KSP (both x86 and x64). I use debian 8 w/ gnome 3. KSP was initially installed through steam. Attached is an exerpt of a load from the syslog of the machine. There are two important things to note: 1) while the syslog says gnome-shell, I believe it's actually ksp running inside gnome. I often start KSP from a terminal for more output, and 2) KSP typically doesn't crash in this situation until the gnome session is completely terminated. From a user standpoint, ksp creates it's window and either before the loading screen appears or sometime during loading everything will flicker, the gnome borders will disappear and the screen will be replaced with a message saying that something had gone wrong in gnome and the session must be exited. No further user input can be made except to accept and destroy the session.

This affects both modded & unmodded installs. It affects KSP when running from steam, or started without steam running. I experience the same issue with a single monitor and with two monitors.

 

Has anyone else experienced similar issues, and if so, has anybody found work arounds or solutions?

 

gpu: 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

cpu: i7-3720qm @ 2.6ghz

ram: 8gb system ram

 

Spoiler

Sep  9 18:54:38 xyz gnome-session[30006]: (gnome-shell:30151): Gdk-WARNING **: Native children wider or taller than 65535 pixels are not supported
Sep  9 18:54:38 xyz kernel: [447129.889252] traps: gnome-shell[30151] trap int3 ip:7f364f181d30 sp:7ffd211631c0 error:0
Sep  9 18:54:38 xyz gnome-session[30006]: (gnome-shell:30151): Gdk-ERROR **: The program 'gnome-shell' received an X Window System error.
Sep  9 18:54:38 xyz gnome-session[30006]: This probably reflects a bug in the program.
Sep  9 18:54:38 xyz gnome-session[30006]: The error was 'BadAlloc (insufficient resources for operation)'.
Sep  9 18:54:38 xyz gnome-session[30006]: (Details: serial 4035 error_code 11 request_code 12 (core protocol) minor_code 0)
Sep  9 18:54:38 xyz gnome-session[30006]: (Note to programmers: normally, X errors are reported asynchronously;
Sep  9 18:54:38 xyz gnome-session[30006]: that is, you will receive the error a while after causing it.
Sep  9 18:54:38 xyz gnome-session[30006]: To debug your program, run it with the GDK_SYNCHRONIZE environment
Sep  9 18:54:38 xyz gnome-session[30006]: variable to change this behavior. You can then get a meaningful
Sep  9 18:54:38 xyz gnome-session[30006]: backtrace from your debugger if you break on the gdk_x_error() function.)
Sep  9 18:54:38 xyz gnome-session[30006]: (gnome-settings-daemon:30078): GnomeDesktop-WARNING **: Failed to acquire idle monitor object manager: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did 
Sep  9 18:54:38 xyz gnome-session[30006]: (gnome-settings-daemon:30078): GnomeDesktop-WARNING **: Failed to acquire idle monitor object manager: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did 
Sep  9 18:54:38 xyz x-session-manager[30006]: WARNING: Application 'gnome-shell.desktop' killed by signal 5
Sep  9 18:54:38 xyz gnome-session[30006]: x-session-manager[30006]: WARNING: Application 'gnome-shell.desktop' killed by signal 5
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE)
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) Backtrace:
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 0: /usr/bin/Xorg (xorg_backtrace+0x56) [0x7f9bda3d7d46]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 1: /usr/bin/Xorg (mieqEnqueue+0x24b) [0x7f9bda3b8c9b]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 2: /usr/bin/Xorg (QueuePointerEvents+0x52) [0x7f9bda28fe12]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f9bd258d000+0x609a) [0x7f9bd259309a]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f9bd258d000+0x655d) [0x7f9bd259355d]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 5: /usr/bin/Xorg (0x7f9bda221000+0x95918) [0x7f9bda2b6918]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 6: /usr/bin/Xorg (0x7f9bda221000+0xbfbe9) [0x7f9bda2e0be9]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7f9bd7f13000+0x350e0) [0x7f9bd7f480e0]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 8: /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x7f9bd9020000+0x72f0b) [0x7f9bd9092f0b]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 9: /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x7f9bd9020000+0x5995b) [0x7f9bd907995b]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 10: /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (pixman_fill+0x29) [0x7f9bd902b869]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 11: /usr/lib/xorg/modules/libfb.so (fbFill+0x2ba) [0x7f9bd36cee4a]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 12: /usr/lib/xorg/modules/libfb.so (fbPolyFillRect+0x1a0) [0x7f9bd36cf6d0]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 13: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7f9bd431e000+0x111bb1) [0x7f9bd442fbb1]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 14: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7f9bd431e000+0x10b920) [0x7f9bd4429920]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 15: /usr/bin/Xorg (0x7f9bda221000+0x13e725) [0x7f9bda35f725]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 16: /usr/bin/Xorg (miPaintWindow+0x1fc) [0x7f9bda3b992c]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 17: /usr/bin/Xorg (miWindowExposures+0x18f) [0x7f9bda3ba22f]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 18: /usr/bin/Xorg (0x7f9bda221000+0xb05d6) [0x7f9bda2d15d6]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 19: /usr/bin/Xorg (miHandleValidateExposures+0x68) [0x7f9bda3cfef8]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 20: /usr/bin/Xorg (0x7f9bda221000+0xe87e2) [0x7f9bda3097e2]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 21: /usr/bin/Xorg (0x7f9bda221000+0xe9844) [0x7f9bda30a844]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 22: /usr/bin/Xorg (0x7f9bda221000+0xe4a09) [0x7f9bda305a09]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 23: /usr/bin/Xorg (0x7f9bda221000+0x7a512) [0x7f9bda29b512]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 24: /usr/bin/Xorg (FreeClientResources+0x6c) [0x7f9bda29c5ec]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 25: /usr/bin/Xorg (CloseDownClient+0x70) [0x7f9bda2778c0]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 26: /usr/bin/Xorg (0x7f9bda221000+0x5742e) [0x7f9bda27842e]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 27: /usr/bin/Xorg (0x7f9bda221000+0x5b596) [0x7f9bda27c596]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 28: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) 
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) 29: /usr/bin/Xorg (0x7f9bda221000+0x4590e) [0x7f9bda26690e]
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE)
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (EE) [mi] mieq is *NOT* the cause.  It is a victim.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: [mi] Increasing EQ size to 1024 to prevent dropped events.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: [mi] EQ processing has resumed after 49 dropped events.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: [mi] This may be caused my a misbehaving driver monopolizing the server's resources.
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (II) intel(0): EDID vendor "LGD", prod id 489
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (II) intel(0): Printing DDC gathered Modelines:
Sep  9 18:54:40 xyz gdm-Xorg-:0[29898]: (II) intel(0): Modeline "1920x1080"x0.0  138.50  1920 1968 2000 2080  1080 1083 1088 1111 -hsync -vsync (66.6 kHz eP)
Sep  9 18:54:42 xyz gnome-session[30006]: current session already has an ibus-daemon.
Sep  9 18:54:43 xyz dbus[715]: [system] Activating via systemd: service name='org.freedesktop.GeoClue2' unit='geoclue.service'
Sep  9 18:54:43 xyz dbus[715]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Sep  9 18:54:43 xyz gnome-session[30006]: (gnome-shell:30431): Gdk-WARNING **: Native children wider or taller than 65535 pixels are not supported
Sep  9 18:54:44 xyz gdm-Xorg-:0[29898]: (II) intel(0): EDID vendor "LGD", prod id 489
Sep  9 18:54:44 xyz gdm-Xorg-:0[29898]: (II) intel(0): Printing DDC gathered Modelines:
Sep  9 18:54:44 xyz gdm-Xorg-:0[29898]: (II) intel(0): Modeline "1920x1080"x0.0  138.50  1920 1968 2000 2080  1080 1083 1088 1111 -hsync -vsync (66.6 kHz eP)
Sep  9 18:54:44 xyz gnome-session[30006]: (gnome-shell:30431): Gdk-WARNING **: Native children wider or taller than 65535 pixels are not supported
Sep  9 18:54:44 xyz gnome-session[30006]: (gnome-shell:30431): Gdk-ERROR **: The program 'gnome-shell' received an X Window System error.
Sep  9 18:54:44 xyz gnome-session[30006]: This probably reflects a bug in the program.
Sep  9 18:54:44 xyz gnome-session[30006]: The error was 'BadAlloc (insufficient resources for operation)'.
Sep  9 18:54:44 xyz gnome-session[30006]: (Details: serial 945 error_code 11 request_code 12 (core protocol) minor_code 0)
Sep  9 18:54:44 xyz gnome-session[30006]: (Note to programmers: normally, X errors are reported asynchronously;
Sep  9 18:54:44 xyz gnome-session[30006]: that is, you will receive the error a while after causing it.
Sep  9 18:54:44 xyz gnome-session[30006]: To debug your program, run it with the GDK_SYNCHRONIZE environment
Sep  9 18:54:44 xyz gnome-session[30006]: variable to change this behavior. You can then get a meaningful
Sep  9 18:54:44 xyz gnome-session[30006]: backtrace from your debugger if you break on the gdk_x_error() function.)
Sep  9 18:54:44 xyz kernel: [447136.076256] traps: gnome-shell[30431] trap int3 ip:7f4ebe38cd30 sp:7ffe60428970 error:0
Sep  9 18:54:44 xyz x-session-manager[30006]: WARNING: Application 'gnome-shell.desktop' killed by signal 5
Sep  9 18:54:44 xyz x-session-manager[30006]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Sep  9 18:54:44 xyz gnome-session[30006]: x-session-manager[30006]: WARNING: Application 'gnome-shell.desktop' killed by signal 5
Sep  9 18:54:44 xyz gnome-session[30006]: x-session-manager[30006]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Sep  9 18:54:44 xyz x-session-manager[30006]: Unrecoverable failure in required component gnome-shell.desktop
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
(repeats alot)
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
Sep  9 18:54:50 xyz gdm-Xorg-:0[29898]: (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?
 

 

Link to comment
Share on other sites

Hi @viashimo, the version of the Unity3D engine that was used for 1.1.3 is buggy on Linux, particularly with Intel and AMD gpu's, this should be fixed in later versions of Unity3D and Squad have always tried to keep pace with Unity3D versions with each release of KSP.

There are a number of possible workarounds but this is most likely what you need.

 

"Gnome/UnityDE/IceWM/lxde/Xserver crashes when I start/change resolution in KSP!" (New for 1.1)

This seems to be OOM killer killing Xorg, try this fix by @Psycho_zs

On 27/04/2016 at 2:45 AM, Psycho_zs said:

My two cents:

Sometimes KSP managed to freeze and crash my X server upon start. This happens because of some rare instant memory leak, so Xorg gets killed by OOM killer. To give it some other target (KSP), I've added a line to my launcher script before KSP exec, like so:


sh -c 'sleep 1 ; echo 15 > "/proc/$(pgrep KSP.x86_64)/oom_adj"' &
exec ./KSP.x86_64 ...

This should make KSP a priority target for OOM killer. Funny thing, no such freak leak happened ever since, so I do not yet know if this can really help X to walk away from it in working order.

 

Link to comment
Share on other sites

@sal_vager, thanks for the reply. Mea culpa for not looking more on the forums before asking.

 

Unfortunately the oom killer doesn't help reduce the frequency of crashes. I generally get 1/6 attemps or so to start without crashing. I'll see if I can graph out memory usage to validate whether or not that is actually happening in my case.

Link to comment
Share on other sites

Okay, other things you can try are staring KSP with the command line arguments:

-force-glcore

-force-gfx-direct

These can be added to the 'Set launch options' box in Steam.

Another thing that might work is lowering the resolution width and height manually by 1 (one) pixel, to do this you need to edit the settings.cfg

It may also be worth knowing that this issue doesn't happen with the xfce desktop.

Link to comment
Share on other sites

From a couple of runs it looks like memory is the issue. The available system memory dries up quickly, swap increases, then everything is killed.

After looking at https://linux-mm.org/OOM_Killer if a nice value is set on the process it will automatically double it's badness, so "nice -n  1 ./KSP.x86_86" seems like a good idea to begin with. I can't find a clean way to set a processes oomkilladj value immediately when starting it (maybe there's an environment variable somewhere?). However, I'm not entirely sure that it's oom-killer itself that destroys the parent process in my case. It seems that there would normally be a mention that oom-killer was invoked on a process in kern.log.

At this point, 1.2 is coming soon (tm), so I may just wait for that. I'm not particularly enthused to switch desktop environments. If I get reliable starts with nice, I'll post again here. I have seen this affect other unity based games I have, so it makes sense that it's more an underlying unity issue than something specific to KSP. @sal_vager thanks for the extra suggestions too.

Link to comment
Share on other sites

In the 1.2 prereleases this is still happening regularly regularly. The following start seems to reduce but not eliminate the gnome crashes on ksp start:

GDK_SYNCHRONIZE=1 nice -n 1 ./KSP.x86_64 -force-glcore -force-gfx-direct

It would be good to see a proper fix for this (either in ksp or in unity, or both): gnome is one of the more widely used window managers.

Link to comment
Share on other sites

@viashimo, no I don't have a link to a Unity issue that deals directly with this, as far as I can see the issue might have been posted but the quality of the bug reports on the Unity tracker are extremely low, and are lacking in detail or supportive files, also almost all the reports have no response from Unity, just "me too" comments from other developers.

There's already an issue on the Squad tracker here, it's definitely a problem between Unity and the users WM though, as this doesn't occur with all window managers and doesn't require any KSP code or assets to trigger.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...