Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qtdeploy depletes computer resources #817

Closed
tapir opened this issue Apr 4, 2019 · 4 comments
Closed

qtdeploy depletes computer resources #817

tapir opened this issue Apr 4, 2019 · 4 comments

Comments

@tapir
Copy link

tapir commented Apr 4, 2019

So I've been having this issue since I've started to use qtdeploy but can't reproduce it in anyway so I'm just gonna report it here by the chance that you might know what's causing this.

After I do qtdeploy build linux, once in a while (this is the part I can't reproduce) I get 8 processes (each) of as, cc1, cc1plus, cgo hanging in the background even after the application finished building. They just keep going and make my machine unusable. I've tried to wait it out but seems like it's not possible. One time I've at least waited for 30 minutes but they didn't exit.

Any ideas? Thanks

@therecipe
Copy link
Owner

Hey

I will investigate and try to reproduce it, but usually it shouldn't be possible for these processes to keep running after a successful build.

However, it could be possible that they keep running after canceling the build with ^C or something.

But, if you use go modules by any chance, then maybe it's a side effect of go list (take a look here golang/go#29452)
Do you use code completion in your editor or IDE?
If yes, then chances are great that go list is called somewhere down the line.

@tapir
Copy link
Author

tapir commented Apr 4, 2019

Hi go list is not used but ^C is used a lot due to compile time taking long and I'm noticing typos etc..
I think that's it! Is it possible to make qtdeploy respond to os signal like below?

terminate = make(chan os.Signal, 1)
signal.Notify(terminate, os.Interrupt, os.Kill, syscall.SIGTERM)
select {
    case <-terminate:
    //do something
}

@tapir
Copy link
Author

tapir commented Apr 4, 2019

Strangest thing happened just now. I've opened up Visual Studio Code (my choice of IDE for Go) and lots of compiler processes started right away. I did not do any qtdeploy at all. I might add this doesn't happen in any other Go project. What might cause QT and vscode go extension to not play well together?

Edit: Sorry I've just noticed this is what you meant by go list. Yes indeed vscode uses it.
Edit2: After reading that issue a bit I'm almost certain that this is a go list issue.

@tapir tapir closed this as completed Apr 4, 2019
@therecipe
Copy link
Owner

I will check if I can make use of Notify like in #817 (comment), but the spawned processes should usually already stop with qtdeploy. (will try to verify that thought)

About the go list issue, I wrote a bit about it here #755 (comment)

also, golang/go#29452 which causes go list to compile cgo code
and whose workaround CGO_ENABLED=0 won't work if you also use GOPROXY=disallow

So, maybe try to set CGO_ENABLED=0 in VSCode somehow to work around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants