Possible Deadlock #8599

issue jonasschnelli opened this issue on August 26, 2016
  1. jonasschnelli commented at 9:24 AM on August 26, 2016: contributor

    Just updated a node to current master (+https://github.com/bitcoin/bitcoin/pull/7685), the node ran successfully for a couple of weeks, shortly after updating to current master, I ran in a deadlock assertion: I think the possible deadlock is not related to the PR which I'm running on top.

    2016-08-26 07:50:29 POTENTIAL DEADLOCK DETECTED
    2016-08-26 07:50:29 Previous lock order was:
    2016-08-26 07:50:29  pnode->cs_vRecvMsg  net.cpp:1885 (TRY)
    2016-08-26 07:50:29  cs_main  main.cpp:4726
    2016-08-26 07:50:29  (1) pfrom->cs_filter  main.cpp:4784
    2016-08-26 07:50:29  (2) cs_vSend  net.cpp:2683
    2016-08-26 07:50:29 Current lock order is:
    2016-08-26 07:50:29  (2) pnode->cs_vSend  net.cpp:1904 (TRY)
    2016-08-26 07:50:29  cs_main  main.cpp:6343 (TRY)
    2016-08-26 07:50:29  pto->cs_inventory  main.cpp:6563
    2016-08-26 07:50:29  (1) pto->cs_filter  main.cpp:6586
    
  2. laanwj added the label P2P on Aug 26, 2016
  3. laanwj commented at 11:02 AM on August 26, 2016: member

    Can you try to convert the line numbers to what they'd be on a fixed commit, e.g. https://github.com/bitcoin/bitcoin/blob/65837375d98b3e9949d15dc05e66e6356eada283/src/net.cpp#L1885 is not a line that takes a lock so other people can't do anything with this error as-is.

  4. jonasschnelli commented at 12:12 PM on August 26, 2016: contributor

    The linenumbers match on the head of #7685. Here are the direct links to the source code:

    2016-08-26 07:50:29 POTENTIAL DEADLOCK DETECTED
    2016-08-26 07:50:29 Previous lock order was:
    2016-08-26 07:50:29  pnode->cs_vRecvMsg  net.cpp:1885 (TRY)
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/net.cpp#L1885

    2016-08-26 07:50:29  cs_main  main.cpp:4726
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/main.cpp#L4726

    2016-08-26 07:50:29  (1) pfrom->cs_filter  main.cpp:4784
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/main.cpp#L4784

    2016-08-26 07:50:29  (2) cs_vSend  net.cpp:2683
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/net.cpp#L2683

    2016-08-26 07:50:29 Current lock order is:
    2016-08-26 07:50:29  (2) pnode->cs_vSend  net.cpp:1904 (TRY)
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/net.cpp#L1904

    2016-08-26 07:50:29  cs_main  main.cpp:6343 (TRY)
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/main.cpp#L6343

    2016-08-26 07:50:29  pto->cs_inventory  main.cpp:6563
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/main.cpp#L6563

    2016-08-26 07:50:29  (1) pto->cs_filter  main.cpp:6586
    

    https://github.com/jonasschnelli/bitcoin/blob/50055956478e38fd6adf7b3c884c40f740e5d345/src/main.cpp#L6586

  5. laanwj commented at 3:39 PM on August 26, 2016: member

    Thanks.

  6. sipa closed this on Sep 7, 2016

  7. DingGeng-GitHub commented at 9:04 AM on February 26, 2019: none

    错误: 2019-02-26T08:18:21Z POTENTIAL DEADLOCK DETECTED 2019-02-26T08:18:21Z Previous lock order was: 2019-02-26T08:18:21Z cs_main net_processing.cpp:2462 2019-02-26T08:18:21Z (1) pool.cs validation.cpp:398 2019-02-26T08:18:21Z cs_main wallet/wallet.cpp:1279 2019-02-26T08:18:21Z (2) cs_wallet wallet/wallet.cpp:1279 2019-02-26T08:18:21Z Current lock order is: 2019-02-26T08:18:21Z cs_main wallet/wallet.cpp:1800 2019-02-26T08:18:21Z (2) cs_wallet wallet/wallet.cpp:1800 2019-02-26T08:18:21Z (1) g_mempool.cs wallet/wallet.cpp:1821

    环境:Ubuntu16.04 Bitcoin ABC RPC client version v0.19.0.0-e619210

    只要启动环境就报上面的错,请问该怎么解决?QQ:707170913 解决有红包

  8. fanquake deleted a comment on Feb 26, 2019
  9. fanquake locked this on Feb 26, 2019
  10. fanquake commented at 12:22 PM on February 26, 2019: member

    Bitcoin ABC RPC client version v0.19.0.0-e619210

    This issue tracker is not for Bitcoin ABC.


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: 2026-04-15 15:15 UTC

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