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

[PATCH] fix a race condition in parallel builds with Visual C #15150

Closed
p5pRT opened this issue Jan 26, 2016 · 6 comments
Closed

[PATCH] fix a race condition in parallel builds with Visual C #15150

p5pRT opened this issue Jan 26, 2016 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 26, 2016

Migrated from rt.perl.org#127381 (status was 'resolved')

Searchable as RT127381$

@p5pRT
Copy link
Author

p5pRT commented Jan 26, 2016

From @bulk88

Created by @bulk88

See branch
http​://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/bulk88/w32_para_race_fix

Perl Info

Flags:
     category=core
     severity=low

Site configuration information for perl 5.23.5:

Configured by Owner at Sun Oct 25 19:14:27 2015.

Summary of my perl5 (revision 5 version 23 subversion 5) configuration:
   Derived from: 644207b7a8ff7a2b1661c05a7f9ac2df9a5dad91
   Platform:
     osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     useithreads=define, usemultiplicity=define
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 
-D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE 
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS',
     optimize='-O1 -MD -Zi -DNDEBUG -GL',
     cppflags='-DWIN32'
     ccversion='18.00.31101', gccversion='', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, 
doublekind=3
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, 
longdblkind=0
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, 
Off_t='__int64', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf 
-ltcg         -libpath:"c:\p523\lib\CORE"         -machine:x86 
"/manifestdependency:type='Win32' 
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' 
language='*'" -subsystem:console,"5.01"'
     libpth=\lib
     libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib 
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
     perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib 
oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib 
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
     libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl523.lib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug 
-opt:ref,icf -ltcg         -libpath:"c:\p523\lib\CORE"  -machine:x86 
"/manifestdependency:type='Win32' 
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' 
language='*'" -subsystem:console,"5.01"'

Locally applied patches:
     uncommitted-changes


@INC for perl 5.23.5:
     C:/p523/site/lib
     C:/p523/lib
     .


Environment for perl 5.23.5:
     HOME (unset)
     LANG (unset)
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
     PATH=C:\p523\site\bin;C:\p523\bin;C:\Program Files\ActiveState 
Komodo Edit 
9\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 
Files\TortoiseGit\bin;C:\Program Files\Microsoft Windows Performance 
Toolkit\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\;C:\Program Files\Microsoft 
SDKs\TypeScript\1.0\;C:\Program Files\TortoiseHg\;
     PERL_BADLANG (unset)
     SHELL (unset)


@p5pRT
Copy link
Author

p5pRT commented Jan 26, 2016

From @bulk88

patch attached

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jan 26, 2016

From @bulk88

0001-fix-a-race-condition-in-parallel-builds-with-Visual-.patch
From 86904a6324a8267893184b28e585504d9577b72b Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 26 Jan 2016 05:24:07 -0500
Subject: [PATCH] fix a race condition in parallel builds with Visual C

On older VCs a "gmake -j2 ..\generate_uudmap.exe ..\perlglob.exe" will
generate warnings, on newer VCs, a fatal error in 1 or the other cl.exe
process. This is because both cl.exes are trying to lock and write to
vc*0.pdb, the same file. Add PDBOUT option so uudmap and perlglob have
their own pdb files named after themselves and they cant conflict in a
parallel build.
---
 win32/GNUmakefile |    6 +++---
 win32/makefile.mk |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 6dd26e7..3abcba6 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -1112,8 +1112,8 @@ $(GLOBEXE) : perlglob.c
 ifeq ($(CCTYPE),GCC)
 	$(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
 else
-	$(CC) $(OPTIMIZE) -Fe$@ perlglob.c -link $(BLINK_FLAGS) setargv$(o) \
-	$(LIBFILES) && $(EMBED_EXE_MANI)
+	$(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
+	setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
 endif
 
 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
@@ -1413,7 +1413,7 @@ ifeq ($(CCTYPE),GCC)
 	$(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
 	$(BLINK_FLAGS) $(LIBFILES)
 else
-	$(CC) $(CFLAGS_O) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS) 
+	$(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS)
 	$(EMBED_EXE_MANI)
 endif
 
diff --git a/win32/makefile.mk b/win32/makefile.mk
index edc7311..2403aa7 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1087,8 +1087,8 @@ $(GLOBEXE) : perlglob.c
 .IF "$(CCTYPE)" == "GCC"
 	$(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
 .ELSE
-	$(CC) $(OPTIMIZE) -Fe$@ perlglob.c -link $(BLINK_FLAGS) setargv$(o) \
-	$(LIBFILES) && $(EMBED_EXE_MANI)
+	$(CC) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
+	setargv$(o) $(LIBFILES) && $(EMBED_EXE_MANI)
 .ENDIF
 
 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
@@ -1382,7 +1382,7 @@ $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h
 	$(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
 	$(BLINK_FLAGS) -x $(mktmp $(LKPRE) $(LIBFILES) $(LKPOST))
 .ELSE
-	$(CC) $(CFLAGS_O) -Fe..\generate_uudmap.exe ..\generate_uudmap.c @$(mktmp -link $(LIBFILES)) -link $(BLINK_FLAGS) 
+	$(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c @$(mktmp -link $(LIBFILES)) -link $(BLINK_FLAGS)
 	$(EMBED_EXE_MANI:s/$@/..\generate_uudmap.exe/)
 .ENDIF
 	$(GENUUDMAP) $(GENERATED_HEADERS)
-- 
1.7.9.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Jan 27, 2016

From @tonycoz

On Tue Jan 26 15​:43​:39 2016, bulk88 wrote​:

patch attached

Thanks, applied as 8e925de.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jan 27, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 27, 2016

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant