Jump to content

state_cmd, finish_cmd and wait its child process


zdima

Recommended Posts

Hello!

How I can to fix this trouble?

I know this situation is described in documentation.

But What can i do with this defunct process?

They are does not kills.

nginx      671 10.7  2.2  57076 22548 ?        Ssl  16:47   4:00 /var/www/utserver/utserver -settingspath /var/www/utserver -pidfile /var/www/utserver/utserver.pid -logfile /var/www/utserver/log/utserver.log
nginx 912 0.0 0.0 0 0 ? Zs 16:59 0:00 \_ [php] <defunct>
nginx 913 0.0 0.0 0 0 ? Zs 16:59 0:00 \_ [php] <defunct>
nginx 962 0.0 0.0 0 0 ? Zs 17:03 0:00 \_ [php] <defunct>
nginx 963 0.0 0.0 0 0 ? Zs 17:03 0:00 \_ [php] <defunct>
nginx 1049 0.0 0.0 0 0 ? Zs 17:11 0:00 \_ [torrent.sh] <defunct>
nginx 1152 0.0 0.0 0 0 ? Zs 17:24 0:00 \_ [torrent.sh] <defunct>

Link to comment
Share on other sites

  • 6 months later...

I have the same problem.

It seems the utserver does not reap its children and is a bug.

 # pstree -pa | less
<snip>
|-screen,17836 -S utorrent -d -m /opt/utorrent/start_utorrent.sh
| `-start_utorrent.,17837 /opt/utorrent/start_utorrent.sh
| `-su,17838 - utorrent -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
| `-bash,17839 -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
| `-utserver,17840 -configfile utserver.conf
| |-(sendmail.rb,5382)
| |-(sendmail.rb,5383)
| |-(sendmail.rb,5384)
| |-(sendmail.rb,5385)
| |-(sendmail.rb,5386)
| |-(sendmail.rb,5387)
| |-(sendmail.rb,5388)
| |-(sendmail.rb,5389)
| |-(sendmail.rb,5390)
| |-(sendmail.rb,5391)
| |-(sendmail.rb,5392)
| |-(sendmail.rb,5393)
| |-(sendmail.rb,5394)
| |-(sendmail.rb,5395)
| |-(sendmail.rb,5396)
<snip>

 # ps auxw | grep sendmail.rb | wc -l
75
# ps auxw | grep sendmail.rb | tail
utorrent 23472 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 23482 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 23492 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 23494 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 23572 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 23574 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 24861 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 24862 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 25860 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>
utorrent 25861 0.0 0.0 0 0 ? ZNs Jun05 0:00 [sendmail.rb] <defunct>

EDIT: I'm running: utorrent-server-3.0-25053.tar.gz

According to the docs:

The command is run asynchronously, so that a lengthy or hung process will

not block the server. The server creates a new process group for the

command, so that the server does not need to wait for it, and so the kernel

process table does not fill up with zombie processes. The command is run as

the same user that runs the server process.

Am I doing something wrong???

Link to comment
Share on other sites

I am seeing that there are also some zombie utserver processes...

 # pstree -pa | grep -v grep | grep utserver
| `-su,17838 - utorrent -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
| `-bash,17839 -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
| `-utserver,17840 -configfile utserver.conf
| |-(utserver,21262)
| |-(utserver,21267)
| |-(utserver,21272)
| |-(utserver,21274)
| |-(utserver,21275)
| |-{utserver},17841
| |-{utserver},17842
| `-{utserver},17843


# ps auxw | grep utserver
root 5918 0.0 0.0 7624 928 pts/2 S+ 09:09 0:00 grep --color=auto utserver
utorrent 17838 0.0 0.0 37060 672 pts/1 S+ Jun05 0:00 su - utorrent -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
utorrent 17839 0.0 0.0 19168 588 pts/1 S+ Jun05 0:00 -su -c cd ~/ && nice -n 19 ./utserver -configfile utserver.conf
utorrent 17840 25.5 1.1 77396 45476 pts/1 SNl+ Jun05 291:17 ./utserver -configfile utserver.conf
utorrent 21262 0.0 0.0 0 0 ? ZNs Jun05 0:00 [utserver] <defunct>
utorrent 21267 0.0 0.0 0 0 ? ZNs Jun05 0:00 [utserver] <defunct>
utorrent 21272 0.0 0.0 0 0 ? ZNs Jun05 0:00 [utserver] <defunct>
utorrent 21274 0.0 0.0 0 0 ? ZNs Jun05 0:00 [utserver] <defunct>
utorrent 21275 0.0 0.0 0 0 ? ZNs Jun05 0:00 [utserver] <defunct>

Link to comment
Share on other sites

