[SOLVED] Transmission 2.22 unstable on NAS LinkStation Mini

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Locked
Rikk
Posts: 4
Joined: Tue Apr 12, 2011 8:11 pm

[SOLVED] Transmission 2.22 unstable on NAS LinkStation Mini

Post by Rikk » Tue Apr 12, 2011 8:40 pm

Hello to Transmission developers & users !
I installed Transmission version 1.8x up to the 2.13 on my NAS Linkstation Mini and the client worked perfectly (congratulations to developers). After the update 2.22 (+ update to libevent vrs 2.0.10, in libcurl 7.21.4), Transmission starts but the process is active only a few seconds then disappear (no more acitive). I activated the log level 3 but no errors indicated (see log below).

For information:
Link to the ipkg installation:
http://ipkg.nslu2-linux.org/feeds/optwa ... ss/stable/

Extract of the log after startup (command line transmission-daemon in ssh):
The "..." are the names of torrent files (deleted)
Log file (messages file in //var/logs/)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Transmission 2.22 (12099) started (session.c:708)
Apr 13 05:27:46 NAS transmission-daemon[19933]: RPC Server Adding address to whitelist: 127.0.*.* (rpc-server.c:807)
Apr 13 05:27:46 NAS transmission-daemon[19933]: RPC Server Adding address to whitelist: 192.168.*.* (rpc-server.c:807)
Apr 13 05:27:46 NAS transmission-daemon[19933]: RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:985)
Apr 13 05:27:46 NAS transmission-daemon[19933]: RPC Server Whitelist enabled (rpc-server.c:989)
Apr 13 05:27:46 NAS transmission-daemon[19933]: DHT Reusing old id (tr-dht.c:302)
Apr 13 05:27:46 NAS transmission-daemon[19933]: DHT Bootstrapping from 99 nodes (tr-dht.c:151)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Using settings from "/root/.config/transmission-daemon" (daemon.c:498)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/settings.json" (bencode.c:1716)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Watching "/mnt/array1/download/_watch/" for new .torrent files (daemon.c:530)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Using readdir to watch directory "/mnt/array1/download/_watch/" (watch.c:161)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Loaded 2 torrents (session.c:1903)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:70)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:70)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Found new .torrent file ....torrent" in watchdir "/mnt/array1/download/_watch/" (watch.c:227)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/torrents/....torrent" (bencode.c:1716)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Parsing .torrent file successful ... (daemon.c:264)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Deleting input .torrent file ... (daemon.c:268)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Found new .torrent file ... in watchdir "/mnt/array1/download/_watch/" (watch.c:227)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/torrents/....torrent" (bencode.c:1716)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Parsing .torrent file successfull ....torrent" (daemon.c:264)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Deleting input .torrent file ....torrent" (daemon.c:268)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Found new .torrent file ... in watchdir "/mnt/array1/download/_watch/" (watch.c:227)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/torrents/....torrent" (bencode.c:1716)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Parsing .torrent file successful ....torrent" (daemon.c:264)
Apr 13 05:27:46 NAS transmission-daemon[19933]: Deleting input .torrent file ....torrent" (daemon.c:268)
Apr 13 05:27:47 NAS transmission-daemon[19933]: Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.1.254:8000/upnp/control/igd/wanipc_1_2_1" (upnp.c:113)
Apr 13 05:27:47 NAS transmission-daemon[19933]: Port Forwarding (UPnP) Local Address is "192.168.1.65" (upnp.c:115)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Port Forwarding (UPnP) Port forwarding through "http://192.168.1.254:8000/upnp/control/igd/wanipc_1_2_1", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 192.168.1.65:47100) (upnp.c:221)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Port Forwarding (UPnP) Port forwarding successful! (upnp.c:224)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:95)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Pausing (torrent.c:1731)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/resume/...resume" (bencode.c:1716)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Queued for verification (verify.c:257)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Pausing (torrent.c:1731)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Verifying torrent (verify.c:215)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/resume/....resume" (bencode.c:1716)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Queued for verification (verify.c:257)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Pausing (torrent.c:1731)
Apr 13 05:27:51 NAS transmission-daemon[19933]: Saved "/root/.config/transmission-daemon/resume/s....resume" (bencode.c:1716)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... (verify.c:257)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Verifying torrent (verify.c:215)
Apr 13 05:27:51 NAS transmission-daemon[19933]: ... Verifying torrent (verify.c:215)

Somebody have same issue ?
What can Y do to found the issue ?

Thanks for help and support.
Rikk

Rikk
Posts: 4
Joined: Tue Apr 12, 2011 8:11 pm

Transmission 2.22 (and 2.31) unstable on NAS (LinkStation Mi

Post by Rikk » Sun May 29, 2011 4:16 pm

Dear developpers, I have updated my NAS (ARM processor) with latest release (2.31) and now, transmission-daemon process "work" (means stay in memory).
The first web access show static part torrent interface (texte template).
There are also new error messages (in bold):

Some people seems having same trouble on different configuration:
http://www.readynas.com/forum/viewtopic ... 36&t=51982
http://synoblog.superzebulon.org/2011/0 ... mment-2424

Extrac of log generated with level 4 in configuration file.
May 29 17:48:22 NAS transmission-daemon[14490]: Transmission 2.31 (12441) started (session.c:706)
May 29 17:48:22 NAS transmission-daemon[14490]: RPC Server Adding address to whitelist: 192.168.*.* (rpc-server.c:805)
May 29 17:48:22 NAS transmission-daemon[14490]: RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:805)
May 29 17:48:22 NAS transmission-daemon[14490]: RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:982)

