ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.22k stars 262 forks source link

Musl: `rt.lifetime` testing the number of dtor calls fails #3803

Open Geod24 opened 3 years ago

Geod24 commented 3 years ago
#12 6058.0 Testing sentinel
#12 6058.0 /build/ldc/src/ldc-1.27.0-src/runtime/druntime-test-gc-debug/sentinel 
#12 6058.0 unexpected pointers 0x7f885d952008 and 0x7f885d95b008
#12 6058.0 core.exception.AssertError@../../src/rt/lifetime.d(1267): Assertion failure
#12 6058.0 ----------------
#12 6058.0 ??:? onAssertError [0x7f885df49de0]
#12 6058.0 ??:? _d_assert [0x7f885df4a2e0]
#12 6058.0 ../../src/rt/lifetime.d:1253 /build/ldc/src/ldc-1.27.0-src/runtime/druntime-test-gc-debug/sentinel [0x55857be1a190]
#12 6058.0 ../../src/rt/lifetime.d /build/ldc/src/ldc-1.27.0-src/runtime/druntime-test-gc-debug/sentinel [0x55857be200c0]
#12 6058.0 ??:? int core.runtime.runModuleUnitTests().__foreachbody2(object.ModuleInfo*) [0x7f885df79af0]
#12 6058.0 ??:? int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda2(immutable(object.ModuleInfo*)) [0x7f885df8ced0]
#12 6058.0 ??:? int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))).__foreachbody2(ref rt.sections_elf_shared.DSO) [0x7f885dfa3660]
#12 6058.0 ??:? int rt.sections_elf_shared.DSO.opApply(scope int delegate(ref rt.sections_elf_shared.DSO)) [0x7f885dfa59e0]
#12 6058.0 ??:? int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))) [0x7f885dfa3600]
#12 6058.0 ??:? int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) [0x7f885df8b4f0]
#12 6058.0 ??:? runModuleUnitTests [0x7f885df797f0]
#12 6058.0 ??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x7f885df975e0]
#12 6058.0 ??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x7f885df97560]
#12 6058.0 ??:? _d_run_main2 [0x7f885df97100]
#12 6058.0 ??:? _d_run_main [0x7f885df96ff0]
#12 6058.0 ../../src/core/internal/entrypoint.d:39 nothrow @nogc void core.sync.event.Event.__dtor() [0x55857be16810]
#12 6058.0 1/4 modules FAILED unittests
#12 6058.0 unexpected pointers 0x7f885c54b008 and 0x7f885c554008
#12 6058.0 make: *** [Makefile:19: /build/ldc/src/ldc-1.27.0-src/runtime/druntime-test-gc-debug/sentinel.done] Error 1
#12 6058.0 make: *** Waiting for unfinished jobs....

I'm seeing the following new failures while upgrading from v1.26.0 to v1.27.0. https://github.com/bosagora/docker-agora-builder/pull/15/checks?check_run_id=3249386316

The test in question: https://github.com/ldc-developers/druntime/blob/210784abe39f0f02c2a38f44a53a175c84038558/src/rt/lifetime.d#L1261-L1267

Any idea what could have caused this ? I went over the diff and couldn't find anything obvious.

kinke commented 3 years ago

I guess this would have been failing before, but the druntime integration tests were previously run with -O -release only: https://github.com/ldc-developers/ldc/pull/3714

kinke commented 3 years ago

Nope, looking at the log, the tests fail in both debug and release variants:

#12 6082.8 The following tests FAILED:
#12 6082.8  1688 - druntime-test-cycles-debug (Failed)
#12 6082.8  1690 - druntime-test-cycles-release (Failed)
#12 6082.8  1692 - druntime-test-gc-debug (Failed)
#12 6082.8  1694 - druntime-test-gc-release (Failed)

I don't have an idea why they would regress on musl only.