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

(Ubuntu) Stopping Analysis causes [Qthread] <defunt> in processes #21

Closed
angevinece opened this issue Dec 16, 2014 · 7 comments
Closed
Labels

Comments

@angevinece
Copy link
Contributor

Issue: After activating the "stop analysis" button on the GUI the system runs extremely slow.

I first looked at the Ubuntu user processes using the command, ~$ ps -u

Steps to Replicate Problem:

While running MOSAIC and analysing a file the user processes looks like this:

hiyomika@ubuntu:~$ ps -u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
hiyomika  2895  0.0  0.0  27836  4016 pts/11   Ss   12:40   0:00 bash
hiyomika  3271  0.0  0.0  27664  3372 pts/0    Ss   12:43   0:00 bash
hiyomika  6821 11.5 26.1 2694768 1056896 pts/11 Sl+ 14:33   0:07 python mosaicgui/mosaicGUI.py
hiyomika  6872 71.7 48.1 3613440 1945972 pts/11 R+  14:34   0:06 python mosaicgui/mosaicGUI.py
hiyomika  6880  0.0  0.0  22644  1292 pts/0    R+   14:34   0:00 ps -u

The program is running like it is suppose too. After hitting the Stop Analysis button the processes look like this.

hiyomika@ubuntu:~$ ps -u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
hiyomika  2895  0.0  0.1  27836  4964 pts/11   Ss   12:40   0:00 bash
hiyomika  3013  9.4 27.1 2276980 1098748 pts/11 Sl+ 12:40   0:21 python mosaicgui/mosaicGUI.py
hiyomika  3229 96.5  0.0      0     0 pts/11   Z+   12:43   1:29 [QThread] <defunct>
hiyomika  3271  0.0  0.1  27660  4644 pts/0    Ss   12:43   0:00 bash
hiyomika  3361  0.0  0.0  22644  1292 pts/0    R+   12:44   0:00 ps -u

The second thread responsible for the analysis of the file does not clear out while maintaining a high CPU percentage.

After refreshing the processes list we see the amount of CPU the defunct thread takes up lessens to almost nothing.

hiyomika@ubuntu:~$ ps -u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
hiyomika  2895  0.0  0.1  27836  4740 pts/11   Ss   12:40   0:00 bash
hiyomika  3271  0.0  0.1  27660  4520 pts/0    Ss   12:43   0:00 bash
hiyomika  3377  5.7 25.9 2306092 1047720 pts/11 Sl+ 12:45   4:37 python mosaicgui/mosaicGUI.py
hiyomika  3772  0.1  0.0      0     0 pts/11   Z+   12:52   0:08 [QThread] <defunct>
hiyomika  5970  0.0  0.0  22644  1292 pts/0    R+   14:05   0:00 ps -u

Good news is if you start another analysis run the defunct thread is replaced with a working thread.

Direct Symptoms: Expect system to run slow immediately after cancelling an analysis run.

Current Work Around: Close Program out and initialize to clear out the non working thread.

Update: When a file is allowed to continue unto completion the thread correctly clears. As shown below.

hiyomika@ubuntu:~$ ps -u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
hiyomika  2895  0.0  0.0  27836  4016 pts/11   Ss   12:40   0:00 bash
hiyomika  3271  0.0  0.0  27664  3372 pts/0    Ss   12:43   0:00 bash
hiyomika  6821 14.1 15.6 2273348 630608 pts/11 Rl+  14:33   1:35 python mosaicgui/mosaicGUI.py
hiyomika  7232  0.0  0.0  22644  1292 pts/0    R+   14:44   0:00 ps -u
@angevinece
Copy link
Contributor Author

Depending on how the binaries are being compiled, this may be what is causing the problem in #8.

@abalijepalli
Copy link
Member

I am unable to replicate the problem on Ubuntu. You should still have a single process active to run the GUI after you stop the analysis, so this is normal. One other question -- are you running parallel?

@angevinece
Copy link
Contributor Author

The parallel box for Parallel Processing is unchecked but it says 2 in the number of Processors.
I just opened up the advanced settings and it says:

"reserveNCPU": 2, 
"parallelProc": 0, 

I played around with the "Processors" switch and for 1 processor the advanced settings look like this,

"reserveNCPU": 3, 
"parallelProc": 0, 

@angevinece
Copy link
Contributor Author

But now that I think about it that is counting the number of processors I'm not using.

@angevinece
Copy link
Contributor Author

I double checked it on the other computer and it is having the same issue.

@angevinece
Copy link
Contributor Author

Yes, the update shows that the program is running correctly IF you let the file run to the end. However the error comes in when you stop the program before the file is completely analyzed.

@abalijepalli
Copy link
Member

I see the defunct QThread, but again I think that is normal as the thread is reused for subsequent runs. I haven't experienced any slow down in the system from hitting stop. The CPU utilization dissipates in a few seconds and from the log file the analysis appears to terminate normally.

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

No branches or pull requests

2 participants