Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transmission-daemon 2.92: segfault in scrape_request_delegate() at announcer.c:1402 #297

Closed
sandrotosi opened this issue May 28, 2017 · 16 comments

Comments

@sandrotosi
Copy link

sandrotosi commented May 28, 2017

Hello,
this has been reported to Debian as http://bugs.debian.org/857511:

  1. These segfaults have happened 11 times on my system since Feb 26; the /var/log/syslog* have been rotated so that I can not check whether segfault has happened before Feb 26. These segfaults happened randomly.

    I have collected 6 cores of segfaults. Next description will use core.4 as example.

  2. transmission-daemon started on 2017-03-11 09:29:27 using:

    $ ulimit -c unlimited
    $ > ~/tmp/transmission.log ; transmission-daemon --logfile ~/tmp/transmission.log --log-debug
    

    Message in syslog related to core.4 (the segfault on 08:11:32 have no core file saved):

    $ zgrep segfault /var/log/syslog.1
    Mar 11 08:11:32 archon kernel: [  408.155176] transmission-da[2572]: segfault at 0 ip 00007f2850fe4a0c sp 00007f284bfaeaf8 error 4 in libc-2.24.so[7f2850e9c000+195000]
    Mar 11 09:34:01 archon kernel: [ 5356.546761] transmission-da[14443]: segfault at 0 ip 00007f6df7849a0c sp 00007f6df2813af8 error 4 in libc-2.24.so[7f6df7701000+195000]
    

    The attachment is the gdb backtrace generated with following command:

    $ gdb --batch -ex "bt" -ex "bt full" -ex "thread apply all bt full" \
      -ex "quit" transmission-daemon core.4 &> core.4.backtrace-log
    
  3. Here are some investigation by myself.

    The request 0x7f6decb08fc0 used by scrape_request_delegate():

    (gdb) p *((const tr_scrape_request *) 0x7f6decb08fc0)
    $1 = {url = 0x0, log_name = "[FILENAME_OF_TORRENT_REMOVED---http://354.354.354.354:75535]", '\000' <repeats 56 times>, info_hash = {
        "{INFO_HASH_REMOVED_1",
        "INFO_HASH_REMOVED_2",
        "INFO_HASH_REMOVED_3",
        '\000' <repeats 19 times> <repeats 61 times>}, info_hash_count = 3}
    

    Note that some text is changed due to private reason. Obviously, segfault happens because of request->url is NULL(0x0) and is compared with "http" using memcmp() (announcer.c:1402).

    The request 0x7f6decb08fc0 is the 2nd element of local variable requests(0x7f6decb08a30) of function multiscrape():

    (gdb) p &((const tr_scrape_request *) 0x7f6decb08a30)[1]
    $4 = (const tr_scrape_request *) 0x7f6decb08fc0
    

    The request 0x7f6decb08fc0 is likely build from tr_tier (tr_ptrArray *) 0x7f6df2813b60)->items[1] as the hash, name and tracker are matched:

    (gdb) p (((tr_tier *) ((tr_ptrArray *)0x7f6df2813b60)->items[1])->tor->info->hash)
    $11 = "{INFO_HASH_REMOVED_1"
    (gdb) p (((tr_tier *) ((tr_ptrArray *)0x7f6df2813b60)->items[1])->tor->info->name)
    $13 = 0x7f6dec3fb110 "FILENAME_OF_TORRENT_REMOVED"
    (gdb) p *(((tr_tier *) ((tr_ptrArray *)0x7f6df2813b60)->items[1])->currentTracker)
    $14 = {key = 0x7f6dec4f5ba0 "http://354.354.354.354:75535",
      announce = 0x7f6dec4f5ae0 "http://354.354.354.354:75535/annonuce", scrape = 0x0,
      tracker_id_str = 0x0, seederCount = -1, leecherCount = -1, downloadCount = -1,
      downloaderCount = 0, consecutiveFailures = 0, id = 59}
    

    The torrent of this tr_tier:

    (gdb) p *(((tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1])->tor)
    $15 = {session = 0x560e62f8a920, info = {totalSize = 176553400,
        originalName = 0x7f6dec3fb150 "FILENAME_OF_TORRENT_REMOVED",
        name = 0x7f6dec3fb110 "FILENAME_OF_TORRENT_REMOVED",
        torrent = 0x7f6dec46f990 "/home/kralcyor/.config/transmission-daemon/torrents/FILENAME_OF_TORRENT_REMOVED.7b8d920ba22ab7a5.torrent",
        webseeds = 0x0, comment = 0x7f6dec32f450 "",
        creator = 0x7f6dec3fb190 "rin-pr/0.5.1", files = 0x7f6dec2b2700,
        pieces = 0x7f6dec468c90, trackers = 0x7f6dec46e0e0,
        dateCreated = 1485837788, trackerCount = 68, webseedCount = 0,
        fileCount = 1, pieceSize = 262144, pieceCount = 674,
        hash = "{INFO_HASH_REMOVED_1",
        hashString = "HASH_STRING_REMOVED_1",
        isPrivate = false, isFolder = false}, magicNumber = 95549,
      error = TR_STAT_OK, errorString = '\000' <repeats 127 times>,
      errorTracker = '\000' <repeats 127 times>,
      obfuscatedHash = "OBFUSCATED_HASH_REMOVED_1",
      incompleteMetadata = 0x0, peer_id = "-TR2920-k0igydl6wtr0",
      peer_id_creation_time = 1489195834,
      downloadDir = 0x7f6dec45df80 "DOWNLOAD_DIR_REMOVED",
      incompleteDir = 0x0, infoDictLength = 13587, infoDictOffset = 0,
      currentDir = 0x7f6dec45df80 "DOWNLOAD_DIR_REMOVED",
      blockSize = 16384, blockCount = 10776, lastBlockSize = 15800,
      lastPieceSize = 130488, blockCountInPiece = 16, blockCountInLastPiece = 8,
      completion = {tor = 0x7f6dec46fa10, blockBitfield = {bits = 0x0,
          alloc_count = 0, bit_count = 10776, true_count = 10776,
          have_all_hint = true, have_none_hint = false},
        sizeWhenDoneLazy = 176553400, sizeWhenDoneIsDirty = true,
        haveValidLazy = 0, haveValidIsDirty = true, sizeNow = 176553400},
      completeness = TR_SEED, tiers = 0x7f6dec46f490, dhtAnnounceAt = 1489197288,
      dhtAnnounce6At = 1489197384, dhtAnnounceInProgress = false,
      dhtAnnounce6InProgress = false, lpdAnnounceAt = 1489195767,
      downloadedCur = 0, downloadedPrev = 180364824, uploadedCur = 0,
      uploadedPrev = 1582164452, corruptCur = 0, corruptPrev = 0,
      etaDLSpeedCalculatedAt = 0, etaDLSpeed_Bps = 0, etaULSpeedCalculatedAt = 0,
      etaULSpeed_Bps = 0, addedDate = 1485844188, activityDate = 1488957740,
      doneDate = 1485844394, startDate = 1489195767, anyDate = 1489195767,
      secondsDownloading = 226, secondsSeeding = 401015, queuePosition = 70,
      metadata_func = 0x0, metadata_func_user_data = 0x0, completeness_func = 0x0,
      completeness_func_user_data = 0x0, ratio_limit_hit_func = 0x0,
      ratio_limit_hit_func_user_data = 0x0, idle_limit_hit_func = 0x0,
      idle_limit_hit_func_user_data = 0x0, queue_started_user_data = 0x0,
      queue_started_callback = 0x0, isRunning = true, isStopping = false,
      isDeleting = false, startAfterVerify = false, isDirty = true,
      isQueued = false, magnetVerify = false, infoDictOffsetIsCached = false,
      maxConnectedPeers = 60, verifyState = TR_VERIFY_NONE, lastStatTime = 0,
      stats = {id = 0, activity = TR_STATUS_STOPPED, error = TR_STAT_OK,
        errorString = '\000' <repeats 511 times>, recheckProgress = 0,
        percentComplete = 0, metadataPercentComplete = 0, percentDone = 0,
        seedRatioPercentDone = 0, rawUploadSpeed_KBps = 0,
        rawDownloadSpeed_KBps = 0, pieceUploadSpeed_KBps = 0,
        pieceDownloadSpeed_KBps = 0, eta = 0, etaIdle = 0, peersConnected = 0,
        peersFrom = {0, 0, 0, 0, 0, 0, 0}, peersSendingToUs = 0,
        peersGettingFromUs = 0, webseedsSendingToUs = 0, sizeWhenDone = 0,
        leftUntilDone = 0, desiredAvailable = 0, corruptEver = 0,
        uploadedEver = 0, downloadedEver = 0, haveValid = 0, haveUnchecked = 0,
        manualAnnounceTime = 0, ratio = 0, addedDate = 0, doneDate = 0,
        startDate = 0, activityDate = 0, idleSecs = 0, secondsDownloading = 0,
        secondsSeeding = 0, finished = false, queuePosition = 0,
        isStalled = false}, next = 0x7f6dec467b80, uniqueId = 71, bandwidth = {
        band = {{isLimited = false, honorParentLimits = true, bytesLeft = 0,
            desiredSpeed_Bps = 500000, raw = {newest = 5, transfers = {{date = 0,
                  size = 0}, {date = 1489195836133, size = 116}, {
                  date = 1489195836714, size = 105}, {date = 1489195836985,
                  size = 314}, {date = 1489195838143, size = 98}, {
                  date = 1489195865149, size = 96}, {date = 0, size = 0}, {
                  date = 0, size = 0}, {date = 0, size = 0}, {date = 0,
                  size = 0}}, cache_time = 0, cache_val = 0}, piece = {newest = 0,
              transfers = {{date = 0, size = 0}, {date = 0, size = 0}, {date = 0,
                  size = 0}, {date = 0, size = 0}, {date = 0, size = 0}, {
                  date = 0, size = 0}, {date = 0, size = 0}, {date = 0, size = 0},
                {date = 0, size = 0}, {date = 0, size = 0}}, cache_time = 0,
              cache_val = 0}}, {isLimited = false, honorParentLimits = true,
            bytesLeft = 0, desiredSpeed_Bps = 50000, raw = {newest = 5,
              transfers = {{date = 0, size = 0}, {date = 1489195836133,
                  size = 417}, {date = 1489195836714, size = 264}, {
                  date = 1489195837462, size = 96}, {date = 1489195838143,
                  size = 146}, {date = 1489195865149, size = 96}, {date = 0,
                  size = 0}, {date = 0, size = 0}, {date = 0, size = 0}, {
                  date = 0, size = 0}}, cache_time = 0, cache_val = 0}, piece = {
              newest = 0, transfers = {{date = 0, size = 0}, {date = 0, size = 0},
                {date = 0, size = 0}, {date = 0, size = 0}, {date = 0, size = 0}, {
                  date = 0, size = 0}, {date = 0, size = 0}, {date = 0, size = 0},
                {date = 0, size = 0}, {date = 0, size = 0}}, cache_time = 0,
              cache_val = 0}}}, parent = 0x560e62f8ab28, priority = 0 '\000',
        magicNumber = 43143, uniqueKey = 71, session = 0x560e62f8a920, children = {
          items = 0x7f6deca9c410, n_items = 0, n_alloc = 32}, peer = 0x0},
      swarm = 0x7f6dec46f570, desiredRatio = 2,
      ratioLimitMode = TR_RATIOLIMIT_GLOBAL, idleLimitMinutes = 30,
      idleLimitMode = TR_IDLELIMIT_GLOBAL, finishedSeedingByIdle = false}
    

    This tr_tier is the 52nd tier of its torrent:

    (gdb) p &(((tr_tier *) ((tr_ptrArray *)0x7f6df2813b60)->items[1])->tor)->tiers->tiers[51]
    $17 = (tr_tier *) 0x7f6dec4fb590
    (gdb) p (tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1]
    $18 = (tr_tier *) 0x7f6dec4fb590
    

    This tr_tier has two trackers:

    (gdb) p *((tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1])
    $19 = {byteCounts = {0, 0, 0}, trackers = 0x7f6dec45ed40, tracker_count = 2,
      currentTracker = 0x7f6dec45ed78, currentTrackerIndex = 1,
      tor = 0x7f6dec46fa10, scrapeAt = 1489195810,
      lastScrapeStartTime = 1489196040, lastScrapeTime = 0,
      lastScrapeSucceeded = false, lastScrapeTimedOut = false,
      announceAt = 1489196040, manualAnnounceAllowedAt = 1489196160,
      lastAnnounceStartTime = 0, lastAnnounceTime = 1489196040,
      lastAnnounceSucceeded = false, lastAnnounceTimedOut = false,
      announce_events = 0x7f6dec4614a0, announce_event_count = 1,
      announce_event_alloc = 4, key = 708, scrapeIntervalSec = 1800,
      announceIntervalSec = 600, announceMinIntervalSec = 120,
      lastAnnouncePeerCount = 0, isRunning = false, isAnnouncing = false,
      isScraping = true, wasCopied = false,
      lastAnnounceStr = "Connection failed", '\000' <repeats 110 times>,
      lastScrapeStr = '\000' <repeats 127 times>}
    

    The first tracker is:

    (gdb) p ((tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1])->trackers[0]
    $21 = {key = 0x7f6dec4f5f50 "udp://354.354.354.354:75535",
      announce = 0x7f6dec4f5a80 "udp://354.354.354.354:75535/annonuce",
      scrape = 0x7f6dec4f5ab0 "udp://354.354.354.354:75535/annonuce",
      tracker_id_str = 0x0, seederCount = -1, leecherCount = -1,
      downloadCount = -1, downloaderCount = 0, consecutiveFailures = 1, id = 60}
    

    Note that the scrape URL of this tracker is available. The second tracker is:

    (gdb) p ((tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1])->trackers[1]
    $22 = {key = 0x7f6dec4f5ba0 "http://354.354.354.354:75535",
      announce = 0x7f6dec4f5ae0 "http://354.354.354.354:75535/annonuce",
      scrape = 0x0, tracker_id_str = 0x0, seederCount = -1, leecherCount = -1,
      downloadCount = -1, downloaderCount = 0, consecutiveFailures = 0, id = 59}
    

    Note that the scrape URL of this tracker is NULL(0x0).

    The current tracker is pointed to trackers[1]:

    (gdb) p *(((tr_tier *) ((tr_ptrArray *) 0x7f6df2813b60)->items[1])->currentTracker)
    $24 = {key = 0x7f6dec4f5ba0 "http://354.354.354.354:75535",
      announce = 0x7f6dec4f5ae0 "http://354.354.354.354:75535/annonuce",
      scrape = 0x0, tracker_id_str = 0x0, seederCount = -1, leecherCount = -1,
      downloadCount = -1, downloaderCount = 0, consecutiveFailures = 0, id = 59}
    
  4. 11 segfaults all happened at 0 ip xxxa0c sp xxxaf8 error 4 in libc-2.24.so[xxx000+195000]. 6 core files correspond to 3 different torrents. The tr_tier all have two trackers; one is udp://, the other is http://. All trackers are unable to connect.

  5. If it is needed, I can provide core files via private email. And I have a debug logfile logged using "transmission-daemon --logfile /home/kralcyor/tmp/transmission.log --log-debug" for segfault of core.4; though it seems useless. If it is needed, I can also provide this logfile via private email.

