faulty network activity disable #13038

issue mruddy openend this issue on April 20, 2018
  1. mruddy commented at 10:08 am on April 20, 2018: contributor

    The network activity disable feature does not disable network activity. After clicking the tray icon to disable network activity, network connections establish and are used to transfer data as normal. I have only verified this with bitcoin-qt on Ubuntu 16.04.4 LTS and Tails (multiple versions). I’ve witnessed this happen for clearnet and onion peers.

    I have verified that this affects versions Bitcoin Core version v0.16.0 (release build) and the latest commit 8b262eb2d80bfa27ae8501078ce47bc1407e9c55 on master (IIRC, I saw this in earlier release builds too).

    To reproduce: Note: the first two steps may not be strictly necessary, but they definitely seem to help reproduce.

    1. use slow storage attached via usb (e.g.- 7200 RPM drive inside a 2.5" SATA external case attached via USB 3)
    2. let node fall behind (only a day at most, less likely works) and then attempt to resync
    3. start node with: $ /path/to/bitcoin-0.16.0/bin/bitcoin-qt -datadir=/path/to/bitcoin-unpruned-txindex-datadir -txindex &
    4. wait until you see some established peers on the peers tab in the GUI
    5. click the icon in the tray of the main GUI window to disable network activity
    6. go back to the peers tab and witness peers establish and transfer data. sometimes this happens immediately, sometimes it takes a few seconds. usually around a minute at most.

    relevant debug.log data from 3 separate runs:

     02018-04-20 09:17:34 Bitcoin Core version v0.16.0 (release build)
     1...
     22018-04-20 09:17:40 Loaded best chain: hashBestChain=0000000000000000000fff915fac685a3fae643481b9f6c31e3f78b1078b45c3 height=518957 date=2018-04-19 13:41:01 progress=0.999206
     3...
     42018-04-20 09:17:45 Leaving InitialBlockDownload (latching to false)
     52018-04-20 09:17:46 New outbound peer connected: version: 70015, blocks=519094, peer=1
     62018-04-20 09:17:46 New outbound peer connected: version: 70015, blocks=519094, peer=2
     72018-04-20 09:17:55 P2P peers available. Skipped DNS seeding.
     82018-04-20 09:17:55 dnsseed thread exit
     9<I CLICK THE NETWORK ACTIVITY DISABLE ICON IN THE TRAY OF THE GUI A THE EXISTING CONNECTIONS DROP>
    102018-04-20 09:18:04 GUI: QAccessibleTable::child: Invalid index at:  1 0
    112018-04-20 09:18:04 GUI: Cannot creat accessible child interface for object:  QTableView(0x5581864bb410, name = "peerWidget")  index:  15
    122018-04-20 09:18:04 GUI: QAccessibleTable::child: Invalid index at:  1 0
    132018-04-20 09:18:04 GUI: Cannot creat accessible child interface for object:  QTableView(0x5581864bb410, name = "peerWidget")  index:  15
    142018-04-20 09:18:04 GUI: QAccessibleTable::child: Invalid index at:  1 0
    152018-04-20 09:18:04 GUI: Cannot creat accessible child interface for object:  QTableView(0x5581864bb410, name = "peerWidget")  index:  15
    162018-04-20 09:18:12 Pre-allocating up to position 0x900000 in rev01238.dat
    172018-04-20 09:18:13 UpdateTip: new best=0000000000000000004782f61ebc39c514c61298efbdc720e440e3dd060352f0 height=518958 version=0x20000000 log2_work=88.623783 tx=311123210 date='2018-04-19 13:44:25' progress=0.999208 cache=0.8MiB(6207txo)
    18<A NEW OUTBOUND CONNECTION APPEARS WHILE NETWORK ACTIVITY IS DISABLED>
    192018-04-20 09:18:13 New outbound peer connected: version: 70015, blocks=519094, peer=3
    202018-04-20 09:18:29 UpdateTip: new best=0000000000000000002cc47e2cf4a8a89934c53a02dc1af3b60cbaea609014a2 height=518959 version=0x20000000 log2_work=88.623833 tx=311126085 date='2018-04-19 13:48:14' progress=0.999211 cache=2.3MiB(16786txo)
    21...
    22
    23-------------------------------------------------------------------------------
    24
    25build of latest master commit 8b262eb2d80bfa27ae8501078ce47bc1407e9c55
    26
    272018-04-20T09:27:30Z Bitcoin Core version v0.16.99.0-8b262eb (debug build)
    28...
    292018-04-20T09:27:50Z Loaded best chain: hashBestChain=0000000000000000002fd17d46ed1edaae01f8fc5178e4c0496de19683e005cf height=518970 date=2018-04-19T14:52:28Z progress=0.999248
    30...
    312018-04-20T09:29:38Z Leaving InitialBlockDownload (latching to false)
    322018-04-20T09:29:39Z New outbound peer connected: version: 70015, blocks=519095, peer=2
    33<I CLICK THE NETWORK ACTIVITY DISABLE ICON IN THE TRAY OF THE GUI A THE EXISTING CONNECTIONS DROP>
    342018-04-20T09:29:42Z GUI: QAccessibleTable::child: Invalid index at:  0 0
    352018-04-20T09:29:42Z GUI: Cannot creat accessible child interface for object:  QTableView(0x55ab174e0430, name = "peerWidget")  index:  8
    362018-04-20T09:29:42Z GUI: QAccessibleTable::child: Invalid index at:  0 0
    372018-04-20T09:29:42Z GUI: Cannot creat accessible child interface for object:  QTableView(0x55ab174e0430, name = "peerWidget")  index:  8
    382018-04-20T09:29:42Z UpdateTip: new best=0000000000000000000479596f8cfc32e69aca978bde18c0b9f8488175c88e3e height=518985 version=0x20000000 log2_work=88.625129 tx=311166856 date='2018-04-19T17:25:26Z' progress=0.999350 cache=11.9MiB(89599txo)
    39<A NEW OUTBOUND CONNECTION APPEARS WHILE NETWORK ACTIVITY IS DISABLED>
    402018-04-20T09:29:42Z New outbound peer connected: version: 70014, blocks=519095, peer=3
    412018-04-20T09:29:45Z UpdateTip: new best=000000000000000000096f1f7ffadf6c6659e2d19e560620a9fa239eed24e709 height=518986 version=0x20000000 log2_work=88.625179 tx=311167660 date='2018-04-19T17:30:02Z' progress=0.999353 cache=12.1MiB(91409txo)
    42...
    43
    44-------------------------------------------------------------------------------
    45
    462018-04-20T09:37:01Z Bitcoin Core version v0.16.99.0-8b262eb (debug build)
    47...
    482018-04-20T09:37:18Z Loaded best chain: hashBestChain=000000000000000000168d1a7a70cbbf09be99e34a1a6130288841e9af22eaf5 height=519006 date=2018-04-19T20:37:24Z progress=0.999474
    49...
    502018-04-20T09:37:25Z Leaving InitialBlockDownload (latching to false)
    51...
    52<I CLICK THE NETWORK ACTIVITY DISABLE ICON IN THE TRAY OF THE GUI A THE EXISTING CONNECTIONS DROP>
    532018-04-20T09:38:46Z GUI: QAccessibleTable::child: Invalid index at:  0 0
    542018-04-20T09:38:46Z GUI: Cannot creat accessible child interface for object:  QTableView(0x555adccbe010, name = "peerWidget")  index:  8
    552018-04-20T09:38:46Z GUI: QAccessibleTable::child: Invalid index at:  0 0
    562018-04-20T09:38:46Z GUI: Cannot creat accessible child interface for object:  QTableView(0x555adccbe010, name = "peerWidget")  index:  8
    572018-04-20T09:38:46Z UpdateTip: new best=0000000000000000003a72ecf9917c77dcac8fe801d80d06441b741f78ceaeca height=519076 version=0x20000000 log2_work=88.629657 tx=311270831 date='2018-04-20T05:40:59Z' progress=0.999840 cache=28.2MiB(214661txo)
    582018-04-20T09:38:47Z UpdateTip: new best=000000000000000000320678c480f530b0e9557b5a294f336c11f652f7324c35 height=519077 version=0x20000000 log2_work=88.629707 tx=311271189 date='2018-04-20T05:44:03Z' progress=0.999842 cache=28.3MiB(215532txo)
    59<A NEW OUTBOUND CONNECTION APPEARS WHILE NETWORK ACTIVITY IS DISABLED>
    602018-04-20T09:39:58Z New outbound peer connected: version: 70016, blocks=517884, peer=8
    612018-04-20T09:39:59Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 0000000000009c1b89b75b834c923e3c0302f0d79aeac29681e820f977ddd0d6, bad-diffbits, incorrect proof of work (code 16)
    
  2. mruddy commented at 10:11 am on April 20, 2018: contributor

    Adding screen shots of what I see in the debug window and on the status bar (the icon tray) in the GUI of both the release build and my build of the latest commit on master 8b262eb2d80bfa27ae8501078ce47bc1407e9c55.

    screenshot from 2018-04-20 05-19-01 screenshot from 2018-04-20 05-19-28

    screenshot from 2018-04-20 05-30-10 screenshot from 2018-04-20 05-30-27

  3. mruddy commented at 4:59 pm on April 20, 2018: contributor

    UPDATE: this is not limited to just the GUI. I verified that I was able to reproduce with bitcoind also: /path/to/bitcoin/src/bitcoind -datadir=/path/to/bitcoin-unpruned-txindex-datadir -txindex

     0wait for some peers
     1$ /path/to/bitcoin/src/bitcoin-cli -datadir=/path/to/bitcoin-unpruned-txindex-datadir getconnectioncount
     23
     3
     4try to disable the network
     5$ /path/to/bitcoin/src/bitcoin-cli -datadir=/path/to/bitcoin-unpruned-txindex-datadir setnetworkactive false
     6false
     7
     8existing peers disconnected
     9$ /path/to/bitcoin/src/bitcoin-cli -datadir=/path/to/bitcoin-unpruned-txindex-datadir getconnectioncount
    100
    11
    12new peer established
    13$ /path/to/bitcoin/src/bitcoin-cli -datadir=/path/to/bitcoin-unpruned-txindex-datadir getconnectioncount
    141
    

    partial debug.log:

     02018-04-20T16:50:15Z Bitcoin Core version v0.16.99.0-8b262eb (debug build)
     1...
     22018-04-20T16:50:32Z Loaded best chain: hashBestChain=000000000000000000421dfb2a1e89d7fbbba77ac479dad9168ed0c194232a48 height=519104 date=2018-04-20T11:30:52Z progress=0.999784
     3...
     42018-04-20T16:50:52Z Loading addresses from DNS seeds (could take a while)
     52018-04-20T16:50:53Z New outbound peer connected: version: 70015, blocks=519141, peer=0
     62018-04-20T16:50:53Z 253 addresses found from DNS seeds
     72018-04-20T16:50:53Z dnsseed thread exit
     82018-04-20T16:50:53Z New outbound peer connected: version: 70015, blocks=519141, peer=1
     92018-04-20T16:51:17Z UpdateTip: new best=000000000000000000288225978d5398c0f66ceef14cc82197be23aa21e79717 height=519105 version=0x20000000 log2_work=88.631097 tx=311314630 date='2018-04-20T11:36:58Z' progress=0.999788 cache=1.4MiB(10326txo)
    102018-04-20T16:51:28Z UpdateTip: new best=0000000000000000002de964c195d5454a678498893c66d953b013a646aea295 height=519106 version=0x20000000 log2_work=88.631147 tx=311316993 date='2018-04-20T11:43:16Z' progress=0.999792 cache=2.7MiB(19839txo)
    112018-04-20T16:51:28Z New outbound peer connected: version: 70015, blocks=519141, peer=2
    122018-04-20T16:51:36Z UpdateTip: new best=00000000000000000016fced8721f748ada9ce88e8685cac88e25c1c1a539357 height=519107 version=0x20000000 log2_work=88.631197 tx=311318950 date='2018-04-20T12:17:10Z' progress=0.999815 cache=3.8MiB(29511txo)
    132018-04-20T16:51:36Z New outbound peer connected: version: 70015, blocks=519141, peer=5
    142018-04-20T16:51:38Z Pre-allocating up to position 0x3000000 in blk01239.dat
    152018-04-20T16:51:51Z UpdateTip: new best=000000000000000000344c2bd4ca9642efdd8c42a641028008e1ae4dec880150 height=519108 version=0x20000000 log2_work=88.631246 tx=311321317 date='2018-04-20T12:27:09Z' progress=0.999821 cache=5.1MiB(37961txo)
    162018-04-20T16:51:52Z tor: Thread interrupt
    172018-04-20T16:51:52Z Shutdown: In progress...
    
  4. fanquake added the label P2P on Apr 24, 2018
  5. lmanners referenced this in commit 5ee687c899 on May 10, 2018
  6. lmanners referenced this in commit a909f95099 on May 10, 2018
  7. lmanners referenced this in commit 5017e2602b on May 10, 2018
  8. lmanners referenced this in commit 8e2e21bf05 on May 10, 2018
  9. mruddy commented at 12:31 pm on May 21, 2018: contributor
    Appears to be fixed by #13212
  10. lmanners referenced this in commit 793290f940 on Jun 21, 2018
  11. laanwj closed this on Jul 22, 2018

  12. laanwj referenced this in commit a6f00ce66f on Jul 22, 2018
  13. HashUnlimited referenced this in commit 04f9191608 on Sep 12, 2018
  14. joemphilips referenced this in commit 267508270e on Nov 9, 2018
  15. jfhk referenced this in commit 090147f80e on Nov 14, 2018
  16. codablock referenced this in commit 1524185462 on Apr 8, 2020
  17. ckti referenced this in commit f814dc0e7c on Mar 28, 2021
  18. MarcoFalke locked this on Sep 8, 2021
  19. furszy referenced this in commit cc8798644d on Jan 3, 2022
  20. furszy referenced this in commit 6a657cc573 on Jan 19, 2022
  21. furszy referenced this in commit dd13d6af3c on Jan 20, 2022
  22. gades referenced this in commit c653db3dea on Feb 20, 2022


mruddy

Labels
P2P


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-03-31 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me