Jump to content

Segfault closing KSP; system halt after a few minutes


Recommended Posts

fyi, unmodded KSP 1.3 64 on linux debian 9, last logfile-entries (verbose logging):

Spoiler

[LOG 09:33:14.500] [HighLogic]: =========================== Scene Change : From SPACECENTER to MAINMENU (Async) =====================
[LOG 09:33:14.501] [UIMasterController]: ShowUI
[LOG 09:33:14.501] Game Unpaused!
[LOG 09:33:14.624] [UIApp] OnDestroy: ContractsApp
[LOG 09:33:14.625] [UIApp] OnDestroy: KSPedia
[LOG 09:33:14.635] [UIMasterController]: HideUI
[LOG 09:33:15.143] [UIMasterController]: ShowUI
[LOG 09:33:15.309] [ScenarioUpgradeables]: Back to Main Menu. Clearing persistent data.
[LOG 09:33:15.309] [ApplicationLauncher] OnSceneLoadedGUIReady: scene MAINMENU ShouldBeVisible() True ShouldBeOnTop() True iIsPositionedAtTop False
[LOG 09:33:15.309] [ApplicationLauncher] SpawnSimpleLayout: VerticalTopDown
[LOG 09:33:15.310] [ApplicationLauncher] SetHidden:
[LOG 09:33:15.312] [MessageSystem] Reposition 0.02 7645
[LOG 09:33:19.900] [UIApp] OnDestroy: MessageSystem

 

Happens even without loading the game after when i just start and quit directly from the loading menu:

Spoiler

[LOG 09:38:49.394] [HighLogic]: =========================== Scene Change : From LOADING to MAINMENU =====================
[LOG 09:38:49.560] [UIMasterController]: ShowUI
[LOG 09:38:49.738] [GameParameters]: Loaded custom parameter class CommNetParams.
[LOG 09:38:49.738] [GameParameters]: Loaded custom parameter class AdvancedParams.
[LOG 09:38:49.763] [ApplicationLauncher] Awake False
[LOG 09:38:49.764] [ApplicationLauncher] SpawnSimpleLayout: VerticalTopDown
[LOG 09:38:49.771] [UiApp] Awake: MessageSystem
[LOG 09:38:49.771] [ApplicationLauncher] OnSceneLoadedGUIReady: scene MAINMENU ShouldBeVisible() True ShouldBeOnTop() True iIsPositionedAtTop True
[LOG 09:38:49.786] [UIApp] Adding MessageSystem to Application Launcher
[LOG 09:38:49.788] [ApplicationLauncher] SetHidden:
[LOG 09:38:49.794] [MessageSystem] OnAppInitialized
[LOG 09:38:49.794] [MessageSystem] Reposition 0.03809502 6779
[LOG 09:38:52.738] [UIApp] OnDestroy: MessageSystem

 

The last few lines of gdb output:

Spoiler

 

Thread 3 "KSP.x86_64" received signal SIGPWR, Power fail/restart.
0x00007ffff79c7536 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0,
    futex_word=0x7ffff36a3070) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
205    ../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
(gdb)
Continuing.

Thread 3 "KSP.x86_64" received signal SIGXCPU, CPU time limit exceeded.
0x00007ffff61c23a6 in __GI___sigsuspend (set=0x7ffff36a5900)
    at ../sysdeps/unix/sysv/linux/sigsuspend.c:30
30    ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
(gdb)
Continuing.
[Thread 0x7ffff2ad6700 (LWP 3642) exited]
[Thread 0x7ffff7ff1700 (LWP 3641) exited]
[Thread 0x7ffff28d5700 (LWP 3643) exited]

Thread 1 "KSP.x86_64" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fd3740 (LWP 3637)]
0x0000000000f2dd3d in ?? ()
(gdb)
Continuing.
Couldn't get registers: No such process.
Couldn't get registers: No such process.
Couldn't get registers: No such process.
(gdb)
Continuing.
Couldn't get registers: No such process.
(gdb) [Thread 0x7ffff0881700 (LWP 3644) exited]

Cannot execute this command without a live selected thread.
(gdb)
Cannot execute this command without a live selected thread.
(gdb)
Cannot execute this command without a live selected thread.
(gdb)
Cannot execute this command without a live selected thread.
(gdb)
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
Quit
(gdb)

 

 

Edited by Green Baron
Link to comment
Share on other sites

