Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cygwin DLL address conflict with version 5.41.6 #22695

Open
tonycoz opened this issue Oct 23, 2024 · 0 comments · Fixed by #22696
Open

cygwin DLL address conflict with version 5.41.6 #22695

tonycoz opened this issue Oct 23, 2024 · 0 comments · Fixed by #22696

Comments

@tonycoz
Copy link
Contributor

tonycoz commented Oct 23, 2024

Module:

Description
Similar to #22104 we're seeing address conflicts loading LangInfo.dll in CI:

      0 [main] perl 13868 child_info_fork::abort: address space needed by 'Langinfo.dll' (0x190000) is already occupied
Can't fork, trying again in 5 seconds at lib/MakeMaker/Test/Utils.pm line 325.
      0 [main] perl 13870 child_info_fork::abort: address space needed by 'Langinfo.dll' (0x190000) is already occupied
Can't fork, trying again in 5 seconds at lib/MakeMaker/Test/Utils.pm line 325.
      0 [main] perl 13872 child_info_fork::abort: address space needed by 'Langinfo.dll' (0x190000) is already occupied
Can't fork, trying again in 5 seconds at lib/MakeMaker/Test/Utils.pm line 325.
      0 [main] perl 13983 child_info_fork::abort: address space needed by 'Langinfo.dll' (0x190000) is already occupied
Can't fork, trying again in 5 seconds at lib/MakeMaker/Test/Utils.pm line 325.

And rebase shows the conflict:

$ rebase -i `find . -name '*.dll'` ./perl.exe | grep -F '*'
/home/tony/dev/perl/git/perl/cygperl5_41_6.dll                          base 0x00059f6d0000 size 0x010d8000 *
/home/tony/dev/perl/git/perl/lib/auto/I18N/Langinfo/Langinfo.dll        base 0x00059fe80000 size 0x00025000 *

And can be similarly reproduced:

$ ./perl -Ilib -MI18N::Langinfo -efork
      0 [main] perl 16510 child_info_fork::abort: address space needed by 'Langinfo.dll' (0x400000) is already occupied

I plan to prepare a fix and perldelta note PR.

Steps to Reproduce

  1. build perl, I've only tested with -DDEBUGGING, there may or may not be a conflict without it
  2. run ./perl -Ilib -MI18N::LangInfo -efork

Expected behavior
No error on fork.

Perl configuration

Summary of my perl5 (revision 5 version 41 subversion 6) configuration:
  Commit id: 161ff7336a85931cf738fbfbffcf68de4d2f1c81
  Platform:
    osname=cygwin
    osvers=3.5.4-1.x86_64
    archname=cygwin-thread-multi
    uname='cygwin_nt-10.0-19045 ganymede 3.5.4-1.x86_64 2024-08-25 16:52 utc x86_64 cygwin '
    config_args='-des -Dusedevel -DDEBUGGING'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='gcc'
    ccflags ='-D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2'
    optimize='-O3 -g'
    cppflags='-D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong'
    ccversion=''
    gccversion='12.4.0'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/lib /usr/lib/w32api /usr/local/lib /lib
    libs=-lpthread -ldl
    perllibs=-lpthread -ldl
    libc=/usr/lib/libcygwin.a
    so=dll
    useshrplib=true
    libperl=cygperl5_41_6.dll
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags=' --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
  Compile-time options:
    DEBUGGING
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_TRACK_MEMPOOL
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
  Built under cygwin
  Compiled at Oct 23 2024 12:47:36
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.41.6/cygwin-thread-multi
    /usr/local/lib/perl5/site_perl/5.41.6
    /usr/local/lib/perl5/5.41.6/cygwin-thread-multi
    /usr/local/lib/perl5/5.41.6
tonycoz added a commit to tonycoz/perl5 that referenced this issue Oct 23, 2024
The DLL load addresses are generated by the linker based on the DLL
names, and 5.39.10 we're getting a conflict between
cygperl5_41_6.dll and Langinfo.dll.

As a workaround, statically link Langinfo into cygperl for CI and
mention the problem in perldelta for anyone else who might build
perl on cygwin

Fixes but should not close Perl#22695
tonycoz added a commit to tonycoz/perl5 that referenced this issue Oct 23, 2024
The DLL load addresses are generated by the linker based on the DLL
names, and 5.39.10 we're getting a conflict between
cygperl5_41_6.dll and Langinfo.dll.

As a workaround, statically link Langinfo into cygperl for CI and
mention the problem in perldelta for anyone else who might build
perl on cygwin

Fixes but should not close Perl#22695
tonycoz added a commit that referenced this issue Oct 29, 2024
The DLL load addresses are generated by the linker based on the DLL
names, and 5.39.10 we're getting a conflict between
cygperl5_41_6.dll and Langinfo.dll.

As a workaround, statically link Langinfo into cygperl for CI and
mention the problem in perldelta for anyone else who might build
perl on cygwin

Fixes but should not close #22695
@tonycoz tonycoz reopened this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants