Odd hang of cc1.exe *now isolated somewhat* cpp/gcc

Shaddy Baddah lithium-cygwin@shaddybaddah.name
Tue Apr 28 05:23:46 GMT 2020


Hi,

On 27/4/20 4:54 pm, Shaddy Baddah wrote:
> Further, doing an strace seems to me to be a little revealing. Whilst
> I see cc1.exe in taskmgr, I do not see the process in strace.

I realise now that I mightn't expect to see the cc1 process by name in
the trace. But I have further information that supercedes this.

First, I have a 32-bit install alongside the 64-bit, and gcc/cpp/cc1
run fine.

I've also isolated the cc1 hang a little. If I run cpp -v hello.c, I
obtain the cc1 command-line. Running this directly from a command
prompt, cc1 runs fine:

% > ..\lib\gcc\x86_64-pc-cygwin\9.3.0\cc1.exe -E -quiet -v -idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../lib/../include/w32api 
-idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api 
c:\Users\Public\Temp\cygwin64\hello.c -mtune=generic -march=x86-64
ignoring nonexistent directory "/usr/local/include"
% ...
% }
%
% >

If I run it from bash (or ash), I get the hang:

% $  /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/cc1.exe -E -quiet -v -idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../lib/../include/w32api 
-idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api 
hello.c -mtune=generic -march=x86-64
% <hang until ctrl-c>

However, if I run it under strace, it runs to completion:


% $ strace -o cc1.out -f /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/cc1.exe -E 
-quiet -v -idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../lib/../include/w32api 
-idirafter 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api 
hello.c -mtune=generic -march=x86-64
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include"
% ...
% }
%
% $

I know at this stage, this problem looks even more localised. But by
my reckoning, it seems unlikely that this is an issue to do with the
various agent processes etc. installed. Because why would running cc1
directly from command prompt not be affected or intercepted?

I feel it is more likely to be a side-effect of a recent Windows
update. From my previous email, it seems like a hang in
WaitForMultipleObjects()... a race-condition of some sort??? By why.

Any ideas? Anyone else having gcc issues?

--
Regards,
Shaddy


More information about the Cygwin mailing list