You are not logged in.
Hi,
I noticed that rtorrent 0.9.4-1 writes the wrong process name in /proc/<pid>/status. It writes "main" instead of "rtorrent". That means that when I use an utility such as pgrep to get the PID of rtorrent it fails.
$ ps ax | grep -v grep | grep rtorrent
23123 ? Ss 0:04 tmux new -d -s rtorrent rtorrent
23124 pts/2 Ssl+ 0:11 rtorrent
$ pgrep rtorrent
$
It should have shown 23124 (btw, I run rtorrent in a detached tmux session, running rtorrent in a terminal doesn't change anything). Here I see that pgrep works and if I used "main" as a pattern I get the expected PID.
$ pgrep tmux
23123
$ pgrep main
23124
$ head /proc/23124/status
Name: main
State: S (sleeping)
Tgid: 23124
Ngid: 0
Pid: 23124
PPid: 23123
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 100 100 100 100
FDSize: 512
$ pacman -Q rtorrent libtorrent
rtorrent 0.9.4-1
libtorrent 0.13.4-1
If I downgrade rtorrent/libtorrent to 0.9.3-2/0.13.3-2 the problem dissapears and everything works as expected.It's not a big issue, but I needed to change one line in a script I use to check whether rtorrent is running and start it if not. Can somebody confirm this or what am I doing wrong?
Last edited by a821 (2014-06-30 07:47:42)
Offline
Yes same happens here. pkill rtorrent does nothing but pkill main kills rtorrent.
You're just jealous because the voices only talk to me.
Offline
Likely related to
* Added thread names using pthread_setname_np.
And indeed the libtorrent threads are called "main" and "disk".
Offline
Hi,
Sorry for the delayed response... Here is a short update: I had some free time to look at this again and following pyroscope's hint (thread names) I realized that the issue had been already fixed upstream when I reported it (I only checked the "open issues" section and missed the "closed issues" in rtorrent's github site... it was here. Sorry about that).
At the end I patched rtorrent/libtorrent myself using the commits 8e69930 and 425d5fd which fix the issue. I guess we'll have to wait to the next release. (I guess the git versions in AUR should work as well, but I didn't try them).
Bye.
Offline