Program received signal SIGSEGV, Segmentation fault.
0x0000000000011816 in ?? ()
(gdb) bt
#0  0x0000000000011816 in ?? ()
#1  0x00007fff405435de in setLanguage () from /home/stasikos/Soft/KSP/KSP_1.3/KSP_Data/Plugins/x86_64/liblingoona.grammar.kerbal.so
#2  0x00000000402415ed in ?? ()
#3  0x00007fffffffc1e0 in ?? ()
#4  0x0000000001fe00e0 in ?? ()
#5  0x0000000000000000 in ?? ()
(gdb)


Do you have such backtrace too (bt command)? If so, I have same issue probably :) On Ubuntu 14.04 x86_64 with gcc-4.9 (to get that lingoona loading)

Link to comment
Share on other sites

If you want a really quick and dirty fix for that, you can rename KSP_Data/Plugins/x86_64/liblingoona.grammar.kerbal.so to, for example, liblingoona.grammar.kerbal.so_ so it will not load. It leads to some artifacts in displayed messages though, but game will run until we can get good fix for that.

P.S. It applies if your bt commands shows problem is in liblingoona only.

Edited by ThirdOfSeven
Link to comment
Share on other sites

Takes me some time to get there because the program generates hundreds of a lot of SIGPWRs and SIGXCPUs. Threading problems ? Backtrace after receiving SIGSEGV:

Spoiler

bt
#0  0x0000000000f2dd3d in ?? ()
#1  0x00007ffff61c4910 in __run_exit_handlers (status=0, listp=0x7ffff65275d8 <__exit_funcs>,
    run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83
#2  0x00007ffff61c496a in __GI_exit (status=<optimized out>) at exit.c:105
#3  0x00007ffff61af2b8 in __libc_start_main (main=0x4651a0, argc=1, argv=0x7fffffffe6b8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fffffffe6a8) at ../csu/libc-start.c:325
#4  0x000000000046f695 in ?? ()
#5  0x00007fffffffe6a8 in ?? ()
#6  0x000000000000001c in ?? ()
#7  0x0000000000000001 in ?? ()
#8  0x00007fffffffe9ac in ?? ()
#9  0x0000000000000000 in ?? ()

 

Not very helpful. The kernel apparently intervenes on cleanup, after the graphics window was closed.

Funny thing: this happens just by loading ksp to the initial menu and pressing directly quit.

Edited by Green Baron
Link to comment
Share on other sites

... and so it comes: after a few minutes of play my pc powers off, no shutdown, simply a halt, then restarts. I already mentioned all those unhandled SIGPWRs and SIGXCPUs. The first time i see a program behave like that.

Though i have a reasonable filesystem and shouldn't suffer from any dataloss this is certainly not playable.

Edit: system halt did not happen when gdb was running, but all all those unhandled signals heavily clutter the output. This really is the first that i blame a program for halting the pc.

Yes, it does.

Nothing in the system log files ...

 

Edited by Green Baron
Link to comment
Share on other sites

On 5/27/2017 at 7:23 PM, Green Baron said:

... and so it comes: after a few minutes of play my pc powers off, no shutdown, simply a halt, then restarts. I already mentioned all those unhandled SIGPWRs and SIGXCPUs. The first time i see a program behave like that.

Those signals is not something causing this. You can stop halting on them if you tell gdb

> handle SIGPWR nostop noprint

> handle SIGXCPU nostop noprint

they are just signals system sends to application to note it is quite CPU-hungry and must save some CPU time. You need to check something else.

Halting like that may be hardware (overheating?) problem, not software. Check with something else running to load your system, maybe video encoding, archiving things or running cpuburn tool.

Link to comment
Share on other sites

I know about the signals. No, it is definitely KSP halting the system.

Edit: cpu temp below 60° according to sensors. This is not an overheating problem. The pc has 4 years, i played a lot ksp on it (little since 1.0.5).

 

Edited by Green Baron
Link to comment
Share on other sites

A software provoked halt is a single instruction.

I limited cpu frequency to something below norm frequency (3200 of 3500mhz) and the halts still happen a few seconds into a flight. There is no software running except for the system processes and a terminal. This is debian 9, no other software has provoked that behaviour before.

I could experiment further with limiting the cpu time or memory for the application but i doubt that is worth the while. I'd rather expect a forgotten piece of code somewhere in the stack of tools, engines and frameworks ksp uses. Maybe others come up with similar problems ....

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...