5

When I start intellij, which loads an "haxe" project at startup, it sometimes happens that intellij hangs loading. I than start htop (also tried top) with "sudo". iotop is also not showing anything interesting.

I can see that one of my cpus is used "100%" (which is normally not the case) but htop does not show any process which uses the cpu.

The information, that one cpu uses 100% comes from htop.

What else could take 100% of the cpu time and how can I find it?

Edit

I gathered some more information, the output of vmstat 10 10 (while the problem occurs) is this:

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 8  0      0 12013656 285632 2150392    0    0    63    47   71  244  5  1 93  1  0
11  0      0 12009724 285664 2150384    0    0     0    14  737 1238  6  4 90  0  0
11  0      0 11994592 285680 2150364    0    0     0     6  720  990  6  3 91  0  0
11  0      0 11994516 285704 2150364    0    0     0    12  689  610  6  3 91  0  0
11  0      0 12000456 285736 2150360    0    0     0    12  709  702  6  3 91  0  0
11  0      0 12000696 285760 2150364    0    0     0    22  696  630  6  3 91  0  0
11  0      0 12008016 285784 2150364    0    0     0    13  728  784  6  3 91  0  0
11  0      0 12008356 285816 2150356    0    0     0   232  678  924  6  3 90  0  0
11  0      0 12007908 285840 2150400    0    0     0    15  628  548  6  3 91  0  0
11  0      0 11998248 285872 2150392    0    0     0    35  978 1432 11  4 84  0  0

Also I ran:

ps -e -o state,pid,cmd | grep ^D

but the output is empty.

And

ps -e -o state,pid,cmd | grep \^R

returns:

R  1705 /usr/bin/gnome-shell
R  7113 zsh
R  7466 ps -e -o state,pid,cmd

(and does not change even after lots of repeats)

Nathan
  • 324
  • 5
  • 16
  • Could you show us, via adding to your question, whatever information you have that leads you to believe one CPU is used 100%? Have you tried vmstat? – Doug Smythies Jul 06 '15 at 23:40
  • The information comes from htop, I added that to the question. I have not looked at vmstat jet. I will do that the next time the problem occurs. Unfortunately it occurs very irregular. This morning everything is fine and I have no clue why. – Nathan Jul 07 '15 at 08:40
  • without more information, the only thing I can think of is an uninterruptible sleep situation. For when it next occurs, a method to check is ps -e -o state,pid,cmd | grep ^D – Doug Smythies Jul 07 '15 at 14:04
  • It can be difficult to get useful information from one vmstat sample, try vmstat 5 5. Also try ps -e -o state,pid,cmd | grep ^R to see what is running (do it a few times). In top do you observe a lot of wait time? – Doug Smythies Jul 08 '15 at 15:50
  • Ok, I have added the information. In top the "wa" is very low, at 0 most of the time. But the vmstat output shows high wa. Could that be it? – Nathan Jul 10 '15 at 12:15
  • with vmstat the header and the data columns are not aligned. The wait time is actually 0. How many CPUs do you have? vmstat is showing a constant 6% user and 3% system CPU load. But it also shows 11 processes always running, odd. – Doug Smythies Jul 10 '15 at 14:55
  • I have 6 CPUs. Maybe i should take this to some intellij forum. – Nathan Jul 10 '15 at 15:16
  • For 6 CPUs, vmstat only shows a total load of what would be 54% on one. I am out of ideas. It does seem to perhaps be some race condition during start up that ends up in some locked condition, but I am just guessing. It might be interesting to compare vmstat output when it is working properly. Hopefully someone else will chime in with some ideas. – Doug Smythies Jul 10 '15 at 15:28

2 Answers2

2

The Ubuntu Kernel Team has a wiki explaining how to identify power sucking applications. This may have some useful ideas or tips to debug this issue of yours.

See: https://wiki.ubuntu.com/Kernel/PowerManagement/IdentifyingIssues

top is a useful tool to see the top CPU consumers, however it cannot easily spot short lived processes or threads that get created and die very quickly. For these kind of CPU sucking processes, I developed forkstat to try and track these down. It is available in recent releases of Ubuntu, or you can download it from ppa:colin-king/white (see http://kernel.ubuntu.com/~cking/forkstat/)

0

I had this issue recently. I discovered this was caused by an SD Adapter for microSD. When I insert a 32GB SDHC U1 Samsung microSD with two partitions (one 8GB vfat and one 24GB ext2) Lubuntu fails to detect and mount the device. In top/lxtask I do not see any processes using cpu however my cpu usage is a steady 100%. The cpu goes down to 0% when the card is removed.