Bekijk de volledige versie : transmission.cgi using 100% cpu
Hi there,
i installed my WL-HDD from the scratch with the -9 firmware.
Setup is exactly as in my HowTo (see sig).
I (and several other users) have the problem that the transmission.cgi is hanging when listing the torrents. At this point it consumes 100% cpu.
The attached picture shows this behaviour in the browser.
This are the running processes:
[admin@blechbuechse torrent]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:02 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:01 [mtdblockd]
46 ? S 0:00 telnetd
51 ? S 0:01 httpd
56 ? S 0:00 klogd
57 ? S 0:00 [khubd]
67 ? Ss 0:02 watchdog
69 ? Ss 0:00 \_ ntp
78 ? S 0:00 dropbear
396 ? Ss 0:05 \_ dropbear
397 pts/0 Ss 0:03 \_ -sh
569 pts/0 R+ 0:00 \_ ps axf
90 ? S 0:00 [kjournald]
91 ? S 0:00 [kjournald]
117 ? S 0:00 /sbin/syslogd -m 0 -O /opt/var/log/messages.log -S -l 6 -s 0
123 ? Ss 0:00 /opt/sbin/cron
132 ? Ss 0:00 /opt/sbin/xinetd -pidfile /var/run/xinetd.pid
142 ? Ss 0:05 \_ nmbd
551 ? Ss 0:05 \_ [smbd]
141 ? S 0:00 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
555 ? S 0:00 \_ /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
556 ? S 0:00 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
568 ? R 0:08 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
293 ? Ss 0:00 transmissiond -p 65534 -w 300 -u 41 -d 180 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
296 ? S 0:00 \_ transmissiond -p 65534 -w 300 -u 41 -d 180 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
297 ? R 2:06 \_ transmissiond -p 65534 -w 300 -u 41 -d 180 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
- I am using busybox-httpd.
- I also tried to change the paths in transmission.conf to /tmp/mnt/disc0_3/torrent (maybe the symlink...)
- I upgraded to Version 1.11+r5740-1
...but nothing worked.
The only way to stop transmission.cgi is to kill the process within console. :(
transmissiond is working fine ans downloads are as always :)
Any ideas?
wengi
Hi wengi,
just following up on this 'cause we've discussed this in another thread.
Have you tried lighttpd to run the transmission.cgi ?
Maybe the problem is not with the transmission.cgi, but in the way it runs in busybox-httpd
i changed to lightttpd today.
Status page is ok but pushing a torrent hangs.
I have no idea how to set cgi (perl?, shell?). That is one of my biggest probs atm.
I think i will have to try thttpd within the next days....
wengi
Hi, I have the same problem.
Maybe this info can help a little more:
If I click on "Update" with 2 torrent running, I get the web interface frozen.
Than from the console:
[admin@WL-HDD root]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:03 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 0:36 [ksoftirqd_CPU0]
4 ? S 0:53 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:27 [mtdblockd]
45 ? S 0:00 telnetd
57 ? S 0:00 klogd
60 ? S 0:00 [khubd]
67 ? Ss 4:10 watchdog
69 ? Ss 0:01 \_ ntp
76 ? S 0:01 dropbear
8970 ? Ss 0:02 \_ dropbear
8996 pts/0 Ss 0:00 \_ -sh
9060 pts/0 R+ 0:00 \_ ps axf
93 ? S 0:00 [kjournald]
94 ? S 0:32 [kjournald]
96 ? Ss 4:43 /usr/sbin/nmbd -D
98 ? Ss 0:00 /usr/sbin/smbd -D
8205 ? S 0:05 \_ /usr/sbin/smbd -D
125 ? S 1:03 /sbin/syslogd -m 0 -O /opt/var/log/syslog.log -S -l 7 -s 0
130 ? Ss 0:01 /opt/sbin/cron
139 ? S 0:01 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
9040 ? S 0:00 \_ /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
9041 ? S 0:00 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
9059 ? R 0:02 \_ /bin/sh /opt/share/www/cgi-bin/transmission.cgi
203 ? SNs 0:05 transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
206 ? SN 0:00 \_ transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
207 ? RN 205:15 \_ transmissiond -p 65534 --nat-traversal -e -w 300 -u 10 -d -1 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
212 ? S 1:06 httpd
No if I kill the latest "transmission.cgi":
[admin@WL-HDD root]$ kill 9059
the web interface will show one row more, I repet the procedure one more time and the web interface i fully loaded:
For me it seams that everytime "transmission.cgi" is "looking" to an active or finished torrent it get stuck..
Yep, same behaviour here.
wengi
I do not have such behaviour. And transmission.cgi was not changed for some time. So, could you please try
sh -x /opt/share/www/cgi-bin/transmission.cgi
to see where it stops. It could be some external tool that freezes.
Hi oleo,
thanks for your reply.
i attached the result of your request.
The normal call of transmission.cgi is working well at the moment, so you will not see any problems in the attachment.
The cgi hangs when i try to push a torrent from queued to active.
Is there a shell command for this push request?
wengi
Try this:
QUERY_STRING='ACTION=Push&ID=21' sh -x /opt/share/www/cgi-bin/transmission.cgi
ID is the line number.
Hi,
i now did a
sh /opt/share/www/cgi-bin/transmission.cgi And saw this part:
<table>
<thead><tr><td></td><td>Queued</td><td>status</td></tr>
</thead><tbody>
<tr><td><input name=ID value=1 type=radio></td>
<td>OOo_2.4.0_Win32Intel_install_de.exe</td>
</tbody></table>
So i did a
QUERY_STRING='ACTION=Push&ID=1' sh -x /opt/share/www/cgi-bin/transmission.cgiI hope this is the right command to push the torrrent with ID 1 from q to a.
It stopped here:
+ echo OOo_2.4.0_Win32Intel_install_de.exe</td>
OOo_2.4.0_Win32Intel_install_de.exe</td>
+ [ -f /tmp/mnt/disc0_3/torrent/work/OOo_2.4.0_Win32Intel_install_de.exe/.info ]
+ echo <td><div style='position:relative;'>
<td><div style='position:relative;'>
+ [ Active = Seeding -o Active = Active ]
+ [ -f /tmp/mnt/disc0_3/torrent/work/OOo_2.4.0_Win32Intel_install_de.exe/.status ]
+ STATUS=status not available
+ echo <div style='position:relative;'>status not available
<div style='position:relative;'>status not available
+ echo Start: 30 May 11:28
Start: 30 May 11:28
+ [ -n ]
The full file is attached.
Opening a second shell and doing a list shows that torrent ID1 is now active. But the first shell is still hanging in transmission.cgi (since more than 15 mins).
CPU usage of transmission.cgi (process "sh") is 100%.
wengi
It stops at the following:
echo "<div style='position:relative;'>${STATUS}"
echo " Start: ${STARTTIME}"
[ -n "${ENDTIME}" ] && echo " End: ${ENDTIME}"
[ -n "${SCRAPE}" ] && echo " ${SCRAPE}"
And I do not see problem here. So it must be elsewhere.
Try to replace interpreter in first line
#!/bin/sh
with
#!/opt/bin/busybox sh
after you installed busybox-base packages.
Or maybe bash.
Strange.
i installed the three busybox 1.10.2 packages and rebooted.
busybox 1.10.2 is now used as default.
Pushing the torrent several times via shell wa allways fine.
Trying to push the torrent via local lynx ends in hang up.
Pushing via IE or FF over a ssh tunnel works fine now....
I have no idea what is going on but i will test some torrents with the new busybox version.
thanks for now
wengi
EDIT: Modifiying transmission.cgi as you recommended doesn't make a difference (tested).
After some time of testing i can report the following:
installing ipkg-busybox does the trick.
Everything works fine except for the local installed lynx browser.
Lynx still hangs on pushing torrents.
Maybe this is something with core-/fileutils replacing the orig. busybox commands in the new firmware and diffs in the coding (german umlaute δόφ and other special chars)
But this seems to be an acceptable workaround.
Thanks oleo
wengi
It is working also for me.
You install the busybox package and replace the interpreter in the first line of transmission.cgi as advised by Oleo.
Thanks!!
It would be nice if someone can isolate a problem or maybe ask Oleg to upgrade stock busybox. But then, maybe the problem is with old uClibc 0.9.19 use in Oleg firmware and just upgrading would help. Again Oleg is endpoint address.
I think I found a better solution ... when you install new busybox three some command stop working (mount, per example) and push don't work everytime ... oleo say "Or maybe bash", so I try this:
- use thttpd instead of busybox;
- add cgipat=/cgi-bin/* and user=admin in thttpd.conf;
- install bash (ipkg install bash);
- change #!/bin/sh with #!/opt/bin/bash on transmission.cgi top.
and everything works better and faster!
Perhaps busybox-httpd will work as well, I use php-thttpd because I need it for a blog ... two pigeon with a bean!
Hi,
i use lighttpd with cgi executed by /opt/bin/bash.
So same idea, other webserver :)
wengi