May 29 17:48:22 NAS transmission-daemon[14490]: RPC Server Whitelist enabled (rpc-server.c:986)
May 29 17:48:22 NAS transmission-daemon[14490]: UDP Failed to set receive buffer: requested 4194304, got 206848 (tr-udp.c:75)
May 29 17:48:22 NAS transmission-daemon[14490]: UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:80)==> This line ("net.core.rmem_max = 4194304") is written in sysctl.conf and NAS was reboot after
May 29 17:48:22 NAS transmission-daemon[14490]: UDP Failed to set send buffer: requested 1048576, got 206848 (tr-udp.c:86)
May 29 17:48:22 NAS transmission-daemon[14490]: UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:91)[i]==> This line ("net.core.wmem_max = 1048576") is also written in sysctl.conf [/i]
May 29 17:48:22 NAS transmission-daemon[14490]: DHT Reusing old id (tr-dht.c:305)
May 29 17:48:22 NAS transmission-daemon[14490]: DHT Bootstrapping from 70 nodes (tr-dht.c:153)
May 29 17:48:22 NAS transmission-daemon[14490]: Using settings from "/root/.config/transmission-daemon" (daemon.c:489)
May 29 17:48:22 NAS transmission-daemon[14490]: Saved "/root/.config/transmission-daemon/settings.json" (bencode.c:1722)
May 29 17:48:22 NAS transmission-daemon[14490]: Watching "/mnt/array1/download/_watch/" for new .torrent files (daemon.c:521)
May 29 17:48:22 NAS transmission-daemon[14490]: Using readdir to watch directory "/mnt/array1/download/_watch/" (watch.c:162)
May 29 17:48:23 NAS transmission-daemon[14490]: Loaded 1 torrents (session.c:1901)
May 29 17:48:23 NAS transmission-daemon[14490]: Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72)
May 29 17:48:23 NAS transmission-daemon[14490]: Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72)
May 29 17:48:24 NAS transmission-daemon[14490]: Port Forwarding State changed from "Not forwarded" to "Starting" (port-forwarding.c:93)
May 29 17:50:30 NAS transmission-daemon[14490]: Port Forwarding State changed from "Starting" to "???" (port-forwarding.c:93)

Software used are:
libcurl - 7.21.6-1
libevent - 2.0.11-1
openssh - 5.8p2-1
openssl - 0.9.7m-5
transmission - 2.31-1
zlib - 1.2.5-1

What kind of test/investigation can I do to identify issue/malfunction ?
Thank for any advise !

Rikk

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by rb07 » Sun May 29, 2011 5:50 pm

Those are not error messages, they are recommendations. The message is just telling you that you need some tunning on the operating system.

You can do that on the command line, no need to reboot, this is what I use:

Code: Select all

sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_max=8388608
On a NAS you cannot use /etc/sysctl.conf since it will be overwritten on reboot (because it is really the firmware), but that subject is better left for a NAS forum (I don't know LinkStation). But you can add those 2 commands to your Transmission start-up script, that's probably the easiest solution.

Rikk
Posts: 4
Joined: Tue Apr 12, 2011 8:11 pm

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by Rikk » Sun May 29, 2011 9:20 pm

Thanks for this quick answer. I will try command line for buffer size.

I expect that "my" major issue will be solved with 2.32 version, with this closed ticket: https://trac.transmissionbt.com/ticket/4284

Description
When accessing transmission via the web-frontend, the application crashes with a SIGSEGV inside of libevent, more precise in malloc. Seems like an internal memory segment is overwritten due to too small buffers in earlier allocations.

Investigation shows that there possibly is another memory problem (NULL-pointer access).

Normal operation without remote access mostly works.


Rikk
Last edited by Rikk on Mon May 30, 2011 8:58 pm, edited 1 time in total.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by rb07 » Sun May 29, 2011 9:26 pm

I've never experienced that crash on my NAS, so I doubt its a "major issue".

Username:
Posts: 1
Joined: Mon May 30, 2011 1:15 pm

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by Username: » Mon May 30, 2011 7:22 pm

sysctl -w net.core.rmem_max=8388608
I can see only one "minor" problem with such handling of sockets: as far as I know, this value limits maximum buffer size on socket. Granted that ARM devices are usually memory limited, it look like a bad idea to allow any app to hog whole 8Mb as socket buffer: that's a significant percent of available RAM! Do you understand that very few such sockets can completely trash all RAM into nowhere, so it would be no longer avail to other apps? Also, changing system defaults is a harmful idea on it's own. User-friendly app should work fine with default OS settings. Just my $0.02. Sorry if they do not sound too friendly.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by rb07 » Mon May 30, 2011 7:41 pm

Username:
If you read carefully I said "this is what I use", not "use this" or "recommend..." in fact the original log says to use half that much (4194304). We just assume the user knows what he is doing.

As a data point, my NAS has only 128 MiB and using those parameters have never caused any problem, not even high memory use.

Rikk
Posts: 4
Joined: Tue Apr 12, 2011 8:11 pm

Re: Transmission 2.22 unstable on NAS (LinkStation Mini)

Post by Rikk » Tue May 31, 2011 8:37 pm

the solution to avoid crash is in another topic: viewtopic.php?f=1&t=11664

EVENT_NOEPOLL=1 ./transmission-daemon -f

Now, Transmission works fine.

Rikk

Locked