mempool_reorg times out on valgrind run #18440

issue MarcoFalke openend this issue on March 26, 2020
  1. MarcoFalke commented at 3:38 pm on March 26, 2020: member

    Not sure if the test failure is because of a timeout or a race that only becomes visible when run in valgrind.

    Example: https://travis-ci.org/github/bitcoin/bitcoin/jobs/666899059#L6964

  2. MarcoFalke added the label Bug on Mar 26, 2020
  3. MarcoFalke added the label Tests on Mar 26, 2020
  4. MarcoFalke commented at 3:40 pm on March 26, 2020: member
    Seems more like a race independent of valgrind, since there is a suspected duplicate bug report here: #11425
  5. practicalswift commented at 5:54 pm on March 26, 2020: contributor

    Nice catch!

    From the Valgrind documentation FWIW:

    The main thing to point out with respect to threaded programs is that your program will use the native threading library, but Valgrind serialises execution so that only one (kernel) thread is running at a time. This approach avoids the horrible implementation problems of implementing a truly multithreaded version of Valgrind, but it does mean that threaded apps never use more than one CPU simultaneously, even if you have a multiprocessor or multicore machine.

    Valgrind doesn’t schedule the threads itself. It merely ensures that only one thread runs at once, using a simple locking scheme. The actual thread scheduling remains under control of the OS kernel. What this does mean, though, is that your program will see very different scheduling when run on Valgrind than it does when running normally. This is both because Valgrind is serialising the threads, and because the code runs so much slower than normal.

    This difference in scheduling may cause your program to behave differently, if you have some kind of concurrency, critical race, locking, or similar, bugs. In that case you might consider using the tools Helgrind and/or DRD to track them down.

  6. MarcoFalke commented at 5:56 pm on March 26, 2020: member
    I would assume it is a race in the test code, not in Bitcoin Core
  7. MarcoFalke closed this on May 3, 2020

  8. DrahtBot locked this on Feb 15, 2022

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: 2024-11-24 03:12 UTC

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