splintermind / Dwarf-Therapist

Maintained branch of the original Dwarf Therapist for Dwarf Fortress.
Other
404 stars 71 forks source link

X Server sometimes freezing on connect/write #244

Open dtrauma opened 9 years ago

dtrauma commented 9 years ago

Hey, since updating to df .24 and therapist 30.1, sometimes on reading/writing from df the whole X server freezes. That is, while the mouse cursor is still moveable and audio players keep playing in the background, the whole UI of every program doesn't change anymore, no keys seem to work anymore, including the switch to text console keys, and I have to use the sysreq K key to kill the X server and log in again. To my laymen eyes, this looks like maybe DT blocks on X events that make X block in turn? Is this even possible?

Is this something only I experience? Is there some way I can debug this?

Linux 3.16 x86_64 X server 7.4 using AMD's binary driver 14.12 for an HD6870

Hello71 commented 9 years ago

AMD's binary driver

yer on yer own, bud.

dtrauma commented 9 years ago

I'd surprise me by no little amount if it was related to the gfx driver...

Anyway, I looked into it some more and found out that I'm still able to remote into the machine and kill DT, which unfreezes the UI and makes everything work again (df included). I didn't find a sure way to trigger this bug yet, but I made a trace of DT running up to the freeze. It's too large to post it uncompressed, but after a metric load of process_vm_readv it ends in:

[pid 24596] process_vm_readv(25504, [{"\0\0", 2}], 1, [{0xdcfbf124, 2}], 1, 0) = 2
[pid 24596] ptrace(PTRACE_DETACH, 25504, 0, SIG_0) = 0
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] ptrace(PTRACE_ATTACH, 25504, 0, 0) = 0
[pid 24596] wait4(25504, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}], 0, NULL) = 25504
[pid 24596] process_vm_readv(25504, [{"h\351\276\334", 4}], 1, [{0x9a80480, 4}], 1, 0) = 4
[pid 24596] process_vm_readv(25504, [{"\230\354\276\334", 4}], 1, [{0x9a80484, 4}], 1, 0) = 4
[pid 24596] process_vm_readv(25504, [{"(o\276\334\20p\276\334\370p\276\334\340q\276\334\310r\276\334\0t\276\334\350t\276\334\320u\276\334"..., 816}], 1, [{0xdcbee968, 816}], 1, 0) = 816
[pid 24596] stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2335, ...}) = 0
[pid 24596] write(2, "2015-Feb-22 22:45:00.621 INFO\tco"..., 912015-Feb-22 22:45:00.621 INFO    core    FOUND 204 squads [src/dfinstance.cpp:821] (load_squads)
) = 91
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 24596] poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN|POLLOUT}])
[pid 24596] recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\6\0\246;|\3526\v\243\0\0\0\f\0\340\3\0\0\0\0\241\0b\0\241\0003\0\20\0\1\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
[pid 24596] writev(6, [{"&\3\2\0\243\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
[pid 24596] poll([{fd=6, events=POLLIN}], 1, 4294967295) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
[pid 24596] --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=31203, si_uid=0} ---
[pid 24597] +++ killed by SIGTERM +++
+++ killed by SIGTERM +++

204 squads? Next thing I'd do is compile myself a debug build (I use the LNP build currently) and give you a backtrace, unless you say you won't look at it anyway due to the bin driver?

Hello71 commented 9 years ago

I probably wouldn't bother; even if I could find something useful, it'd be impossible to track down without source code. @splintermind might, but I doubt it.

nir0 commented 9 years ago

same here... i'm able to login through SSH from my mobile phone and kill therapist with "kill -9" command it happens from time to time when i launch or reconnect, especially on high mem usage case, but happens with clean mem and swap as well.

$ Xorg -version

X.Org X Server 1.15.1
Release Date: 2014-04-13
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-61-generic x86_64 Ubuntu
Current Operating System: Linux storm 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic root=UUID=4583c966-b7ff-4644-8ce0-391fe89cd9e9 ro quiet splash vt.handoff=7
Build Date: 30 July 2014  12:21:54AM
xorg-server 2:1.15.1-0ubuntu2.1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.30.2