Thanks for the second report on this issue. I have not been able to reproduce it. My tests never show zombies being created. Each child process created for state change events is put in a new session via setsid(), so there should be no need for the utserver process to wait on those child processes. Can you tell me more about the environment in which you run uTorrent Server (32-bit or 64-bit, etc.)?

Hi mcdonald,

I am running utorrent-server-3.0-25053.tar.gz on ubuntu 10.04 LTS 64-bit.

I've installed the ia32-libs package to run this 32-bit utserver application.

I am running it as user utorrent.

# ldd utserver
linux-gate.so.1 => (0xf7785000)
libssl.so.0.9.8 => /lib32/i686/cmov/libssl.so.0.9.8 (0xf772d000)
libcrypto.so.0.9.8 => /lib32/i686/cmov/libcrypto.so.0.9.8 (0xf75db000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf75c1000)
libm.so.6 => /lib32/libm.so.6 (0xf759b000)
librt.so.1 => /lib32/librt.so.1 (0xf7592000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7573000)
libc.so.6 => /lib32/libc.so.6 (0xf7419000)
/lib/ld-linux.so.2 (0xf7786000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7415000)
libz.so.1 => /usr/lib32/libz.so.1 (0xf73ff000)


# dpkg --list | grep ia32-libs
ii ia32-libs 2.7ubuntu26.1 ia32 shared libraries for use on amd64 and i

EDIT: Please see my previous post above for more information on this issue/bug

Link to comment
Share on other sites

I am running utorrent-server-3.0-25053.tar.gz on ubuntu 10.04 LTS 64-bit.

I've installed the ia32-libs package to run this 32-bit utserver application.

We've seen other problems running uTorrent Server on 64-bit Linux with 32-bit compatibility libraries. I'm going to wait until I can release both 32- and 64-bit builds, then if people see the problem on the 32-bit build running on 32-bit Linux, or the 64-bit build running on 64-bit Linux, then I should be able to work on it.

The 64-bit builds are working well. I just need to run a stress test on one, but I'm stress testing other products right now.

Link to comment
Share on other sites

hi mcdonald,

Understandable to wait to see how this works with native 64bit. Nobody likes to do double work.

Is it possible for me to obtain a pre-release of the 64bit version? Then I can see if it fixes the problem in my case.

Link to comment
Share on other sites

Is it possible for me to obtain a pre-release of the 64bit version?

I'm hoping to start a run of tests for uTorrent Server on Monday next week. This will be on machines running 32- and 64-bit Ubuntu 11.04 and Debian 5.0. Builds performed on Ubuntu 10.10 and Debian 5.0 images. I've tried to work with CentOS, but the image I was using was incompatible with the automated build and test system, so I'm holding off on CentOS.

I'm hoping to provide archives to Firon for release next Friday if all goes well.

Link to comment
Share on other sites

  • 1 month later...

I have the same issue running Gentoo (x86_64) with 32bit compat libs. I have encountered the same behaviour on the following builds:

- utorrent server v3.0 #24118 (32bit build)

- utorrent server v3.0 #24733 (32bit build)

- utorrent server v3.0 #25053 (32bit build)

- utorrent server v3.0 #25376 (ubuntu native 64bit build)

31192 ?        Ssl    0:06 /usr/local/utorrent-server/utserver -pidfile /var/run/utorrent.pid -settingspath /usr/local/utorrent-server -logfile /var/log/utorrent.log -daemon
31206 ? Zs 0:00 \_ [statechange.sh] <defunct>
31209 ? Zs 0:00 \_ [statechange.sh] <defunct>
4238 ? Zs 0:00 \_ [statechange.sh] <defunct>
4241 ? Zs 0:00 \_ [statechange.sh] <defunct>
4244 ? Zs 0:00 \_ [statechange.sh] <defunct>
4255 ? Zs 0:00 \_ [statechange.sh] <defunct>
4258 ? Zs 0:00 \_ [statechange.sh] <defunct>
4261 ? Zs 0:00 \_ [statechange.sh] <defunct>

I have tried eliminating script issues by having the script "statechange.sh" just exit as soon as it starts and it still occurs. The zombie processes appears as soon as utserver starts (one per active torrent).

Any progress on this issue? Can I be of any assistance with troubleshooting?

I'd be happy to provide some strace logs if you like?

Link to comment
Share on other sites

  • 3 months later...

Running Ubuntu 11.10 32 bit and seeing defunct processes. Parent is utserver and every call to my state_cmd script results in a defunct process (despite running to completion). I'm on version 3.0 build 25053.

Perhaps we can add this to the bug list now that I'm running a real 32 bit Linux version?

EDIT:

Until this fix is made, I'll restart utserver to clear out the defunct processes via cron I suppose.

Thanks,

Matt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...