FS#48972 - ddd hangs because it cannot connect to X Window
Attached to Project:
Arch Linux
Opened by Philipp Claßen (PhCl) - Friday, 15 April 2016, 22:03 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 19 April 2016, 23:19 GMT
Opened by Philipp Claßen (PhCl) - Friday, 15 April 2016, 22:03 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 19 April 2016, 23:19 GMT
|
Details
Description:
ddd hangs because it cannot connect to X Window. Here is the output of strace: connect(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0 getpeername(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0 uname({sysname="Linux", nodename="terra-arch", ...}) = 0 access("/home/phil/.Xauthority", R_OK) = 0 open("/home/phil/.Xauthority", O_RDONLY) = 5 fstat(5, {st_mode=S_IFREG|0600, st_size=55, ...}) = 0 read(5, "\1\0\0\nterra-arch\0\0010\0\22MIT-MAGIC-COO"..., 4096) = 55 read(5, "", 4096) = 0 close(5) = 0 getsockname(4, {sa_family=AF_LOCAL, NULL}, [2]) = 0 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}]) writev(4, [{"...", 12}, {"", 0}, {"MIT-MAGIC-COOKIE-1", 18}, {"...", 2}, {"...", 16}, {"...", 0}], 6) = 48 recvmsg(4, 0x7ffc641c6e80, 0) = -1 EAGAIN (Resource temporarily unavailable) Before the recvmsg call, it communicates with the "/tmp/.X11-unix/X0" socket and sends a MIT-MAGIC-COOKIE-1 with a writev call. Then it loops forever (the recvmsg call keeps failing). It worked a short while ago, ddd is the only application that seems to be affected. Unfortunately, I am not familiar with the XWindow authorization protocol. /tmp/.X11-unix/X0 exists and it owned by root: $ ls -l /tmp/.X11-unix total 0 srwxrwxrwx 1 root root 0 Apr 5 21:22 X0 If I run sudo ddd, it works. I cannot rule out that the problem is caused by a misconfiguration on my system. Please let me know if additional config files or log outputs what you useful. Additional info: * ddd 3.3.12-7 Steps to reproduce: Just start "ddd". The GUI opens, but hangs when you try interact with it. It is more visible if you run "strace ddd". You should immediately see infinite loops like this: poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 2, 0) = 0 (Timeout) poll([{fd=6, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout) recvmsg(4, 0x7ffeeb2a2180, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(4, 0x7ffeeb2a2180, 0) = -1 EAGAIN (Resource temporarily unavailable) |
This task depends upon
That is why it worked for other users (like root). Thanks for your help!