core.4.backtrace-log.txt

@cfpp2p
Copy link

cfpp2p commented May 28, 2017

3a17304

@sandrotosi
Copy link
Author

oooh that was fixed several months ago, maybe it's time to release a new version of transmission? :)

@kralcyor
Copy link

I am the original reporter.

I have not applied the commit(as it is rejected and need many modifications to make it works), but I think it seems that the commit will not fix.

The request->url is NULL(0x0); this causes memcmp() to segfault and is likely also cause strncmp() to segfault.

@cfpp2p
Copy link

cfpp2p commented May 29, 2017

@kralcyor Yes, I'm looking at the ramifications of changes to announcer.c from 2321bc3#diff-fd407c43b2a26523e0a5ebd68cc60a14 something about this particular commit doesn't look right to me as I look at it right now, but I'm not sure. I'll do some more analysis.

@cfpp2p
Copy link

cfpp2p commented May 29, 2017

The only way I might see tier->currentTracker->scrape inadvertently set to NULL
after passing through tierNeedsToScrape() might be from tr_announcerResetTorrent().
As perhaps a repeated automated script accessing add or replace trackers and resulting tr_torrentSetAnnounceList().

@kralcyor
Copy link

kralcyor commented May 30, 2017

It seems that I do not use any script.

I guess what happened may like:

