On Friday 26 April 2024 20:41:23 Steven D'Aprano via tde-users wrote:
Okay, so thanks to all who have participated in this group effort to rid my
system of zombies.
Last night, my zombies had multiplied to 17. When I did some searching for
those processes, I found that all but one (for Kmail) were named w and owned
by root.
The more I thought about this, the more it bothers me. For one thing, I don't
run much of anything as root if I can help it. I sometimes open Konqueror as
root to do something, but then I close it; I sometimes perform some admin
tasks in a shell, but then I close out the root session. If these are system
processes, then of course that is different, but why so many, and all named
w? The function of W itself, described in the manpages, is: "Show who is
logged on and what they are doing."
Well, I can find only 3 users in my system, myself, root, and another called
message+; other than the three of us, there ought to be nobody else hanging
out here.
Then I searched for these zombies by PID, then tried to remove them with
kill -9 <PID #>
... and nothing happened. According to top, all 17 were still enjoying their
undead life, and ignored my commands to go away.
A little searching discovered that at least some of these processes named w
had to do with wicd. The reason for this, now it is clear, is that I was
having network issues a few weeks ago (Nik and others will recall), and I
installed wicd to see if I could use that to get my connection working again.
Okay, so there were some unnecessary packages in my system. I purged
everything wicd; that ought to get rid of zombies.
When I rebooted and went through my usual startup routines, I ended up with
top showing 1 zombie, even though I have not as yet even gone online. (I
control my online/offline status using iwconfig and ifconfig, so that when I
take my machine offline, I can be sure that it is really offline, and of
course I never permit any kind of autoconnect.)
I searched for this sole zombie: ps -el | grep 'Z'
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 Z 1000 3731 3727 0 80 0 - 0 - ? 00:00:00 sh
As you can see, in this case it is a shell owned by myself, user 1000. When I
search for its parent, that turns out to be:
<user> 3727 0.2 0.5 72532 33520 ? S 10:05 0:00
tderandrtray -session
1013f12f150140000168161448200000028290036_1714235508_309905
Now why would tderandrtray be leaving zombies behind? For one thing, I rarely
touch it; tderandrtray just sits there for ages on end without my ever
touching it, so I have to wonder what it's doing at all, and why it would
leave zombies behind.
Just now, as an experiment, I tried to kill tderandrtray,
kill -9 3727
and presto! tderandrtray disappears from my systray, and the zombie also
magically disappears from top. So then I restart tderandrtray, and poof! the
sole zombie has instantly returned.
Just to be sure, I repeated this experiment a couple times, and the result is
always the same. Somehow, tderandrtray, as soon as it is enabled, creates a
zombie. The zombie is named sh, a shell process owned by user 1000, myself.
So in this case, at least, I believe that I have tracked down the most
persistent of my zombies. I don't know if it's the only one related to
tderandrtray, or if those w zombies running as root are somehow related, but
at least there is one pretty clear result.
If anybody can make any sense of this, please feel free to enlighten us.
Bill