Odd hang of cc1.exe, when invoking cpp/gcc

Shaddy Baddah lithium-cygwin@shaddybaddah.name
Mon Apr 27 06:54:29 GMT 2020


First, I want to acknowledge that this could be exclusively a problem
with my Windows 10 desktop.

The problem I am having is when I run a simple gcc command, say gcc
hello.c, the command hangs.

In mintty, ctrl-c won't kill it. And I have to carefully kill the gcc
process taskmgr, then kill the child cc1 process, before returning to
mintty. Otherwise mintty freezes up and I have to manually kill it
too. From console, ctrl-c just works.

This is happening on my Windows 10 desktop that is a corporate build
of Windows. It is the subject of forced updates, lots of BLODA
potential agents, and weird policies.

It doesn't happen on my personal Windows 10 desktop, so I acknowledge
that this will prejudice this attempt for assistance.

But in the hope that there might be a clue as to why this is
happening, I'll expand a bit further. gcc was working fine as recently
as two months ago. Of course there have been Windows updates, and
Cygwin updates performed since. But as I don't use gcc daily, I don't
know which of these might have broke it.

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.

So if I do strace -f gcc hello.c, these are the dwindling lines of
output from strace:

   184 6193312 [main] gcc 730 child_info::child_info: subproc_ready 0x2F4
537090 6730402 [main] gcc 730 child_info_spawn::worker: pid 731, 
prog_arg /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/cc1.exe, cmd line (null))
  1646 6732048 [main] gcc 730 open_shared: name cygpid.731, n 731, 
shared 0x160000 (wanted 0x0), h 0x31C, *m 5
   269 6732317 [main] gcc 730 time: 1587970202 = time(0x0)
   301 6732618 [main] gcc 730 proc_subproc: args: 1, -25504
   378 6732996 [main] gcc 730 proc_subproc: returning 1
  1984 6734980 [main] gcc 730 proc_subproc: args: 2, -25504
  4374 6739354 [main] gcc 730 pinfo::wait: created tracking thread for 
pid 731, winpid 0x1668, rd_proc_pipe 0x2FC
   478 6739832 [main] gcc 730 proc_subproc: added pid 731 to proc table, 
slot 0
   355 6740187 [main] gcc 730 proc_subproc: returning 1
  3219 6743406 [main] gcc 730 child_info_spawn::worker: spawned windows 
pid 5736
  2144 6745550 [main] gcc 730 child_info::sync: n 2, waiting for 
subproc_ready(0x2F4) and child process(0x308) --- Process 2784 (pid: 
730) thread 15060 created
--- Process 2784 (pid: 730) thread 19632 created

After a little while, I see staggered (and continuing) lines like:

--- Process 2784 (pid: 730) thread 17992 exited with status 0x0
--- Process 2784 (pid: 730) thread 2624 exited with status 0x0
--- Process 2784 (pid: 730) thread 18504 exited with status 0x0

Any ideas?


More information about the Cygwin mailing list