tier->currentTracker is pointed to "udp://" which has a non-NULL scrape URL.
The scrape URL is passed tierNeedsToScrape() check and the tier is appended to scrapeMe.(announcer.c:1538)

tier->currentTracker is annouced by tierAnnounce() and failed.(announcer.c:1554)
tierIncrementTracker() is called by on_announce_error();
this cause tier->currentTracker point to "http://" which has a NULL scrape URL.

Now tier->currentTracker is scraped by multiscrape() and cause segfault.(announcer.c:1558)

The attachments are new logs run by:

$ ulimit -c unlimited
$ export TR_DEBUG_FD=2
$ > ~/tmp/transmission.log ; transmission-daemon -f --logfile ~/tmp/transmission.log --log-debug 2> ~/tmp/transmission.runlog
$ cat ~/tmp/transmission.log | grep announcer.c | grep -C 20 "2017-05-29 19:34:52.057" > ~/tmp/transmission.log-part2
$ cat ~/tmp/transmission.runlog | grep announcer.c | grep -C 200 "19:34:51.683" > ~/tmp/transmission.runlog-part2

Some text changed.
I have applied a custom patch(attached) to avoid segfault.

The questioned torrents are NULL_FILENAME_1 and NULL_FILENAME_2, and tracker are udp://NULl_IP_PORT and http://NULl_IP_PORT.

Segfault is about to happen at transmission.log-part2:42-3.
The time is slightly different between the two logs.
In transmission.log-part2, the time is 19:34:52.057; in transmission.runlog-part2, the time is 19:34:51.684.

From transmission.runlog-part2:211-212(corresponding to transmission.log-part2:26), it is clear that udp://NULl_IP_PORT is fail to announce then tier->currentTracker is changed to http://NULl_IP_PORT.

transmission-log.txt
transmission-runlog.txt

avoid_request_null_scrape-patch.txt

@kralcyor
Copy link

Please note that some strings containing NULL_FILENAME_1 is truncated and may have no URL as NULL_FILENAME_1 is very long.

@cfpp2p
Copy link

cfpp2p commented May 31, 2017

@kralcyor Thanks for the information. I don't see that bug TRAC-6127 affects this situation but I think I see evidence of it in your logs.Could you please try the below patch and inform as to results with your situation. I'm continuing to investigate based on your analysis above. Thanks.

    /* send the requests we just built */
    for (int i = 0; i < request_count; ++i)
    {
        --announcer->slotsAvailable;
        scrape_request_delegate(announcer, &requests[i], on_scrape_done, announcer->session);
    }

ref: cfpp2p/transmission@83bca0a

@kralcyor
Copy link

kralcyor commented Jun 1, 2017

@cfpp2p After applied the patch, still have the problem.

@kralcyor
Copy link

kralcyor commented Jun 1, 2017

I have found a way to reproduce this issue in a fresh debootstrap Debian environment. Hope it helps.
And as now they contain no private informations, I can provide whole, untouched logs and core files if they are needed.

Way to reproduce this issue:
0.1 Set up udp://127.0.0.1:23810 and http://127.0.0.1:23810 as unreachable trackers
It seems that transmission-daemon will not segfault without these two commands.

$ sudo iptables -I INPUT -p udp --dport 23810 -j DROP 
$ sudo iptables -I INPUT -p tcp --dport 23810 -j DROP 

0.2 Set up debootstrap chroot

$ sudo debootstrap --variant=minbase sid sid/ http://ftp.debian.org/debian 
$ sudo mount -t proc proc sid/proc 
$ sudo mount -t sysfs sys sid/sys 
$ sudo mount -o bind /dev sid/dev 
$ sudo mount -t devpts pts sid/dev/pts 
$ sudo chroot sid/ su - 

Now as root in chroot.

# apt install transmission-daemon transmission-cli 
# adduser trans 
# exit
  1. Run transmission-daemon
    $ sudo chroot sid su - trans
    Now as trans in chroot.
$ ulimit -c unlimited 
$ transmission-daemon --logfile ~/transmission.log
$ mkdir Downloads 
$ cd Downloads/
$ for i in {0..99} 
> do 
> dd if=/dev/urandom of=file${i} bs=1M count=1 
> transmission-create -o file${i}.torrent -t udp://127.0.0.1:23810 -t http://127.0.0.1:23810 file${i} 
> transmission-remote --add file${i}.torrent 
> sleep 0.4 
> done

transmission-daemon usually will segfault in 15 minutes after this point.

@cfpp2p
Copy link

cfpp2p commented Jun 1, 2017

I'm not able to trigger a call to multiscrape() with tierIncrementTracker() preceding. Perhaps the issue might be a socket and timeout problem related to threading.

@kralcyor What happens if you use REJECT instead of DROP with iptables? Try with 47, 48 or 49 torrents (instead of 100 torrents) or more or less until finding a trigger point number of torrents for the segfault.

    /* how many web tasks we allow at one time */
    MAX_CONCURRENT_TASKS = 48,

