Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 16.0.0-beta1
-
None
Description
There is a project that uses lots of RAM to build, and is also pretty slow to build, thing is if you notice that you are running out of RAM and click cancel it pretends that it cancelled the job but in fact didn't. Well it did but not properly.
I can't reproduce this with simple projects, and even tried to fix QtCreator code myself but gave up on following it, but I can try patches of hints on where to fix.
https://github.com/fair-acc/gnuradio4
This is the project in question, be careful not to get OOM it's easy, even easier when your N last builds are still running
So on cmd line if you call cmake --build.. and hit CTRL + C the nice kill signal is sent, and it will start the stop build procedures, sometimes it kills the g++ jobs fast sometimes not that fast, but will eventually do it not leaving any orphan process behing.
If instead I kill -9 the cmake process then the same QtCreator behavior happens, it will keep building the project, since each g++ task takes quite some time and ram it will stay there until it finished, I think no new g++ task is started as cmake is now dead but if I ask cmake to build again now I have the old g++ jobs and the new ones so OOM is easier.
So I believe QtCreator is not calling QProcess::kill() and waiting for a good amount of time, I think 1 minute should be max, then terminate informing with that red font that it had to terminate cmake, so the user like me, doesn't think the job really stopped and start a new one just to get into OOM.
As I said I have now a local build of QtCreator even tried to d->m_taskTreeRunner.cancel(); instead of reset(), as I spotted it's this code that seems to trigger the cancel but was lost on the code. It's likely more productive to be guided where this could be fixed or maybe you already know the issue.
Thanks.