ci: Lower and unify default stack size #29840

issue dergoegge openend this issue on April 10, 2024
  1. dergoegge commented at 7:04 am on April 10, 2024: member

    Default stack size differs across operating systems. E.g. the defaults for thread stack sizes: Linux: 8MiB, Windows 1MiB, FreeBSD 2MiB, OpenBSD 512 KiB.

    It would be sensible to lower the stack size used in all CI jobs to the lowest default, so we don’t miss stack overflow bugs that only occur with small stack sizes.

  2. maflcko commented at 7:34 am on April 10, 2024: member
    Any reason to not use half of the minimum, to more likely catch edge cases that would happen on unknown operating systems, or to more likely catch a runtime edge-case that is hit in production and not in the tests?
  3. maflcko added the label Brainstorming on Apr 10, 2024
  4. maflcko added the label CI failed on Apr 10, 2024
  5. maflcko removed the label CI failed on Apr 10, 2024
  6. maflcko added the label Tests on Apr 10, 2024
  7. laanwj commented at 1:40 pm on April 11, 2024: member

    FWIW, the command on Linux to set the stack size for a session is ulimit -s 512. Where the amount is in KiB. This sets the maximum for the main thread, as well as additional theads created.

    Any reason to not use half of the minimum, to more likely catch edge cases that would happen on unknown operating systems

    i’m not sure, yes in principle this makes sense, but also the work that goes in having our code run with say a 256KiB stack seems unnecessary work if the lowest we know used is 512KiB.


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-12-21 15:12 UTC

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