GC hangs on spinlock in ConservativeGC.runLocked

klasbo klasbo at gmail.com
Mon Feb 20 21:28:27 UTC 2023


On Monday, 20 February 2023 at 16:31:18 UTC, Steven Schveighoffer 
wrote:
>
>
> This bug was fixed in 2.102.0: 
> https://dlang.org/changelog/2.102.0.html#druntime.nogc-traceinfo
>
> The actual bug: https://issues.dlang.org/show_bug.cgi?id=22616
>
> -Steve

I was using 2.100, so that would explain it then.

I don't quite understand the internals of the GC well enough to 
"get" what happens here. Is it that an assert in sweep() 
triggers, and this[1] scope(failure) in fullcollect() would 
re-trigger a GC collection when it tries to allocate the trace 
info (which is now fixed when trace info is nogc)?
Or the more important (for me) question: Is this part of "normal" 
GC control flow (why would assert(freedPages < usedPages) 
trigger? This is the beyond the limit of my GC understanding!), 
or is there still/also something broken on my end that I have to 
look for?

[1] 
https://github.com/dlang/dmd/blob/3457018e34ab2333de22a6285622d3190268d5e0/druntime/src/core/internal/gc/impl/conservative/gc.d#L3147

Thank you for the answer, and (to all involved) the work in 
fixing it!


More information about the Digitalmars-d mailing list