fibers icon indicating copy to clipboard operation
fibers copied to clipboard

tests/cancel-timer.scm: heap grew too much: 95.16 MiB vs. 4.75 MiB

Open jas4711 opened this issue 10 months ago • 3 comments

Hi! I was going through changes since the 1.3.1 release to see if anything could be back-ported (a new release would be nice, let me know if you need help :)), and while doing so I ran make check on git commit 96cd1f4d4639b5c0f0b2fb7ebfd29b339a368dcc and got a failure:

heap grew too much: 95.16 MiB vs. 4.75 MiB
FAIL: tests/cancel-timer.scm

This is on a Trisquel GNU/Linux aramo system with a bunch of custom packages coming from Guix. /usr/bin/guile is 3.0.7 from Ubuntu 22.04 era.

/Simon

jas4711 avatar Feb 18 '25 08:02 jas4711

Hi @jas4711,

A new release would definitely be welcome—pinging @wingo and @aconchillo, though my impression is that they’re unavailable to help with this.

I cannot reproduce the tests/cancel-timer.scm failure you mention (with Guix: Guile 3.0.9, libgc 8.2.4; I consistently get final heap size: 5.12 MiB), but we’ve seen it before on GitHub CI (example).

Is the failure 100% deterministic for you? What version of libgc are you using?

civodul avatar Mar 31 '25 12:03 civodul

The test is bogus -- bounding the heap in that way with libgc will not work. Total heap usage depends too much on number of threads and random internals, and fibers can make many threads.

wingo avatar Apr 04 '25 13:04 wingo

Hey @wingo,

I'm well aware that this depends on a number of factors but thought we could base this on empirical observations.

We could set a much higher threshold and the test would still be effective (e.g., allowing a tenfold growth instead of twofold); and/or we could control parameters more strictly, starting with #:parallelism 1.

WDYT?

civodul avatar Apr 08 '25 10:04 civodul