Open tonycoz opened 1 month ago
Do we know what kind of hashing is used for the base address, and how likely conflicts are in general? It sounds like if we waited until we bumped the version again, the precise failure we're seeing here would disappear. But if the hashing is meant to prevent this issue, it seems odd that we're seeing it now. Did we just get incredibly unlucky, or has something else changed that would make this type of failure more likely?
The hash doesn't look like anything complex.
I think we just ran into a hash collision, with 64-bits it's unlikely to happen, but it has here. I expect it's even worse for 32-bit cygwin, but we don't test that, and cygwin no longer support it.
The base calculation uses 17 bits of the hash (vs 10 for 32-bit), so a simple direct collision I think it's about 1 in 89 chance of a direct conflict.
I'm working on a workaround fix for the CI failure (adding -Dstatic_ext) and a note for perldelta.
Module:
Description
Since the 5.39.10 version bump CI has been failing on Cygwin with errors like:
I've managed to reproduce this locally and consistently with current cygwin, though with a different address:
This is likely caused by a conflict between
cygperl5._39_10.dll
andmro.dll
:Building without
-DDEBUGGING
does not fail to work, probably because the DLL uses less address space and hence there's no conflict:I think this was caused by the name change for the cygperl DLL introduced by the version bump.
We use
--enable-auto-image-base
in the perl and module makefiles to generate the base addresses of DLLs in the perl build in cygwin. This generates the DLL bases addresses based on a hash of the DLL name, resulting in the conflict here.Steps to Reproduce
On cygwin, build perl with:
fork with mro loaded:
Expected behavior
fork() is successful.
Perl configuration