Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#2122 closed Bug (fixed)

Crashes at session.c:691 - tr_sessionInitImpl: Controltest 'found' fails.

Reported by: Redge Owned by:
Priority: Normal Milestone:
Component: libtransmission Version: 1.60
Severity: Normal Keywords:
Cc:

Description

I've been running the standard Jaunty released transmission, but wanted to try something a little bit more cutting edge. So I added the PPA to my sources.list, upgraded transmission and... transmission didn't start anymore.

Error message (with translation from Dutch):

transmission: session.c:691: tr_sessionInitImpl: Controletest 'found' faalt. (faalt=fails) Afgebroken (don't know good translation... broken off?)

I tried latest stable ubuntu archive (1.61-0ubuntu0~jaunty0) and nightly build (1.70-0ubuntu0~jaunty0~svn8532): in the nightly the line number is 767, otherwise the same error.

Did something go wrong during my upgrade, or is this a known bug?

Attachments (1)

settings.json (3.3 KB) - added by Redge 13 years ago.
settings.json (real one)

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by Redge

  • Summary changed from Crashes at session.c:691 - tr_sessionInitImpl: Controletest 'found' fails. to Crashes at session.c:691 - tr_sessionInitImpl: Controltest 'found' fails.

ALso submitted the bug to Ubuntu transmission team: https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/381050

comment:2 follow-up: Changed 13 years ago by charles

Please attach your settings.json to this ticket...

comment:3 Changed 13 years ago by charles

This crash occurs here:

    found = tr_bencDictFindReal( &settings, TR_PREFS_KEY_RATIO, &d )
         && tr_bencDictFindBool( &settings, TR_PREFS_KEY_RATIO_ENABLED, &boolVal );
    assert( found );

in tr_sessionInitImpl(), after calling tr_sessionGetDefaultSettings(), which does this:

    tr_bencDictAddReal( d, TR_PREFS_KEY_RATIO,                    2.0 );
    tr_bencDictAddBool( d, TR_PREFS_KEY_RATIO_ENABLED,            FALSE );

So something is happening which causes those defaults to be lost -- possibly something in your settings.json file.

Also, are you using the gui client, or the daemon?

comment:4 follow-up: Changed 13 years ago by Redge

Tried to run the GTK GUI. First time daemon was running, but second time I made sure it was off (SIGTERM).

I'll try upgrade then reboot, will report back with results tomorrow.

comment:5 in reply to: ↑ 2 Changed 13 years ago by Redge

Replying to charles:

Please attach your settings.json to this ticket...

Couldn't seem to find one.

$ ls ~/.transmission/gtk

-rw-r--r-- 1 0 2009-03-23 22:06 lock -rw-r--r-- 1 608 2009-03-23 22:06 prefs.ini srwxr-xr-x 1 0 2009-03-23 22:06 socket=

Contents of prefs.ini:

[general] max-peers-global=200 max-peers-per-torrent=50 show-toolbar=true show-filter-bar=true show-status-bar=true status-bar-stats=total-ratio download-limit-enabled=false download-limit=100 upload-limit-enabled=false upload-limit=50 prompt-for-download-directory=false default-download-directory=/home/romke/Bureaublad listening-port=51413 nat-traversal-enabled=true pex-enabled=true system-tray-icon-enabled=true prompt-before-exit=true encrypted-connections-only=false add-behavior-standard=copy add-behavior-ipc=copy debug-message-level=2 sort-mode=sort-by-name sort-reversed=false minimal-view=false

comment:6 in reply to: ↑ 4 ; follow-up: Changed 13 years ago by Redge

Replying to Redge:

Tried to run the GTK GUI. First time daemon was running, but second time I made sure it was off (SIGTERM).

I'll try upgrade then reboot, will report back with results tomorrow.

Reboot did not work. I'll try purging ubuntu transmission package.

comment:7 Changed 13 years ago by Redge

Found /etc/transmission-daemon/settings.json, but these settings don't correspond to what I'm used to with the GUI.

{
    "0.0.0.0": "0.0.0.0", 
    "::": "::", 
    "alt-speed-down": 50, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 540, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1020, 
    "alt-speed-up": 50, 
    "bind-address-ipv4": "0.0.0.0", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "dht-enabled": 1, 
    "download-dir": "\/var\/lib\/transmission-daemon\/downloads", 
    "download-limit": 100, 
    "download-limit-enabled": 0, 
    "encryption": 1, 
    "lazy-bitfield-enabled": true, 
    "max-peers-global": 200, 
    "message-level": 2, 
    "open-file-limit": 32, 
    "peer-limit-global": 240, 
    "peer-limit-per-torrent": 60, 
    "peer-port": 51413, 
    "peer-port-random-enabled": 0, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 1024, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": 0, 
    "pex-enabled": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "proxy": "", 
    "proxy-auth-enabled": false, 
    "proxy-auth-password": "", 
    "proxy-auth-username": "", 
    "proxy-enabled": false, 
    "proxy-port": 80, 
    "proxy-type": 0, 
    "ratio-limit": 2.000000, 
    "ratio-limit-enabled": false, 
    "rpc-authentication-required": true, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "{9f78401acc1074c2756139e6ffe25f744fc1a26fyQjzWm9b", 
    "rpc-port": 9091, 
    "rpc-username": "transmission", 
    "rpc-whitelist": "127.0.0.1", 
    "rpc-whitelist-enabled": true, 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 100, 
    "speed-limit-up-enabled": false, 
    "upload-limit": 100, 
    "upload-limit-enabled": 0, 
    "upload-slots-per-torrent": 14
}

comment:8 Changed 13 years ago by Redge

Ah, found ~/.config/transmission/settings.json

So many config files/directories. Hard to tell which is which.

Changed 13 years ago by Redge

settings.json (real one)

comment:9 in reply to: ↑ 6 Changed 13 years ago by Redge

  • Resolution set to fixed
  • Status changed from new to closed

Replying to Redge:

Replying to Redge:

Tried to run the GTK GUI. First time daemon was running, but second time I made sure it was off (SIGTERM).

I'll try upgrade then reboot, will report back with results tomorrow.

Reboot did not work. I'll try purging ubuntu transmission package.

That did it. Purged old ubuntu transmission package, removed ~/.transmission and ~/.config/transmission, installed new package from latest stable, restored settings to ~/.config/transmission: GUI works, torrents restored.

comment:10 Changed 13 years ago by charles

  • Component changed from Transmission to libtransmission
  • Milestone changed from None Set to 1.70
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:11 Changed 13 years ago by charles

I'm able to reproduce the crash given the settings.json file you included. It seems that the use of a comma as a decimal point is giving the json parser fits, since the json spec required a period:

62        "ratio-limit": "1,000000",
63        "ratio-limit-enabled": 1, 

So the question is, how did that comma get in there... looking through the code, I thought this had been safeguarded against:

static void
jsonRealFunc( const tr_benc * val, void * vdata )
{
    struct jsonWalk * data = vdata;
    char locale[128];

    if( fabs( val->val.d ) < 0.00001 )
        evbuffer_add( data->out, "0", 1 );
    else {
        /* json requires a '.' decimal point regardless of locale */
        tr_strlcpy( locale, setlocale( LC_NUMERIC, NULL ), sizeof( locale );
        setlocale( LC_NUMERIC, "POSIX" );
        evbuffer_add_printf( data->out, "%.4f", val->val.d );
        setlocale( LC_NUMERIC, locale );
    }

    jsonChildFunc( data );
}

comment:12 Changed 13 years ago by charles

  • Milestone 1.70 deleted
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Version changed from 1.61 to 1.60

Okay, I finally found the problem after a lot of testing. This behavior occurs if and only if you go from 1.5x -> 1.6x -> 1.5x -> 1.6x on the same config file. :)

Fixed in r8556 for 1.54.

This bug does not affect Transmission 1.60 or higher.

comment:13 Changed 13 years ago by charles

Correction to the last comment:

The bug only occurs if you are in a locale that doesn't use a period as a decimal point, and go from 1.5x -> 1.6x -> 1.5x -> 1.6x on the same config file...

comment:14 Changed 12 years ago by sim

decoration Changed 1 year ago by admin

bathtub Changed 1 year ago by admin

solar system Changed 1 year ago by admin

stair parts Changed 1 year ago by admin

solar supply Changed 1 year ago by admin

Version 0, edited 12 years ago by sim (next)
Note: See TracTickets for help on using tickets.