@mikedld
Copy link
Member

mikedld commented Jun 1, 2017

The way I see it, HTTP tracker's tr_tracker_info::scrape is NULL right after metainfo loading since that is what tr_convertAnnounceToScrape (metainfo.c) returns: URL doesn't end in "/announce" (path is "/annonuce" in the original post unless it's an OPs mistake, and "/" in latter repro steps) and doesn't start with "udp:" either. Initializing tr_tracker::scrape from that uses tr_strdup which returns NULL as well.

What's interesting is how we end up scraping this tracker, as announceMore (announcer.c) explicitly checks (in tierNeedsToScrape) for scrape to be non-NULL before adding the item to scrapeMe array which then gets passed to multiscrape and then scrape_request_delegate. My current thinking is that it has to do with threading as well: tr_tier::currentTracker pointer changes between calls to tierNeedsToScrape (where it points to UDP tracker which has valid scrape URL and thus tier is added to scrapeMe array) and multiscrape (where it now points to HTTP tracker with NULL scrape URL).

@cfpp2p
Copy link

cfpp2p commented Jun 2, 2017

My current thinking is that it has to do with threading as well: tr_tier::currentTracker pointer changes between calls to tierNeedsToScrape (where it points to UDP tracker which has valid scrape URL and thus tier is added to scrapeMe array) and multiscrape (where it now points to HTTP tracker with NULL scrape URL).

@mikedld opinion?
@kralcyor could you test this?

static void announceMore(tr_announcer* announcer)
{
    int n;
    tr_torrent* tor;
    tr_ptrArray announceMe = TR_PTR_ARRAY_INIT;
    tr_ptrArray scrapeMe = TR_PTR_ARRAY_INIT;
    time_t const now = tr_time();

    dbgmsg(NULL, "announceMore: slotsAvailable is %d", announcer->slotsAvailable);

    if (announcer->slotsAvailable < 1)
    {
        return;
    }

    /* build a list of tiers that need to be announced */
    tor = NULL;

    while ((tor = tr_torrentNext(announcer->session, tor)) != NULL)
    {
        struct tr_torrent_tiers* tt = tor->tiers;

        for (int i = 0; tt != NULL && i < tt->tier_count; ++i)
        {
            tr_tier* tier = &tt->tiers[i];

            if (tierNeedsToAnnounce(tier, now))
            {
                tr_ptrArrayAppend(&announceMe, tier);
            }
        }
    }

    n = tr_ptrArraySize(&announceMe);

    /* if there are more tiers than slots available, prioritize */
    if (n > announcer->slotsAvailable)
    {
        qsort(tr_ptrArrayBase(&announceMe), n, sizeof(tr_tier*), compareTiers);
        n = announcer->slotsAvailable;
    }

    /* announce some */
    for (int i = 0; i < n; ++i)
    {
        tr_tier* tier = tr_ptrArrayNth(&announceMe, i);
        tr_logAddTorDbg(tier->tor, "%s", "Announcing to tracker");
        dbgmsg(tier, "announcing tier %d of %d", i, n);
        tierAnnounce(announcer, tier);
    }

    /* build a list of tiers that need to be scraped */
    tor = NULL;

    while ((tor = tr_torrentNext(announcer->session, tor)) != NULL)
    {
        struct tr_torrent_tiers* tt = tor->tiers;

        for (int i = 0; tt != NULL && i < tt->tier_count; ++i)
        {
            tr_tier* tier = &tt->tiers[i];

            if (!tierNeedsToAnnounce(tier, now) && tierNeedsToScrape(tier, now))
            {
                tr_ptrArrayAppend(&scrapeMe, tier);
            }
        }
    }

    /* scrape some */
    multiscrape(announcer, &scrapeMe);

    /* cleanup */
    tr_ptrArrayDestruct(&scrapeMe, NULL);
    tr_ptrArrayDestruct(&announceMe, NULL);
}

cfpp2p pushed a commit to cfpp2p/transmission that referenced this issue Jun 2, 2017
cfpp2p pushed a commit to cfpp2p/transmission that referenced this issue Jun 2, 2017
@kralcyor
Copy link

kralcyor commented Jun 3, 2017

@cfpp2p after applied that, no this issue in several hours; it seems that indeed works. Thanks!

@mikedld
Copy link
Member

mikedld commented Jun 3, 2017

I see what you're doing there @cfpp2p (moving scrapeMe population after tierAnnounce calls which might call back with error right away), and I agree this should help. Don't really like the double scan through the torrents list though, maybe this (below) will be better?

diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c
index c44ec3148..0a8f58a9b 100644
--- a/libtransmission/announcer.c
+++ b/libtransmission/announcer.c
@@ -1474,6 +1474,8 @@ static void multiscrape(tr_announcer* announcer, tr_ptrArray* tiers)
         uint8_t const* hash = tier->tor->info.hash;
         bool found = false;
 
+        assert(url != NULL);
+
         /* if there's a request with this scrape URL and a free slot, use it */
         for (int j = 0; !found && j < request_count; ++j)
         {
@@ -1614,6 +1616,16 @@ static void announceMore(tr_announcer* announcer)
         tierAnnounce(announcer, tier);
     }
 
+    for (int i = tr_ptrArraySize(&scrapeMe); i > 0; --i)
+    {
+        tr_tier* tier = tr_ptrArrayNth(&scrapeMe, i - 1);
+
+        if (!tierNeedsToScrape(tier, now))
+        {
+            tr_ptrArrayRemove(&scrapeMe, i - 1);
+        }
+    }
+
     /* scrape some */
     multiscrape(announcer, &scrapeMe);
 

Or we could always just skip tiers with NULL URL in multiscrape...

@cfpp2p
Copy link

cfpp2p commented Jun 3, 2017

@mikedld
tierIncrementTracker() sets tr_tier::isScraping to false
and possibly allowing this tier to now scrape.

Repopulating scrapeMe after tierAnnounce() then could correctly add
that tier to scrape. Removing invalid scrapeMe array elements
should work however it wouldn't catch any newly allowed
( by tierIncrementTracker() ) tier to scrape.

That's the way I see it right now.

Or we could always just skip tiers with NULL URL in multiscrape...

As a failsafe we could tierNeedsToScrape() in multiscrape ;)

