[SOLVED] Interprocess Communication (Socket) Fails, Freezing Applications
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Interprocess Communication (Socket) Fails, Freezing Applications
[Posted this also on ubuntuforums.org.]
I have been running Kubuntu for years on my Samsung NP900X3D without a problem. Then, about a week ago, all applications that use socket-based communication with named sockets started failing all of a sudden. This affects a lot of applications, from the simplest (kcalc) to the more complex (LibreOffice).
An strace on any of them reveals that they open a socket file, write to it, wait for a response... and go on waiting forever. There is never any reply. Kcalc will wait on an ICE socket, LibreOffice on one of its own.
I suppose re-installing Linux would eventually fix the issue, since there seems to be nothing wrong with the hardware. Also, a great number of applications work (e.g. Firefox or FreeCiv), so the problem is isolated to those that open sockets.
If you have any idea what's going on or what I could do to help debug the issue, please respond! I won't include any log files at this point, because there is nothing in any of them in reponse to an application startup failure. But if you'd like some, I can add them in here.
The system is a Kubuntu 14.04, upgraded to the latest. Tons of PPAs and external repositories.
I had something like this occasionally on xubuntu. I think one of the interprocess message bus daemons must have hung up. A reboot solved it (until it happened again). You don't say if you have tried a reboot.
Yes, I rebooted several times, and the problem persists. Worse than that, it seemingly affects ALL named socket-based communication. Even trying to start something as simple as the KDE calculator, kcalc, fails.
So, this is persistent, consistent, and survives reboot and upgrade.
Finally figured out what happened - sort of. Posting here in case anyone else encounters the same problem.
Turns out the process to blame was ksmserver. It was gummed up trying to deal with something (unspecified at this point).
To fix it, I had to go to a TTY and start a process from there. You Alt-Ctrl-F1, log in, then type:
DISPLAY=:0 kcalc
If you switch back to graphical mode (Alt-Ctrl-F7, usually), you'll see a bunch of things you started in the distant past (in my case, about a week) happening at the same time, and then the application you started pops up (here, kcalc).
If you strace connect() calls, you can see the application going past the ICE-unix stage:
Quote:
> strace -e connect kcalc
connect(6, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
connect(7, {sa_family=AF_LOCAL, sun_path=@"/tmp/dbus-go5zFa52OC"}, 23) = 0
connect(8, {sa_family=AF_LOCAL, sun_path=@"/tmp/.ICE-unix/3628"}, 22) = 0
connect(9, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(9, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.