Some update on Cygwin hangs
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Oct 22 01:42:54 PDT 2012
More updates:
It does not seem to be mkdir that is the problem. The code that hangs
looks like this:
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
The install-file macro was defined elsewhere. Defining it locally did'nt
help. Exploding it in place didn't help. It looks like this:
$(MKDIR) -p $(@D)
$(CP) -fP '$<' '$@'
I added an additional
$(ECHO) testing
in front of the "Copying" line (suspecting macro expansion of patsubst
might be involved). The result was that it still hanged just before
executing the first line:
/usr/bin/echo testing
I sprinkled some $(info testing) in the recipe. These were all executed
properly, before the recipe execution. Then it still hanged at the first
echo.
I tried adding a dummy command:
touch /tmp/testing
as first, if there would be a problem with echo specifically. It
actually seemed to help, but this is tricky to repeat and I might have
let it run too short time. I changed this so that the mkdir statement
was first, instead of the echo. This still hanged.
I suspected the Makefile (Images.gmk) might be too complex -- or rather,
contain too many rules, and split it into two: J2SDKImages.gmk and
J2REImages.gmk. It did not help. If I run with J2REImages.gmk first, it
stops (as usual) on attach.diz, if I run with J2SDKImages.gmk first, it
stops on appletviewer.exe. It sounds like it's an sorted order of the
targets.
I tried running the makefile directly using make -f Images.gmk -I ...
SPEC=..., and it hanged, so it's not due to makefile calling makefile.
Just now, I attached to the hanged make with Visual Studio. It tells me
I'm at an INT 3 in ntdll, which Visual Studio helpfully tells me is the
result of a detected incorrect situation, such as trashed memory. Cygwin
debug symbols does not seem to be available for download, so I can't get
much further here, unfortunately.
Still, it's obvious that this is a bug in Cygwin make, and I've managed
to exclude a list of potential causes. But we still don't know what the
problem is or how to work around it. :-(
/Magnus
More information about the build-infra-dev
mailing list