Infinite recursion when using -debug and DEBUG_LOCKORDER #1213

issue TheBlueMatt opened this issue on May 6, 2012
  1. TheBlueMatt commented at 11:43 PM on May 6, 2012: contributor

    push_lock -> printf -> OutputDebugStringF -> GetDataDir -> LOCK -> push_lock

  2. gavinandresen commented at 12:16 AM on May 7, 2012: contributor

    LOCK inside OutputDebugStringF or any of the routines it calls is a big no-no...

  3. sipa commented at 12:36 AM on May 7, 2012: member

    GetDataDir should not lock, except the first time it is called

  4. TheBlueMatt commented at 12:43 AM on May 7, 2012: contributor

    You could reasonably just remove the lock, GetDataDir is called a few times before any other threads are started, so its pretty safe, but I probably missed an edge case or two.

  5. sipa commented at 12:45 AM on May 7, 2012: member

    Or make sure it's called once beforehand?

  6. TheBlueMatt commented at 1:04 AM on May 7, 2012: contributor

    Simple enough either way.

  7. laanwj cross-referenced this on Aug 31, 2012 from issue Delete some dead wallet* code. by jgarzik
  8. laanwj commented at 9:40 AM on March 29, 2013: member

    Is this still the case?

  9. laanwj added the label Tests on Jul 31, 2014
  10. sipa commented at 11:08 PM on August 3, 2014: member

    I believe this code was significantly changed since.

  11. TheBlueMatt cross-referenced this on Oct 5, 2014 from issue bitcoin-qt keeps freezing every ~10 seconds by rebroad
  12. laanwj closed this on Feb 9, 2016

  13. suprnurd referenced this in commit ff12698ed5 on Dec 5, 2017
  14. lateminer referenced this in commit c87e273f50 on Jan 22, 2019
  15. dexX7 referenced this in commit d17e8c7ef7 on Apr 8, 2021
  16. bitcoin locked this on Sep 8, 2021

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-05-19 06:55 UTC