@mikedld mikedld closed this as completed in a86266d Jul 4, 2017
@mikedld mikedld modified the milestone: 3.00 Jul 4, 2017
@mikedld mikedld modified the milestones: 3.00, 2.93 Jan 16, 2018
mikedld added a commit that referenced this issue Jan 16, 2018
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jul 13, 2020
### All Platforms
- Allow the RPC server to listen on an IPv6 address ([#161](transmission/transmission#161))
- Change `TR_CURL_SSL_VERIFY` to `TR_CURL_SSL_NO_VERIFY` and enable verification by default ([#334](transmission/transmission#334))
- Go back to using hash as base name for resume and torrent files (those stored in configuration directory) ([#122](transmission/transmission#122))
- Handle "fields" argument in "session-get" RPC request; if "fields" array is present in arguments, only return session fields specified; otherwise return all the fields as before
- Limit the number of incorrect authentication attempts in embedded web server to 100 to prevent brute-force attacks ([#371](transmission/transmission#371))
- Set idle seed limit range to 1..40320 (4 weeks tops) in all clients ([#212](transmission/transmission#212))
- Add Peer ID for Xfplay, PicoTorrent, Free Download Manager, Folx, Baidu Netdisk torrent clients ([#256](transmission/transmission#256), [#285](transmission/transmission#285), [#355](transmission/transmission#355), [#363](transmission/transmission#363), [#386](transmission/transmission#386))
- Announce `INT64_MAX` as size left if the value is unknown (helps with e.g. Amazon S3 trackers) ([#250](transmission/transmission#250))
- Add `TCP_FASTOPEN` support (should result in slight speedup) ([#184](transmission/transmission#184))
- Improve ToS handling on IPv6 connections ([#128](transmission/transmission#128), [#341](transmission/transmission#341), [#360](transmission/transmission#360), [#692](transmission/transmission#692), [#737](transmission/transmission#737))
- Abort handshake if establishing DH shared secret fails (leads to crash) ([#27](transmission/transmission#27))
- Don't switch trackers while announcing (leads to crash) ([#297](transmission/transmission#297))
- Improve completion scripts execution and error handling; add support for .cmd and .bat files on Windows ([#405](transmission/transmission#405))
- Maintain a "session ID" file (in temporary directory) to better detect whether session is local or remote; return the ID as part of "session-get" response (TRAC-5348, [#861](transmission/transmission#861))
- Change torrent location even if no data move is needed ([#35](transmission/transmission#35))
- Support CIDR-notated blocklists ([#230](transmission/transmission#230), [#741](transmission/transmission#741))
- Update the resume file before running scripts ([#825](transmission/transmission#825))
- Make multiscrape limits adaptive ([#837](transmission/transmission#837))
- Add labels support to libtransmission and transmission-remote ([#822](transmission/transmission#822))
- Parse `session-id` header case-insensitively ([#765](transmission/transmission#765))
- Sanitize suspicious path components instead of rejecting them ([#62](transmission/transmission#62), [#294](transmission/transmission#294))
- Load CA certs from system store on Windows / OpenSSL ([#446](transmission/transmission#446))
- Add support for mbedtls (formely polarssl) and wolfssl (formely cyassl), LibreSSL ([#115](transmission/transmission#115), [#116](transmission/transmission#116), [#284](transmission/transmission#284), [#486](transmission/transmission#486), [#524](transmission/transmission#524), [#570](transmission/transmission#570))
- Fix building against OpenSSL 1.1.0+ ([#24](transmission/transmission#24))
- Fix quota support for uClibc-ng 1.0.18+ and DragonFly BSD ([#42](transmission/transmission#42), [#58](transmission/transmission#58), [#312](transmission/transmission#312))
- Fix a number of memory leaks (magnet loading, session shutdown, bencoded data parsing) ([#56](transmission/transmission#56))
- Bump miniupnpc version to 2.0.20170509 ([#347](transmission/transmission#347))
- CMake-related improvements (Ninja generator, libappindicator, systemd, Solaris and macOS) ([#72](transmission/transmission#72), [#96](transmission/transmission#96), [#117](transmission/transmission#117), [#118](transmission/transmission#118), [#133](transmission/transmission#133), [#191](transmission/transmission#191))
- Switch to submodules to manage (most of) third-party dependencies
- Fail installation on Windows if UCRT is not installed

### Mac Client
- Bump minimum macOS version to 10.10
- Dark Mode support ([#644](transmission/transmission#644), [#722](transmission/transmission#722), [#757](transmission/transmission#757), [#779](transmission/transmission#779), [#788](transmission/transmission#788))
- Remove Growl support, notification center is always used ([#387](transmission/transmission#387))
- Fix autoupdate on High Sierra and up by bumping the Sparkle version ([#121](transmission/transmission#121), [#600](transmission/transmission#600))
- Transition to ARC ([#336](transmission/transmission#336))
- Use proper UTF-8 encoding (with macOS-specific normalization) when setting download/incomplete directory and completion script paths ([#11](transmission/transmission#11))
- Fix uncaught exception when dragging multiple items between groups ([#51](transmission/transmission#51))
- Add flat variants of status icons for message log ([#134](transmission/transmission#134))
- Optimize image resources size ([#304](transmission/transmission#304), [#429](transmission/transmission#429))
- Update file icon when file name changes ([#37](transmission/transmission#37))
- Update translations

### GTK+ Client
- Add queue up/down hotkeys ([#158](transmission/transmission#158))
- Modernize the .desktop file ([#162](transmission/transmission#162))
- Add AppData file ([#224](transmission/transmission#224))
- Add symbolic icon variant for the Gnome top bar and when the high contrast theme is in use ([#414](transmission/transmission#414), [#449](transmission/transmission#449))
- Update file icon when its name changes ([#37](transmission/transmission#37))
- Switch from intltool to gettext for translations ([#584](transmission/transmission#584), [#647](transmission/transmission#647))
- Update translations, add new translations for Portuguese (Portugal)

### Qt Client
- Bump minimum Qt version to 5.2
- Fix dropping .torrent files into main window on Windows ([#269](transmission/transmission#269))
- Fix prepending of drive letter to various user-selected paths on Windows ([#236](transmission/transmission#236), [#307](transmission/transmission#307), [#404](transmission/transmission#404), [#437](transmission/transmission#437), [#699](transmission/transmission#699), [#723](transmission/transmission#723), [#877](transmission/transmission#877))
- Fix sorting by progress in presence of magnet transfers ([#234](transmission/transmission#234))
- Fix .torrent file trashing upon addition ([#262](transmission/transmission#262))
- Add queue up/down hotkeys ([#158](transmission/transmission#158))
- Reduce torrent properties (file tree) memory usage
- Display tooltips in torrent properties (file tree) in case the names don't fit ([#411](transmission/transmission#411))
- Improve UI look on hi-dpi displays (YMMV)
- Use session ID (if available) to check if session is local or not ([#861](transmission/transmission#861))
- Use default (instead of system) locale to be more flexible ([#130](transmission/transmission#130))
- Modernize the .desktop file ([#162](transmission/transmission#162))
- Update translations, add new translations for Afrikaans, Catalan, Danish, Greek, Norwegian Bokmål, Slovenian

### Daemon
- Use libsystemd instead of libsystemd-daemon (TRAC-5921)
- Harden transmission-daemon.service by disallowing privileges elevation ([#795](transmission/transmission#795))
- Fix exit code to be zero when dumping settings ([#487](transmission/transmission#487))

### Web Client
- Fix tracker error XSS in inspector (CVE-?)
- Fix performance issues due to improper use of `setInterval()` for UI refresh (TRAC-6031)
- Fix recognition of `https://` links in comments field ([#41](transmission/transmission#41), [#180](transmission/transmission#180))
- Fix torrent list style in Google Chrome 59+ ([#384](transmission/transmission#384))
- Show ETA in compact view on non-mobile devices ([#146](transmission/transmission#146))
- Show upload file button on mobile devices ([#320](transmission/transmission#320), [#431](transmission/transmission#431), [#956](transmission/transmission#956))
- Add keyboard hotkeys for web interface ([#351](transmission/transmission#351))
- Disable autocompletion in torrent URL field ([#367](transmission/transmission#367))

### Utils
- Prevent crash in transmission-show displaying torrents with invalid creation date ([#609](transmission/transmission#609))
- Handle IPv6 RPC addresses in transmission-remote ([#247](transmission/transmission#247))
- Add `--unsorted` option to transmission-show ([#767](transmission/transmission#767))
- Widen the torrent-id column in transmission-remote for cleaner formatting ([#840](transmission/transmission#840))
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 3, 2020
net/transmission-gtk: security update
net/transmission-qt: security update
net/transmission: security update

Revisions pulled up:
- net/transmission-gtk/Makefile                                 1.46
- net/transmission-gtk/PLIST                                    1.2
- net/transmission-qt/Makefile                                  1.54
- net/transmission/Makefile                                     1.27
- net/transmission/Makefile.common                              1.10
- net/transmission/PLIST                                        1.4
- net/transmission/distinfo                                     1.16
- net/transmission/patches/patch-qt_qtr.pro                     1.7

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	wiz
   Date:		Mon Jul 13 13:01:02 UTC 2020

   Modified Files:
   	pkgsrc/net/transmission: Makefile Makefile.common PLIST distinfo
   	pkgsrc/net/transmission-gtk: Makefile PLIST
   	pkgsrc/net/transmission-qt: Makefile
   	pkgsrc/net/transmission/patches: patch-qt_qtr.pro

   Log Message:
   transmission*: update to 3.00

   ### All Platforms
   - Allow the RPC server to listen on an IPv6 address ([#161](transmission/transmission#161))
   - Change `TR_CURL_SSL_VERIFY` to `TR_CURL_SSL_NO_VERIFY` and enable verification by default ([#334](transmission/transmission#334))
   - Go back to using hash as base name for resume and torrent files (those stored in configuration directory) ([#122](transmission/transmission#122))
   - Handle "fields" argument in "session-get" RPC request; if "fields" array is present in arguments, only return session fields specified; otherwise return all the fields as before
   - Limit the number of incorrect authentication attempts in embedded web server to 100 to prevent brute-force attacks ([#371](transmission/transmission#371))
   - Set idle seed limit range to 1..40320 (4 weeks tops) in all clients ([#212](transmission/transmission#212))
   - Add Peer ID for Xfplay, PicoTorrent, Free Download Manager, Folx, Baidu Netdisk torrent clients ([#256](transmission/transmission#256), [#285](transmission/transmission#285), [#355](transmission/transmission#355), [#363](transmission/transmission#363), [#386](transmission/transmission#386))
   - Announce `INT64_MAX` as size left if the value is unknown (helps with e.g. Amazon S3 trackers) ([#250](transmission/transmission#250))
   - Add `TCP_FASTOPEN` support (should result in slight speedup) ([#184](transmission/transmission#184))
   - Improve ToS handling on IPv6 connections ([#128](transmission/transmission#128), [#341](transmission/transmission#341), [#360](transmission/transmission#360), [#692](transmission/transmission#692), [#737](transmission/transmission#737))
   - Abort handshake if establishing DH shared secret fails (leads to crash) ([#27](transmission/transmission#27))
   - Don't switch trackers while announcing (leads to crash) ([#297](transmission/transmission#297))
   - Improve completion scripts execution and error handling; add support for .cmd and .bat files on Windows ([#405](transmission/transmission#405))
   - Maintain a "session ID" file (in temporary directory) to better detect whether session is local or remote; return the ID as part of "session-get" response (TRAC-5348, [#861](transmission/transmission#861))
   - Change torrent location even if no data move is needed ([#35](transmission/transmission#35))
   - Support CIDR-notated blocklists ([#230](transmission/transmission#230), [#741](transmission/transmission#741))
   - Update the resume file before running scripts ([#825](transmission/transmission#825))
   - Make multiscrape limits adaptive ([#837](transmission/transmission#837))
   - Add labels support to libtransmission and transmission-remote ([#822](transmission/transmission#822))
   - Parse `session-id` header case-insensitively ([#765](transmission/transmission#765))
   - Sanitize suspicious path components instead of rejecting them ([#62](transmission/transmission#62), [#294](transmission/transmission#294))
   - Load CA certs from system store on Windows / OpenSSL ([#446](transmission/transmission#446))
   - Add support for mbedtls (formely polarssl) and wolfssl (formely cyassl), LibreSSL ([#115](transmission/transmission#115), [#116](transmission/transmission#116), [#284](transmission/transmission#284), [#486](transmission/transmission#486), [#524](transmission/transmission#524), [#570](transmission/transmission#570))
   - Fix building against OpenSSL 1.1.0+ ([#24](transmission/transmission#24))
   - Fix quota support for uClibc-ng 1.0.18+ and DragonFly BSD ([#42](transmission/transmission#42), [#58](transmission/transmission#58), [#312](transmission/transmission#312))
   - Fix a number of memory leaks (magnet loading, session shutdown, bencoded data parsing) ([#56](transmission/transmission#56))
   - Bump miniupnpc version to 2.0.20170509 ([#347](transmission/transmission#347))
   - CMake-related improvements (Ninja generator, libappindicator, systemd, Solaris and macOS) ([#72](transmission/transmission#72), [#96](transmission/transmission#96), [#117](transmission/transmission#117), [#118](transmission/transmission#118), [#133](transmission/transmission#133), [#191](transmission/transmission#191))
   - Switch to submodules to manage (most of) third-party dependencies
   - Fail installation on Windows if UCRT is not installed

   ### Mac Client
   - Bump minimum macOS version to 10.10
   - Dark Mode support ([#644](transmission/transmission#644), [#722](transmission/transmission#722), [#757](transmission/transmission#757), [#779](transmission/transmission#779), [#788](transmission/transmission#788))
   - Remove Growl support, notification center is always used ([#387](transmission/transmission#387))
   - Fix autoupdate on High Sierra and up by bumping the Sparkle version ([#121](transmission/transmission#121), [#600](transmission/transmission#600))
   - Transition to ARC ([#336](transmission/transmission#336))
   - Use proper UTF-8 encoding (with macOS-specific normalization) when setting download/incomplete directory and completion script paths ([#11](transmission/transmission#11))
   - Fix uncaught exception when dragging multiple items between groups ([#51](transmission/transmission#51))
   - Add flat variants of status icons for message log ([#134](transmission/transmission#134))
   - Optimize image resources size ([#304](transmission/transmission#304), [#429](transmission/transmission#429))
   - Update file icon when file name changes ([#37](transmission/transmission#37))
   - Update translations

   ### GTK+ Client
   - Add queue up/down hotkeys ([#158](transmission/transmission#158))
   - Modernize the .desktop file ([#162](transmission/transmission#162))
   - Add AppData file ([#224](transmission/transmission#224))
   - Add symbolic icon variant for the Gnome top bar and when the high contrast theme is in use ([#414](transmission/transmission#414), [#449](transmission/transmission#449))
   - Update file icon when its name changes ([#37](transmission/transmission#37))
   - Switch from intltool to gettext for translations ([#584](transmission/transmission#584), [#647](transmission/transmission#647))
   - Update translations, add new translations for Portuguese (Portugal)

   ### Qt Client
   - Bump minimum Qt version to 5.2
   - Fix dropping .torrent files into main window on Windows ([#269](transmission/transmission#269))
   - Fix prepending of drive letter to various user-selected paths on Windows ([#236](transmission/transmission#236), [#307](transmission/transmission#307), [#404](transmission/transmission#404), [#437](transmission/transmission#437), [#699](transmission/transmission#699), [#723](transmission/transmission#723), [#877](transmission/transmission#877))
   - Fix sorting by progress in presence of magnet transfers ([#234](transmission/transmission#234))
   - Fix .torrent file trashing upon addition ([#262](transmission/transmission#262))
   - Add queue up/down hotkeys ([#158](transmission/transmission#158))
   - Reduce torrent properties (file tree) memory usage
   - Display tooltips in torrent properties (file tree) in case the names don't fit ([#411](transmission/transmission#411))
   - Improve UI look on hi-dpi displays (YMMV)
   - Use session ID (if available) to check if session is local or not ([#861](transmission/transmission#861))
   - Use default (instead of system) locale to be more flexible ([#130](transmission/transmission#130))
   - Modernize the .desktop file ([#162](transmission/transmission#162))
   - Update translations, add new translations for Afrikaans, Catalan, Danish, Greek, Norwegian Bokmål, Slovenian

   ### Daemon
   - Use libsystemd instead of libsystemd-daemon (TRAC-5921)
   - Harden transmission-daemon.service by disallowing privileges elevation ([#795](transmission/transmission#795))
   - Fix exit code to be zero when dumping settings ([#487](transmission/transmission#487))

   ### Web Client
   - Fix tracker error XSS in inspector (CVE-?)
   - Fix performance issues due to improper use of `setInterval()` for UI refresh (TRAC-6031)
   - Fix recognition of `https://` links in comments field ([#41](transmission/transmission#41), [#180](transmission/transmission#180))
   - Fix torrent list style in Google Chrome 59+ ([#384](transmission/transmission#384))
   - Show ETA in compact view on non-mobile devices ([#146](transmission/transmission#146))
   - Show upload file button on mobile devices ([#320](transmission/transmission#320), [#431](transmission/transmission#431), [#956](transmission/transmission#956))
   - Add keyboard hotkeys for web interface ([#351](transmission/transmission#351))
   - Disable autocompletion in torrent URL field ([#367](transmission/transmission#367))

   ### Utils
   - Prevent crash in transmission-show displaying torrents with invalid creation date ([#609](transmission/transmission#609))
   - Handle IPv6 RPC addresses in transmission-remote ([#247](transmission/transmission#247))
   - Add `--unsorted` option to transmission-show ([#767](transmission/transmission#767))
   - Widen the torrent-id column in transmission-remote for cleaner formatting ([#840](transmission/transmission#840))


   To generate a diff of this commit:
   cvs rdiff -u -r1.26 -r1.27 pkgsrc/net/transmission/Makefile
   cvs rdiff -u -r1.9 -r1.10 pkgsrc/net/transmission/Makefile.common
   cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/transmission/PLIST
   cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/transmission/distinfo
   cvs rdiff -u -r1.45 -r1.46 pkgsrc/net/transmission-gtk/Makefile
   cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/transmission-gtk/PLIST
   cvs rdiff -u -r1.52 -r1.53 pkgsrc/net/transmission-qt/Makefile
   cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/transmission/patches/patch-qt_qtr.pro
-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   wiz
   Date:           Sat Jul 25 20:20:05 UTC 2020

   Modified Files:
           pkgsrc/net/transmission-qt: Makefile

   Log Message:
   transmission-qt: needs gcc 7.x (for <optional>)

   Reported and tested by spz.


   To generate a diff of this commit:
   cvs rdiff -u -r1.53 -r1.54 pkgsrc/net/transmission-qt/Makefile
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Oct 14, 2021
net/transmission-gtk: security update
net/transmission-qt: security update
net/transmission: security update

Revisions pulled up:
- net/transmission-gtk/Makefile                                 1.46
- net/transmission-gtk/PLIST                                    1.2
- net/transmission-qt/Makefile                                  1.54
- net/transmission/Makefile                                     1.27
- net/transmission/Makefile.common                              1.10
- net/transmission/PLIST                                        1.4
- net/transmission/distinfo                                     1.16
- net/transmission/patches/patch-qt_qtr.pro                     1.7

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	wiz
   Date:		Mon Jul 13 13:01:02 UTC 2020

   Modified Files:
   	pkgsrc/net/transmission: Makefile Makefile.common PLIST distinfo
   	pkgsrc/net/transmission-gtk: Makefile PLIST
   	pkgsrc/net/transmission-qt: Makefile
   	pkgsrc/net/transmission/patches: patch-qt_qtr.pro

   Log Message:
   transmission*: update to 3.00

   ### All Platforms
   - Allow the RPC server to listen on an IPv6 address ([#161](transmission/transmission#161))
   - Change `TR_CURL_SSL_VERIFY` to `TR_CURL_SSL_NO_VERIFY` and enable verification by default ([#334](transmission/transmission#334))
   - Go back to using hash as base name for resume and torrent files (those stored in configuration directory) ([#122](transmission/transmission#122))
   - Handle "fields" argument in "session-get" RPC request; if "fields" array is present in arguments, only return session fields specified; otherwise return all the fields as before
   - Limit the number of incorrect authentication attempts in embedded web server to 100 to prevent brute-force attacks ([#371](transmission/transmission#371))
   - Set idle seed limit range to 1..40320 (4 weeks tops) in all clients ([#212](transmission/transmission#212))
   - Add Peer ID for Xfplay, PicoTorrent, Free Download Manager, Folx, Baidu Netdisk torrent clients ([#256](transmission/transmission#256), [#285](transmission/transmission#285), [#355](transmission/transmission#355), [#363](transmission/transmission#363), [#386](transmission/transmission#386))
   - Announce `INT64_MAX` as size left if the value is unknown (helps with e.g. Amazon S3 trackers) ([#250](transmission/transmission#250))
   - Add `TCP_FASTOPEN` support (should result in slight speedup) ([#184](transmission/transmission#184))
   - Improve ToS handling on IPv6 connections ([#128](transmission/transmission#128), [#341](transmission/transmission#341), [#360](transmission/transmission#360), [#692](transmission/transmission#692), [#737](transmission/transmission#737))
   - Abort handshake if establishing DH shared secret fails (leads to crash) ([#27](transmission/transmission#27))
   - Don't switch trackers while announcing (leads to crash) ([#297](transmission/transmission#297))
   - Improve completion scripts execution and error handling; add support for .cmd and .bat files on Windows ([#405](transmission/transmission#405))
   - Maintain a "session ID" file (in temporary directory) to better detect whether session is local or remote; return the ID as part of "session-get" response (TRAC-5348, [#861](transmission/transmission#861))
   - Change torrent location even if no data move is needed ([#35](transmission/transmission#35))
   - Support CIDR-notated blocklists ([#230](transmission/transmission#230), [#741](transmission/transmission#741))
   - Update the resume file before running scripts ([#825](transmission/transmission#825))
   - Make multiscrape limits adaptive ([#837](transmission/transmission#837))
   - Add labels support to libtransmission and transmission-remote ([#822](transmission/transmission#822))
   - Parse `session-id` header case-insensitively ([#765](transmission/transmission#765))
   - Sanitize suspicious path components instead of rejecting them ([#62](transmission/transmission#62), [#294](transmission/transmission#294))
   - Load CA certs from system store on Windows / OpenSSL ([#446](transmission/transmission#446))
   - Add support for mbedtls (formely polarssl) and wolfssl (formely cyassl), LibreSSL ([#115](transmission/transmission#115), [#116](transmission/transmission#116), [#284](transmission/transmission#284), [#486](transmission/transmission#486), [#524](transmission/transmission#524), [#570](transmission/transmission#570))
   - Fix building against OpenSSL 1.1.0+ ([#24](transmission/transmission#24))
   - Fix quota support for uClibc-ng 1.0.18+ and DragonFly BSD ([#42](transmission/transmission#42), [#58](transmission/transmission#58), [#312](transmission/transmission#312))
   - Fix a number of memory leaks (magnet loading, session shutdown, bencoded data parsing) ([#56](transmission/transmission#56))
   - Bump miniupnpc version to 2.0.20170509 ([#347](transmission/transmission#347))
   - CMake-related improvements (Ninja generator, libappindicator, systemd, Solaris and macOS) ([#72](transmission/transmission#72), [#96](transmission/transmission#96), [#117](transmission/transmission#117), [#118](transmission/transmission#118), [#133](transmission/transmission#133), [#191](transmission/transmission#191))
   - Switch to submodules to manage (most of) third-party dependencies
   - Fail installation on Windows if UCRT is not installed

   ### Mac Client
   - Bump minimum macOS version to 10.10
   - Dark Mode support ([#644](transmission/transmission#644), [#722](transmission/transmission#722), [#757](transmission/transmission#757), [#779](transmission/transmission#779), [#788](transmission/transmission#788))
   - Remove Growl support, notification center is always used ([#387](transmission/transmission#387))
   - Fix autoupdate on High Sierra and up by bumping the Sparkle version ([#121](transmission/transmission#121), [#600](transmission/transmission#600))
   - Transition to ARC ([#336](transmission/transmission#336))
   - Use proper UTF-8 encoding (with macOS-specific normalization) when setting download/incomplete directory and completion script paths ([#11](transmission/transmission#11))
   - Fix uncaught exception when dragging multiple items between groups ([#51](transmission/transmission#51))
   - Add flat variants of status icons for message log ([#134](transmission/transmission#134))
   - Optimize image resources size ([#304](transmission/transmission#304), [#429](transmission/transmission#429))
   - Update file icon when file name changes ([#37](transmission/transmission#37))
   - Update translations

   ### GTK+ Client
   - Add queue up/down hotkeys ([#158](transmission/transmission#158))
   - Modernize the .desktop file ([#162](transmission/transmission#162))
   - Add AppData file ([#224](transmission/transmission#224))
   - Add symbolic icon variant for the Gnome top bar and when the high contrast theme is in use ([#414](transmission/transmission#414), [#449](transmission/transmission#449))
   - Update file icon when its name changes ([#37](transmission/transmission#37))
   - Switch from intltool to gettext for translations ([#584](transmission/transmission#584), [#647](transmission/transmission#647))
   - Update translations, add new translations for Portuguese (Portugal)

   ### Qt Client
   - Bump minimum Qt version to 5.2
   - Fix dropping .torrent files into main window on Windows ([#269](transmission/transmission#269))
   - Fix prepending of drive letter to various user-selected paths on Windows ([#236](transmission/transmission#236), [#307](transmission/transmission#307), [#404](transmission/transmission#404), [#437](transmission/transmission#437), [#699](transmission/transmission#699), [#723](transmission/transmission#723), [#877](transmission/transmission#877))
   - Fix sorting by progress in presence of magnet transfers ([#234](transmission/transmission#234))
   - Fix .torrent file trashing upon addition ([#262](transmission/transmission#262))
   - Add queue up/down hotkeys ([#158](transmission/transmission#158))
   - Reduce torrent properties (file tree) memory usage
   - Display tooltips in torrent properties (file tree) in case the names don't fit ([#411](transmission/transmission#411))
   - Improve UI look on hi-dpi displays (YMMV)
   - Use session ID (if available) to check if session is local or not ([#861](transmission/transmission#861))
   - Use default (instead of system) locale to be more flexible ([#130](transmission/transmission#130))
   - Modernize the .desktop file ([#162](transmission/transmission#162))
   - Update translations, add new translations for Afrikaans, Catalan, Danish, Greek, Norwegian Bokmål, Slovenian

   ### Daemon
   - Use libsystemd instead of libsystemd-daemon (TRAC-5921)
   - Harden transmission-daemon.service by disallowing privileges elevation ([#795](transmission/transmission#795))
   - Fix exit code to be zero when dumping settings ([#487](transmission/transmission#487))

   ### Web Client
   - Fix tracker error XSS in inspector (CVE-?)
   - Fix performance issues due to improper use of `setInterval()` for UI refresh (TRAC-6031)
   - Fix recognition of `https://` links in comments field ([#41](transmission/transmission#41), [#180](transmission/transmission#180))
   - Fix torrent list style in Google Chrome 59+ ([#384](transmission/transmission#384))
   - Show ETA in compact view on non-mobile devices ([#146](transmission/transmission#146))
   - Show upload file button on mobile devices ([#320](transmission/transmission#320), [#431](transmission/transmission#431), [#956](transmission/transmission#956))
   - Add keyboard hotkeys for web interface ([#351](transmission/transmission#351))
   - Disable autocompletion in torrent URL field ([#367](transmission/transmission#367))

   ### Utils
   - Prevent crash in transmission-show displaying torrents with invalid creation date ([#609](transmission/transmission#609))
   - Handle IPv6 RPC addresses in transmission-remote ([#247](transmission/transmission#247))
   - Add `--unsorted` option to transmission-show ([#767](transmission/transmission#767))
   - Widen the torrent-id column in transmission-remote for cleaner formatting ([#840](transmission/transmission#840))


   To generate a diff of this commit:
   cvs rdiff -u -r1.26 -r1.27 pkgsrc/net/transmission/Makefile
   cvs rdiff -u -r1.9 -r1.10 pkgsrc/net/transmission/Makefile.common
   cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/transmission/PLIST
   cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/transmission/distinfo
   cvs rdiff -u -r1.45 -r1.46 pkgsrc/net/transmission-gtk/Makefile
   cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/transmission-gtk/PLIST
   cvs rdiff -u -r1.52 -r1.53 pkgsrc/net/transmission-qt/Makefile
   cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/transmission/patches/patch-qt_qtr.pro
-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   wiz
   Date:           Sat Jul 25 20:20:05 UTC 2020

   Modified Files:
           pkgsrc/net/transmission-qt: Makefile

   Log Message:
   transmission-qt: needs gcc 7.x (for <optional>)

   Reported and tested by spz.


   To generate a diff of this commit:
   cvs rdiff -u -r1.53 -r1.54 pkgsrc/net/transmission-qt/Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants