Opened 9 years ago

Closed 8 years ago

#4632 closed Bug (fixed)

Custom blocklist generates 2x # of rules

Reported by: vbm Owned by: jordan
Priority: Normal Milestone: 2.80
Component: libtransmission Version: 2.33
Severity: Normal Keywords: blocklist, Peer Guardian Linux
Cc:

Description

Initially raised on https://forum.transmissionbt.com/viewtopic.php?f=2&t=12411

Using Transmission 2.33 (12565) on Ubuntu 11.10.

I use Peer Guardian Linux to compile a blocklist aggregating a number of different lists and pass it on to Transmission by placing a sym link to the master blocklist in ~/.config/transmission/blocklists

It all works well the first time I do it but once I use it for a second time, the number of rules has doubled. I noticed Transmission creates a master_blocklist.bin file in ~/.config/transmission/blocklists, so it looks like it is counting the rules on both .bin and .p2p files, even if they are the same.

Change History (13)

comment:1 follow-up: Changed 9 years ago by livings124

  • Version changed from 2.42 to 2.33

comment:2 follow-up: Changed 9 years ago by x190

To make it clear, this doubling of the rule count occurs when blocklists are added in text form.

comment:3 in reply to: ↑ 1 Changed 9 years ago by vbm

Replying to livings124: oops. forgot to set it properly, sorry. Thanks for fixing it.

comment:4 in reply to: ↑ 2 Changed 9 years ago by vbm

Replying to x190:

To make it clear, this doubling of the rule count occurs when blocklists are added in text form.

correct. you probably do not need it, but I am happy to email you my master_blocklist.p2p text file if you want to.

comment:5 Changed 8 years ago by jordan

Is this still an issue in 2.75?

comment:6 Changed 8 years ago by x190

Yup. Apparently user-added text file rules are counted twice if left in the blocklist folder on subsequent start-ups. It sees them as 'additional' rules to the pre-existing rules of the .bin of the same name, I guess.

Last edited 8 years ago by x190 (previous) (diff)

comment:7 Changed 8 years ago by vbm

sorry for the late reply, it took me a while to validate. I have the same issue as x190, if I place a blocklist text file in ~/.config/transmission/blocklists, it doubles the number of rules. Could it be using using the .bin AND .p2p files?

comment:8 Changed 8 years ago by jordan

  • Component changed from Transmission to libtransmission
  • Owner set to jordan

comment:9 Changed 8 years ago by feyd.rm

I just discovered this bug on OS X in version 2.76 as well.

I created a bash script to curl down the lists I wanted, gunzip them etc. I don't think this is actually loading the rules twice. I *think* only the UI is wrong. I base this on the following procedure...

$ cd ~/Library/Application?\ Support/Transmission?/blocklists $ rm * $ curl -L "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" -o level1.gz $ gunzip level1.gz $ open /Applications/Transmission?.app

# note that number is at 228,345 # quit Transmission

$ xxd level1.bin ~/Desktop/level1a.hex $ open /Applications/Transmission?.app/

# note that number HAS doubled in UI to 456,690 # quit Transmission

$ xxd level1.bin ~/Desktop/level1b.hex $ vimdiff level1a.hex level1b.hex

# shows no differences # double-check

$ diff level1a.hex level1b.hex

# nada

Also, the number never goes higher than double, meaning subsequent openings of Transmission.app do not cause the UI to triple, quadruple etc.

comment:10 Changed 8 years ago by jordan

  • Milestone changed from None Set to 2.80
  • Status changed from new to assigned

comment:11 Changed 8 years ago by jordan

r13825: add unit test (currently failing) to test for this issue.

r13826: add a fix, which causes r13825's test to pass

comment:12 Changed 8 years ago by jordan

https://build.transmissionbt.com/job/trunk-linux/7718/console shows the build for r13825:

make  check-TESTS
make[3]: Entering directory `/home/transmission/jenkins/workspace/trunk-linux/transmission-2.76+/_build/libtransmission'
PASS: bitfield-test
FAIL ../../libtransmission/blocklist-test.c:104, expected "5", got "10"
FAIL: blocklist-test

https://build.transmissionbt.com/job/trunk-linux/7719/console shows the build for r13826:

make  check-TESTS
make[3]: Entering directory `/home/transmission/jenkins/workspace/trunk-linux/transmission-2.76+/_build/libtransmission'
PASS: bitfield-test
PASS: blocklist-test

comment:13 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.