Some update on Cygwin hangs

Erik Joelsson erik.joelsson at oracle.com
Wed Oct 24 02:56:35 PDT 2012


Rerunning without my changes hung on first try while the run with the 
changes keep succeeding. I've pushed this now.

/Erik

On 2012-10-24 09:20, Erik Joelsson wrote:
> It ran without problems over night at least. I'm going to test on 
> other platforms to make sure I'm not regressing any and push it later 
> today. The scary thing with this hang is that it sometimes takes a 
> long time to trigger.
>
> /Erik
>
> On 2012-10-23 19:25, Kelly O'Hair wrote:
>> I had similar feelings when looking at GensrcIcons.gmk.
>>
>> There are times when the Setup*() patterns are worth it, and others 
>> where maybe it's just overkill and makes it hard to understand
>> what is going on.
>>
>> So keep us informed on this, and thanks for the info.
>>
>> -kto
>>
>> On Oct 23, 2012, at 8:10 AM, Erik Joelsson wrote:
>>
>>> I'm now experimenting with a rewrite of Images.gmk. It's currently 
>>> based around a lot of pattern rules, which makes it unique in the 
>>> new build, where most makefiles are using macro expansions to create 
>>> large sets of specific rules instead. I have rewritten the large 
>>> bulk of pattern rules to macro expansions (was surprisingly easy and 
>>> probably made it slightly more readable too). Initial test was 
>>> promising, but will let it build in a loop over night, fingers crossed.
>>>
>>> /Erik
>>>
>>> On 2012-10-22 10:42, Magnus Ihse Bursie wrote:
>>>> 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