You are not logged in.

#1 2011-04-21 22:58:29

Ledti
Member
Registered: 2010-07-31
Posts: 122
Website

[Infestation Cleansed] Zombie Issues

I have zombie process issues...

Starting certain programs in .xinitrc as backgrounded (&), for example...

urxvtd -q -o -f &

instead of

urxvtd -q -o -f

... will leave a defunct process, to remedy this I have to only background applications that require it.

Here's what happens if I have the following in my .xinitrc file...

xrdb -merge "$HOME/.Xresources" &
upower -e &
start-pulseaudio-x11 &
urxvtd -q -o -f &
ibus-daemon -dxr &

... and after starting X:

[05:59:55] [~] $ ps -ef | grep defunct
timothy   3753  3752  0 17:59 tty1     00:00:00 [xrdb] <defunct>
timothy   3754  3752  0 17:59 tty1     00:00:00 [upower] <defunct>
timothy   3755  3752  0 17:59 tty1     00:00:00 [start-pulseaudi] <defunct>
timothy   3756  3752  0 17:59 tty1     00:00:00 [urxvtd] <defunct>
timothy   3757  3752  0 17:59 tty1     00:00:00 [ibus-daemon] <defunct>
timothy   3801  3799  0 17:59 pts/0    00:00:00 grep --color=auto defunct

Here's the same information in htop:
AZHjWs.jpg

My .bashrc, .bash_profile, .Xresources, and .xinitrc files are all on Github (link in signature).

---

Things I've tried to remedy this issue:

  1. Created a new user (testuser) with a barebones .xinitrc file copied from /etc/skel/.xinitrc, the issue persisted. (throws out /home/ configuration issues)

  2. Disabled all daemons and custom modules in /etc/rc.conf, issue persisted.

  3. Reinstalled Arch (for other reasons), issue persisted.

  4. Switched to (re: tried, it's quite nice) systemd, issue persisted.

  5. Switched out RAM, removed all USB and other peripheral devices, issue persisted.

  6. Flashed BIOS with a older (issued over a year ago) version, issue persisted (reflashed latest version afterwards).

  7. Spilled tea with honey onto keyboard (unintentional - cats fault), issue became sticky and persisted.

It's not really a big deal since the zombiessssss aren't taking up any memory, but last night I decided to fix it... and since then I've stared into oblivion three times. It's a issue I've had for at least 6-8 months (the zombie thing).

I don't understand anything about the kernel or processes in general, so let me know if I'm an idiot or if you need any more information (if you want to help).

I'm using a AOD250 and all fstab options are default.

Thanks.

Last edited by Ledti (2013-07-03 15:44:12)

Offline

#2 2012-08-21 20:32:19

Blargg
Member
Registered: 2012-08-21
Posts: 2

Re: [Infestation Cleansed] Zombie Issues

It seems to me that when I use 'ck-launch-session' when launching my window manager, it makes the processes launched from my .xinitrc to become zombies. What happens if you remove it?

Offline

#3 2012-08-22 13:21:36

Ledti
Member
Registered: 2010-07-31
Posts: 122
Website

Re: [Infestation Cleansed] Zombie Issues

Blargg wrote:

It seems to me that when I use 'ck-launch-session' when launching my window manager, it makes the processes launched from my .xinitrc to become zombies. What happens if you remove it?


Haha, I could have sworn that I tested that idea once but apparently I never have. That fixes the issue for me as well, nice find. As far as I can tell, ck-launch-session (the consolekit package) will most likely become irrelevant soon (for those of us who still use startx) with all the polkit changes and the switch to systemd. So the solution to this problem is to either use a login manager or to just wait a bit for all the new changes.

Thanks for responding with the solution.

Offline

#4 2012-08-22 14:11:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: [Infestation Cleansed] Zombie Issues

Or you can (probably) call startx/xinit with ck-launch-session rather than having it in the xinitrc.  In other words, take that out of the xinitrc, then when you want to start x, use `exec ck-launch-session xinit`.  This is - essentially - what a login manager does.  This way all the programs run from the xinitrc are "children" of the ck-launch-session process.

Alternately, just get rid of ck-launch-session all together.  This is not meant as a flame, just to make you assess whether you really need it for anything: I got rid of console-kit a long time ago and all that I lost was lots of background processes and memory and cpu use - everything still works as expected.

Finally, if you'd rather go the systemd route, there's no need to wait.  It's in the repos and is ready to go.

edit: as a potentially easier implementation of my first suggestion you could have something like the following (UNTESTED) in your xinitrc:

exec ck-launch-session ( urxvtd -q -f -o & otherprocess & i3 )

This implements the same logic: all the processes are launched from a subshell created by the ck-launch-session command.  The only difference is this one does not require typing out "exec ck-launch-session xinit" ... of course an alias could do this too.

Last edited by Trilby (2012-08-22 14:13:47)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-08-23 18:46:37

Blargg
Member
Registered: 2012-08-21
Posts: 2

Re: [Infestation Cleansed] Zombie Issues

Good to hear that it worked. And thanks, Trilby, for the explanation.

Offline

Board footer

Powered by FluxBB