Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2360 closed Bug (fixed)

Ratio-limit becomes a strange value on uClibc

Reported by: wouzs Owned by: charles
Priority: Normal Milestone: 1.76
Component: libtransmission Version: 1.74
Severity: Normal Keywords:
Cc:

Description

I'm running Transmission 1.74 on OpenWRT 8.09.1 (on a Asus WL-500gP). When I start and close transmission-daemon for the first time, it creates the settings.json file with the default ratio-limit of 2. When I start en close it again the ratio limit becomes a strange value: 214748.3647 Before I ran Transmission 1.73 on the same box, and the same problem appeared with the old version, except for the ratio-limit value. Using Transmission 1.73 the value becomes 721207296.0000

I have some console output to show how to reproduce the bug, in this example I used version 1.73 but the way to reproduce the error is exactly the same with 1.74. This output also shows the packages I have installed.

The Makefile I used to compile Transmission can be found here: https://dev.openwrt.org/browser/packages/net/transmission/Makefile

gebruiker@pc-huiskamer:~$ ssh root@192.168.1.2
root@192.168.1.2's password:


BusyBox v1.11.2 (2009-05-28 19:38:17 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (8.09.1, r16278) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
root@Harry:~# opkg list_installed
base-files-brcm-2.4 - 14.1-r16278 -
bridge - 1.0.6-1 -
busybox - 1.11.2-2.1 -
dnsmasq - 2.47-3 -
dropbear - 0.51-2 -
e2fsprogs - 1.40.11-1 -
firewall - 1-1.1 -
iptables - 1.3.8-4.1 -
iptables-mod-conntrack - 1.3.8-4.1 -
iptables-mod-nat - 1.3.8-4.1 -
kernel - 2.4.35.4-brcm-2.4-1 -
kmod-brcm-wl - 2.4.35.4+4.150.10.5.3-brcm-2.4-3.1 -
kmod-diag - 2.4.35.4-brcm-2.4-4.1 -
kmod-fs-ext3 - 2.4.35.4-brcm-2.4-1 -
kmod-ipt-conntrack - 2.4.35.4-brcm-2.4-1 -
kmod-ipt-core - 2.4.35.4-brcm-2.4-1 -
kmod-ipt-nat - 2.4.35.4-brcm-2.4-1 -
kmod-ipt-nathelper - 2.4.35.4-brcm-2.4-1 -
kmod-ppp - 2.4.35.4-brcm-2.4-1 -
kmod-pppoe - 2.4.35.4-brcm-2.4-1 -
kmod-scsi-core - 2.4.35.4-brcm-2.4-1 -
kmod-switch - 2.4.35.4-brcm-2.4-1.1 -
kmod-usb-core - 2.4.35.4-brcm-2.4-1 -
kmod-usb-printer - 2.4.35.4-brcm-2.4-1 -
kmod-usb-storage - 2.4.35.4-brcm-2.4-1 -
kmod-usb-uhci - 2.4.35.4-brcm-2.4-1 -
kmod-usb2 - 2.4.35.4-brcm-2.4-1 -
kmod-wlcompat - 2.4.35.4+4.150.10.5.3-brcm-2.4-3.1 -
libblkid - 1.40.11-1 -
libcurl - 7.17.1-1 -
libext2fs - 1.40.11-1 -
libgcc - 3.4.6-14.1 -
libintl - 0.16.1-4 -
liblua - 5.1.4-2 -
libncurses - 5.6-1 -
libopenssl - 0.9.8i-3.1 -
libpcre - 7.6-2 -
libpthread - 0.9.29-14.1 -
libsqlite3 - 3.5.9-1 -
libuci - 0.7.3-1 -
libuci-lua - 0.7.3-1 -
libuuid - 1.40.11-1 -
libxml2 - 2.7.2-3 -
lighttpd - 1.4.20-3 -
lua - 5.1.4-2 -
luci-admin-core - 0.8.7-1 -
luci-admin-full - 0.8.7-1 -
luci-admin-mini - 0.8.7-1 -
luci-app-ntpc - 0.8.7-1 -
luci-app-p910nd - 0.8.7-1 -
luci-app-samba - 0.8.7-1 -
luci-cbi - 0.8.7-1 -
luci-core - 0.8.7-1 -
luci-http - 0.8.7-1 -
luci-i18n-english - 0.8.7-1 -
luci-ipkg - 0.8.7-1 -
luci-sgi-cgi - 0.8.7-1 -
luci-sys - 0.8.7-1 -
luci-theme-base - 0.8.7-1 -
luci-theme-openwrt - 0.8.7-1 -
luci-uci - 0.8.7-1 -
luci-uvl - 0.8.7-1 -
luci-web - 0.8.7-1 -
mtd - 8 -
nano - 2.0.7-1 -
nas - 4.150.10.5.3-3.1 -
ntpclient - 2007_365-1 -
nvram - 1 -
opkg - 4564-3.1 -
p910nd - 0.92-1 -
ppp - 2.4.3-11.1 -
ppp-mod-pppoe - 2.4.3-11.1 -
samba3 - 3.0.24-2 -
sudo - 1.7.2-1 -
swap-utils - 2.13.0.1-2 -
transmission-daemon - 1.73-1 -
transmission-web - 1.73-1 -
uci - 0.7.3-1 -
uclibc - 0.9.29-14.1 -
vsftpd - 2.0.6-2 -
wireless-tools - 29-2 -
wlc - 4.150.10.5.3-3.1 -
zlib - 1.2.3-5 -
root@Harry:~# cd ~/.config
root@Harry:~/.config# rm -R transmission-daemon
rm: cannot remove 'transmission-daemon': No such file or directory
root@Harry:~/.config# transmission-daemon
root@Harry:~/.config# ls -l
drwxr-xr-x    1 root     root            0 Aug 14 17:26 transmission-daemon
root@Harry:~/.config# cd transmission-daemon
root@Harry:~/.config/transmission-daemon# killall transmission-daemon
root@Harry:~/.config/transmission-daemon# cat settings.json | grep ratio
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": false,
root@Harry:~/.config/transmission-daemon# ps aux | grep transmission
root@Harry:~/.config/transmission-daemon# transmission-daemon
root@Harry:~/.config/transmission-daemon# ps aux | grep transmission
2485 root      5988 S    transmission-daemon
2486 root      5988 S    transmission-daemon
2487 root      5988 S    transmission-daemon
root@Harry:~/.config/transmission-daemon# cat settings.json | grep ratio
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": false,
root@Harry:~/.config/transmission-daemon# killall transmission-daemon
root@Harry:~/.config/transmission-daemon# ps aux | grep transmission
root@Harry:~/.config/transmission-daemon# cat settings.json | grep ratio
    "ratio-limit": 721207296.0000,
    "ratio-limit-enabled": false,
root@Harry:~/.config/transmission-daemon# exit
Connection to 192.168.1.2 closed.

Attachments (4)

print-statements.diff (1.5 KB) - added by charles 12 years ago.
drop some debugging messages to the terminal
print-statements-2.diff (3.0 KB) - added by charles 12 years ago.
print-statements-3.diff (3.1 KB) - added by charles 12 years ago.
let's try this next…
possible-fix-1.diff (3.6 KB) - added by charles 12 years ago.
replace strtold() and "long double" with strtod() and "double" in JSON_parser.[ch]

Download all attachments as: .zip

Change History (26)

comment:1 Changed 12 years ago by charles

I can't reproduce this. Using the same steps you outlined:

$ cd ~/.config
$ ls -l | grep transmission-daemon
$ ~/src/T/daemon/transmission-daemon 
$ ls -l | grep transmission-daemon
drwxr-xr-x 5 charles charles  4096 Aug 31 11:19 transmission-daemon
$ killall transmission-daemon
$ grep ratio-limit transmission-daemon/settings.json 
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
$ ps -ef | grep transmission-daemon | grep -v grep
$ ~/src/T/daemon/transmission-daemon 
$ ps -ef | grep transmission-daemon | grep -v grep
charles  17322     1  0 11:21 ?        00:00:00 /home/charles/src/T/daemon/transmission-daemon
$ grep ratio-limit transmission-daemon/settings.json 
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
$ killall transmission-daemon
$ ps -ef | grep transmission-daemon | grep -v grep
$ grep ratio-limit transmission-daemon/settings.json 
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": false,

comment:2 Changed 12 years ago by charles

wouzs: if I made a diff that adds some debugging print statements to the daemon, would you be able to make a build with those diffs to test it out?

comment:3 Changed 12 years ago by wouzs

yes, I will try. Can you drop the diff in my email or is it somewhere available for download?

comment:4 Changed 12 years ago by charles

I was wondering, is this bug still occurring in build r9177 and higher?

comment:5 Changed 12 years ago by wouzs

I cheched with build r9251 but the problem still occurs. The strange value now becomes: 721567744.0000

Changed 12 years ago by charles

drop some debugging messages to the terminal

comment:6 Changed 12 years ago by charles

wouzs, I don't understand what's causing this. Could you try rebuilding libtransmission/ and daemon/ with the patch I just attached?

comment:7 Changed 12 years ago by wouzs

I compiled transmission with the patch, the results are as follows:

{{{root@Harry:~# ls -la drwxr-xr-x 1 root root 0 Oct 13 13:52 . drwxr-xr-x 1 root root 0 Aug 14 17:18 .. root@Harry:~# opkg list_installed | grep transmission transmission-daemon - r9251-2 - transmission-web - r9251-2 - root@Harry:~# transmission-daemon -f setting session->desiredRatio to 2.000 [13:52:44.681] RPC Server: Adding address to whitelist: 127.0.0.1 [13:52:44.696] RPC Server: Serving RPC and Web requests on port 9091 [13:52:44.705] RPC Server: Whitelist enabled [13:52:44.713] Transmission 1.75+ (8686) started [13:52:44.727] DHT: Generating new id [13:52:45.078] Port Forwarding (NAT-PMP): initnatpmp succeeded (0) [13:52:45.086] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2) [13:52:53.127] Port Forwarding: State changed from "Not forwarded" to "Starting" [13:52:53.477] Port Forwarding: State changed from "Starting" to "???" key ratio is [2.000] saving floating-point number '2.000' in json [13:52:56.057] Saved "/root/.config/transmission-daemon/settings.json" [13:52:56.063] DHT: Not saving nodes, DHT not ready [13:52:56.064] Port Forwarding: Stopped Closing transmission session... done. root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio

"ratio-limit": 2.0000, "ratio-limit-enabled": false,

root@Harry:~# transmission-daemon -f setting session->desiredRatio to 721567744.000 [13:53:48.072] RPC Server: Adding address to whitelist: 127.0.0.1 [13:53:48.080] RPC Server: Serving RPC and Web requests on port 9091 [13:53:48.088] RPC Server: Whitelist enabled [13:53:48.096] Transmission 1.75+ (8686) started [13:53:48.111] DHT: Generating new id [13:53:48.469] Port Forwarding (NAT-PMP): initnatpmp succeeded (0) [13:53:48.477] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2) key ratio is [721567744.000] saving floating-point number '721567744.000' in json [13:53:56.505] Saved "/root/.config/transmission-daemon/settings.json" [13:53:58.508] Port Forwarding: State changed from "Not forwarded" to "Starting" [13:53:58.509] DHT: Not saving nodes, DHT not ready [13:53:58.510] Port Forwarding: Stopped [13:53:58.510] Port Forwarding: State changed from "Starting" to "???" Closing transmission session... done. root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio

"ratio-limit": 721567744.0000, "ratio-limit-enabled": false,

root@Harry:~# }}}

comment:8 Changed 12 years ago by wouzs

Oops:

root@Harry:~# ls -la
drwxr-xr-x    1 root     root            0 Oct 13 13:52 .
drwxr-xr-x    1 root     root            0 Aug 14 17:18 ..
root@Harry:~# opkg list_installed | grep transmission
transmission-daemon - r9251-2 - 
transmission-web - r9251-2 - 
root@Harry:~# transmission-daemon -f
setting session->desiredRatio to 2.000
[13:52:44.681] RPC Server: Adding address to whitelist: 127.0.0.1
[13:52:44.696] RPC Server: Serving RPC and Web requests on port 9091
[13:52:44.705] RPC Server: Whitelist enabled
[13:52:44.713] Transmission 1.75+ (8686) started
[13:52:44.727] DHT: Generating new id
[13:52:45.078] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[13:52:45.086] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[13:52:53.127] Port Forwarding: State changed from "Not forwarded" to "Starting"
[13:52:53.477] Port Forwarding: State changed from "Starting" to "???"
key ratio is [2.000]
saving floating-point number '2.000' in json
[13:52:56.057] Saved "/root/.config/transmission-daemon/settings.json"
[13:52:56.063] DHT: Not saving nodes, DHT not ready
[13:52:56.064] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# transmission-daemon -f
setting session->desiredRatio to 721567744.000
[13:53:48.072] RPC Server: Adding address to whitelist: 127.0.0.1
[13:53:48.080] RPC Server: Serving RPC and Web requests on port 9091
[13:53:48.088] RPC Server: Whitelist enabled
[13:53:48.096] Transmission 1.75+ (8686) started
[13:53:48.111] DHT: Generating new id
[13:53:48.469] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[13:53:48.477] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
key ratio is [721567744.000]
saving floating-point number '721567744.000' in json
[13:53:56.505] Saved "/root/.config/transmission-daemon/settings.json"
[13:53:58.508] Port Forwarding: State changed from "Not forwarded" to "Starting"
[13:53:58.509] DHT: Not saving nodes, DHT not ready
[13:53:58.510] Port Forwarding: Stopped
[13:53:58.510] Port Forwarding: State changed from "Starting" to "???"
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 721567744.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# 

comment:9 Changed 12 years ago by charles

Well that was unexpected. Let's try print-statements-2.diff now

Changed 12 years ago by charles

comment:10 Changed 12 years ago by wouzs

This is the output with the new patches:

root@Harry:~# ls -la
drwxr-xr-x    1 root     root            0 Oct 13 13:52 .
drwxr-xr-x    1 root     root            0 Aug 14 17:18 ..
root@Harry:~# transmission-daemon -f
setting session->desiredRatio to 2.000
[17:24:15.115] RPC Server: Adding address to whitelist: 127.0.0.1
[17:24:15.247] RPC Server: Serving RPC and Web requests on port 9091
[17:24:15.318] RPC Server: Whitelist enabled
[17:24:15.326] Transmission 1.75+ (8686) started
[17:24:15.362] DHT: Generating new id
[17:24:15.716] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[17:24:15.724] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
key ratio is [2.000]
saving floating-point number '2.000' in json
[17:24:22.180] Saved "/root/.config/transmission-daemon/settings.json"
[17:24:24.175] Port Forwarding: State changed from "Not forwarded" to "Starting"
[17:24:24.183] DHT: Not saving nodes, DHT not ready
[17:24:24.185] Port Forwarding: Stopped
[17:24:24.186] Port Forwarding: State changed from "Starting" to "???"
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# transmission-daemon -f
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:500 strtold gives [721567744]
json.c:96 thinks float_value is 721567744.000000
setting session->desiredRatio to 721567744.000
[17:24:59.499] RPC Server: Adding address to whitelist: 127.0.0.1
[17:24:59.507] RPC Server: Serving RPC and Web requests on port 9091
[17:24:59.516] RPC Server: Whitelist enabled
[17:24:59.524] Transmission 1.75+ (8686) started
[17:24:59.538] DHT: Generating new id
[17:24:59.896] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[17:24:59.904] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[17:25:07.945] Port Forwarding: State changed from "Not forwarded" to "Starting"
[17:25:08.096] Port Forwarding: State changed from "Starting" to "???"
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:500 strtold gives [721567744]
json.c:96 thinks float_value is 721567744.000000
key ratio is [721567744.000]
saving floating-point number '721567744.000' in json
[17:25:23.301] Saved "/root/.config/transmission-daemon/settings.json"
[17:25:23.307] DHT: Not saving nodes, DHT not ready
[17:25:23.308] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 721567744.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# opkg list_installed | grep transmission
transmission-daemon - r9251-3 - 
transmission-web - r9251-3 - 
root@Harry:~# 

comment:11 Changed 12 years ago by charles

Whoa... so passing "2.0000" to strtold returns 721567744. How on earth does that happen...

 JSON_parser.c:491 json parser parsing float [2.0000]
 JSON_parser.c:500 strtold gives [721567744]721567744

Changed 12 years ago by charles

let's try this next...

comment:12 Changed 12 years ago by wouzs

here is the new output :)

root@Harry:~# ls -la
drwxr-xr-x    1 root     root            0 Oct 13 17:24 .
drwxr-xr-x    1 root     root            0 Aug 14 17:18 ..
drwxr-xr-x    1 root     root            0 Oct 13 17:24 .config
root@Harry:~# rm -R .config
root@Harry:~# opkg list_installed | grep trans
transmission-daemon - r9251-4 - 
transmission-web - r9251-4 - 
root@Harry:~# transmission-daemon -f
setting session->desiredRatio to 2.000
[17:50:58.768] RPC Server: Adding address to whitelist: 127.0.0.1
[17:50:58.784] RPC Server: Serving RPC and Web requests on port 9091
[17:50:58.792] RPC Server: Whitelist enabled
[17:50:58.800] Transmission 1.75+ (8686) started
[17:50:58.814] DHT: Generating new id
[17:50:59.106] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[17:50:59.113] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[17:51:07.155] Port Forwarding: State changed from "Not forwarded" to "Starting"
[17:51:07.505] Port Forwarding: State changed from "Starting" to "???"
key ratio is [2.000]
saving floating-point number '2.000' in json
[17:51:10.027] Saved "/root/.config/transmission-daemon/settings.json"
[17:51:10.033] DHT: Not saving nodes, DHT not ready
[17:51:10.036] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# transmission-daemon -f
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:492 json parser parsing float [2.0000]
JSON_parser.c:501 strtold gives [721567744]
json.c:96 thinks float_value is 721567744.000000
setting session->desiredRatio to 721567744.000
[17:51:28.209] RPC Server: Adding address to whitelist: 127.0.0.1
[17:51:28.217] RPC Server: Serving RPC and Web requests on port 9091
[17:51:28.226] RPC Server: Whitelist enabled
[17:51:28.234] Transmission 1.75+ (8686) started
[17:51:28.248] DHT: Generating new id
[17:51:28.606] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[17:51:28.615] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[17:51:36.655] Port Forwarding: State changed from "Not forwarded" to "Starting"
[17:51:36.886] Port Forwarding: State changed from "Starting" to "???"
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:492 json parser parsing float [2.0000]
JSON_parser.c:501 strtold gives [721567744]
json.c:96 thinks float_value is 721567744.000000
key ratio is [721567744.000]
saving floating-point number '721567744.000' in json
[17:51:41.639] Saved "/root/.config/transmission-daemon/settings.json"
[17:51:41.642] DHT: Not saving nodes, DHT not ready
[17:51:41.650] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 721567744.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# 

Is it really not possible that I'm doing something wrong on my openwrt box? To compile the source I simply use the Makefile supplied by the openwrt TRAC.

comment:13 Changed 12 years ago by charles

wouzs: well, that last patch was to print out the entire contents of the string being passed into strtold(), and the string is "2.0000". Why that is becoming 721567744.000000, I'm not sure.

What version of libc does openwrt use? is it glibc, uclibc, or some other?

Changed 12 years ago by charles

replace strtold() and "long double" with strtod() and "double" in JSON_parser.[ch]

comment:14 Changed 12 years ago by charles

wouzs: could you try this new patch?

comment:15 Changed 12 years ago by wouzs

In my first post I included a list of all the packages I have installed. It includes uclibc 0.9.29. I will try your newest patch now!

comment:16 Changed 12 years ago by wouzs

Looks like your patch works!

root@Harry:~# ls -la
drwxr-xr-x    1 root     root            0 Oct 13 17:50 .
drwxr-xr-x    1 root     root            0 Aug 14 17:18 ..
root@Harry:~# opkg list_installed | grep transmission
transmission-daemon - r9251-5 - 
transmission-web - r9251-5 - 
root@Harry:~# transmission-daemon -f
setting session->desiredRatio to 2.000
[14:49:58.180] RPC Server: Adding address to whitelist: 127.0.0.1
[14:49:58.196] RPC Server: Serving RPC and Web requests on port 9091
[14:49:58.204] RPC Server: Whitelist enabled
[14:49:58.212] Transmission 1.75+ (8686) started
[14:49:58.225] DHT: Generating new id
[14:49:58.577] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[14:49:58.584] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[14:50:06.625] Port Forwarding: State changed from "Not forwarded" to "Starting"
[14:50:06.976] Port Forwarding: State changed from "Starting" to "???"
key ratio is [2.000]
saving floating-point number '2.000' in json
[14:50:07.933] Saved "/root/.config/transmission-daemon/settings.json"
[14:50:07.939] DHT: Not saving nodes, DHT not ready
[14:50:07.946] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# transmission-daemon -f
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:492 json parser parsing float [2.0000]
JSON_parser.c:501 strtold gives [2]
json.c:96 thinks float_value is 2.000000
setting session->desiredRatio to 2.000
[14:50:26.159] RPC Server: Adding address to whitelist: 127.0.0.1
[14:50:26.167] RPC Server: Serving RPC and Web requests on port 9091
[14:50:26.176] RPC Server: Whitelist enabled
[14:50:26.182] Transmission 1.75+ (8686) started
[14:50:26.196] DHT: Generating new id
[14:50:26.557] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[14:50:26.565] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[14:50:34.606] Port Forwarding: State changed from "Not forwarded" to "Starting"
[14:50:34.956] Port Forwarding: State changed from "Starting" to "???"
JSON_parser.c:491 json parser parsing float [2.0000]
JSON_parser.c:492 json parser parsing float [2.0000]
JSON_parser.c:501 strtold gives [2]
json.c:96 thinks float_value is 2.000000
key ratio is [2.000]
saving floating-point number '2.000' in json
[14:50:37.105] Saved "/root/.config/transmission-daemon/settings.json"
[14:50:37.107] DHT: Not saving nodes, DHT not ready
[14:50:37.115] Port Forwarding: Stopped
Closing transmission session... done.
root@Harry:~# cat .config/transmission-daemon/settings.json | grep ratio
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
root@Harry:~# 

But it's strange the bug doesn't occur on other systems. Is this bug something that should be reported to the openwrt or the uclibc developers?

comment:17 Changed 12 years ago by charles

comment:18 Changed 12 years ago by charles

  • Component changed from Daemon to libtransmission
  • Keywords backport added; ratio-limit removed
  • Owner set to charles
  • Status changed from new to assigned
  • Summary changed from Ratio-limit becomes a strange value to Ratio-limit becomes a strange value on uClibc

...and reported upstream to JSON_parser's author as a courtesy FYI.

Fixed in trunk by r9307 for 1.80.

comment:19 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.80
  • Resolution set to fixed
  • Status changed from assigned to closed

comment:20 Changed 12 years ago by charles

  • Milestone changed from 1.80 to 1.76

backported to the 1.7x branch for 1.76 by r9359

comment:21 Changed 12 years ago by charles

  • Keywords backport removed

comment:22 Changed 12 years ago by charles

wouzs: this issue has been closed upstream due to lack of information. If you feel this is still an issue on uClibc, you may want to see if you can help them.

https://bugs.busybox.net/show_bug.cgi?id=659

Note: See TracTickets for help on using tickets.