make -jX hangs on 64b Windows 7 where X > 1
as reported several times on mingw-users mailing list.
A bug report (with backtraces) can be found here:
http://article.gmane.org/gmane.comp.gnu.mingw.user/41040
It happens for me as well, independent on project I'm building.
In my case mostly erlang projects. make -j1 works but it's so slow.
WJFFM! How many CPU do you have?
Intel I5 so four CPU's, but I don't think that matters.
BTW the email posted above is not my backtraces, it was a detailed unanswered bug report on the mailing list.
The same thing happens here one of the make processes get stuck on 100% cpu utilization, i.e. 25% total util of my quad core.
Based on the archived post you point to, the result is after updating to 1.0.18 of MSYS. If you downgrade to 1.0.17 does it work for you?
exit all MSYS processes
Change directory to your MinGW prefix/bin direcotory
mingw-get upgrade msys-core-bin=1.0.17-1
Here is the backtraces from my system
running make -j6
Freeze/hangs on first the try
I have another make process but I can't attach to that process,
on the processes spends 25% cpu and the other is idle.
Do not know which one I managed to attach to.
Last edit: Dan Gudmundsson 2013-03-26
Ooops that didn't look great, sorry.
Will try downgrade tomorrow..
I surrounded your output with the markdown of ~~~~~~ preceded by a blank line.
Downgrading with: mingw-get upgrade msys-core-bin=1.0.17-1
works for me as well, or so it seems.
for (( i=0; i < 20; i=i+1)) ; do make clean; make -j6; done
Builds everything and do not cause a hanging make.
Will use this one until next update.
If you need testing, or other info, let me know.
So, it appears that MSYS-1.0.18 may have introduced a regression; assigning to Cesar, for follow up.
I've started experience problems with 'make' since very begining of using it long ago.
msys-1.0.8
Both -j and -j4 works well but sometimes fails at random places with something like '{command from recipe}.exe: command not found', then I just trying again. It's not very annoying. Also with '-j' it runs much more processes than number of cores processor have.
msys-1.0.17
With -j it launches a lot of processes (about 3 hundreds, I guess these are all files in makefile) and fails with:
make: *** wait: No children. Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No children. Stop.
Some files are compiled ok although.
With -j4 it seems work ok.
msys-1.0.18
With -j same as msys-1.0.17
With -j4 it hangs on 4th command with CPU load 25% (steady)
My system: Windows 7 Pro 64-bit, Intel Core i5-2500 (4 cores), antivirus disabled and shut down, windows defender disabled.
Last edit: Artem Pisarenko 2013-05-30
Looks like there was no solution to this yet?
I had the same problem, and it was definitely caused by upgrading from msys-1.0.17 to msys-1.0.18. Since the difference between the 2 was not quite big i digged through the sources and for my system (Windows 7 64bit) was able to fix it by changing the setting of has_unreliable_pipes in source/winsup/cygwin/wincap.cc to true.
The actual problem seems to come from _read() in source/winsup/cygwin/syscalls.cc. This functions checks the file descriptor only for available data when is_slow() returns true. In 1.0.17, for pipes this was answered as true for all WinNT based systems, but with the change to the wincap system now was only set for older OS.
I guess this change was taken from cygwin, and there it works because the signal handling is done different.
Thank you very much for tracking this down!
Indeed, the change was taken from cygwin.
No, it was only a typo by the Cygwin folks. The following patch was applied by them soon afterwards:
I'll apply it to MSYS as well and release 1.0.19 as soon as possible.
Thanks again!
Regards,
Cesar
More than 2 years later, we're still waiting for 1.0.19 to be relased with the fix!
Indeed. I don't seem to get much free time lately. Releases need rigorous testing to ensure a smooth upgrade. In the mean time, a buffer overflow issue was found and fixed.
As it happens, I do have quality free time (with very few distractions) until the end of the week. Let's hope for the best.
I'm glad MSYS still has users that care.
Regards,
Cesar
awesome. thank you for keeping the project alive.
I'm running into this right now as well, I tried to look for a 1.0.19 release, but didn't see one available via mingw-get upgrade. Is 1.0.19 going to be released soon?
MSYS runtime 1.0.19 was just released, please test. My own testing indicates an improvement, but I still see some random hangs, even with 1.0.17.
I confirm there's a huge improvement. It allowed us to parallelized our builds (option -j on make) and shave off around one hour of build time on a full release builds of our code on Jenkins. Our developers are also very happy of saving off precious time when building their stuff locally.
I can also confirm it doesn't fix everything. We still get a hang sometimes here and there, but they are now rare enough we can live with it.
Not perfect, but at least now it's usable :) Thank you very much!