FS#32173 - [rxvt-unicode] After resume from standby, urxvtd sometimes refuses connections
Attached to Project:
Community Packages
Opened by Natanji (Natanji) - Tuesday, 23 October 2012, 07:29 GMT
Last edited by Sébastien Luttringer (seblu) - Monday, 29 October 2012, 12:29 GMT
Opened by Natanji (Natanji) - Tuesday, 23 October 2012, 07:29 GMT
Last edited by Sébastien Luttringer (seblu) - Monday, 29 October 2012, 12:29 GMT
|
Details
Description:
I use urxvt in daemon mode (urxvtd). Since either the last upgrade or since me switching to wicd (no idea if that is related, would be weird) the client will sometimes not be able to connect to urxvtd, but just print an error message: "unable to connect to the rxvt-unicode daemon: Connection refused". I can still see urxvtd running though. Normal urxvt works fine, of course. Only the daemon mode is problematic. Running strace urxvtc reveals the following: ------------ mkdir("/home/user/.urxvt", 0777) = -1 EEXIST (File exists) brk(0) = 0x168c000 brk(0x16ad000) = 0x16ad000 socket(PF_FILE, SOCK_STREAM, 0) = 4 connect(4, {sa_family=AF_FILE, sun_path="/home/user/.urxvt/urxvtd-hostname"}, 110) = -1 ECONNREFUSED (Connection refused) dup(2) = 5 fcntl(5, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fstat(5, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fee02f22000 lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(5, "unable to connect to the rxvt-un"..., 65unable to connect to the rxvt-unicode daemon: Connection refused ) = 65 close(5) = 0 munmap(0x7fee02f22000, 4096) = 0 exit_group(2) = ? +++ exited with 2 +++ Additional info: * package version: rxvt-unicode 9.15-3 * steps to reproduce: No idea as of yet, sorry. |
This task depends upon
Closed by Sébastien Luttringer (seblu)
Monday, 29 October 2012, 12:29 GMT
Reason for closing: Not a bug
Monday, 29 October 2012, 12:29 GMT
Reason for closing: Not a bug
nc.openbsd -U /path/to/your/urxvtd/socket
So, I have two sockets in ~/.urxvt - the first one is called urxvtd-hostname (which according to the above is also the one used by urxvtc) and I can *not* connect to it via nc: "nc.openbsd: unix connect failed: Connection refused".
The second socket in that path is called "urxvtd-" only. I can connect to that one! I don't know what it's for, but it seems weird that there would be a second urxvtd only. Mind the minus sign at the end: looks as if the hostname was not appended there.
What's more: the command "RXVT_SOCKET=~/.urxvt/urxvtd- urxvtc" successfully spawns a urxvtc instance that is connected to urxvtd. So for some reason it seems like the urxvtd-hostname socket goes down and a new socket without the hostname part gets created and used by urxvtd instead...
This sounds really weird, yes, but it might be possible that urxvt was somehow confused by this and created two sockets - one for each of the two lines. Just wildly guessing, but maybe you can try this out on your system and see if you also get two socket files in ~/.urxvt then.
This time, I cannot run *any* programs in the existing X session anymore. When I use the "hostname" program to display my current hostname, it just prints an empty line! This is both the case inside the running X instance, and on tty1-6 as well (they also show " login" instead of "hostname login:" as a login prompt). So for some reason the system just forgets its hostname in the middle of operation.
What the fuck? How is this even possible?