Bug 1348947 - agetty process consuming 100% CPU on the OSE node
Summary: agetty process consuming 100% CPU on the OSE node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhgs-server-container
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: RHGS Container Converged 1.0
Assignee: Humble Chirammal
QA Contact: Prasanth
URL:
Whiteboard:
Depends On: 1350819
Blocks: 1332128
TreeView+ depends on / blocked
 
Reported: 2016-06-22 11:36 UTC by Anoop
Modified: 2017-03-10 15:14 UTC (History)
10 users (show)

Fixed In Version: rhgs-server-docker-3.1.3-13
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1350819 (view as bug list)
Environment:
Last Closed: 2016-10-14 13:43:29 UTC
Embargoed:
pprakash: needinfo+


Attachments (Terms of Use)
sosreport from the node (6.93 MB, application/x-xz)
2016-07-18 12:01 UTC, Prasanth
no flags Details
sosreport-1 (6.26 MB, application/x-xz)
2016-07-19 07:50 UTC, Prasanth
no flags Details
sosreport-2 (6.29 MB, application/x-xz)
2016-07-19 07:52 UTC, Prasanth
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1493 0 normal SHIPPED_LIVE RHGS 3.1.3 container docker image 2016-08-04 18:06:18 UTC

Description Anoop 2016-06-22 11:36:11 UTC
agetty process on one of the node in my OSE cluster is consuming 100% CPU.

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                       
 42614 root      20   0  110036    844    720 R 100.0  0.0   1936:51 agetty                                                                                                                                        
 85852 root      20   0  976980  69320  29080 S   1.0  0.9   4:07.05 openshift        



 42614 root      20   0  110036    844    720 R 100.0  0.0   1937:09 agetty                                                                                                                                        
 85852 root      20   0  976980  69320  29080 S   1.7  0.9   4:07.31 openshift                                                                                                                                     
 11337 root      20   0 2469592  57212  14012 S   1.3  0.7  17:39.65 docker-current       


   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                       
 42614 root      20   0  110036    844    720 R 100.0  0.0   1937:21 agetty                                                                                                                                        
 85852 root      20   0  976980  69320  29080 S   2.0  0.9   4:07.48 openshift                                                                                                                                     
 11120 root      10 -10  418456  51872   9260 S   0.7  0.6   3:18.30 ovs-vswitchd          


Node : 10.70.43.160

Comment 1 Neha 2016-06-22 12:02:01 UTC
I do see same issue on my setup, 100 % utilization on two nodes.

Comment 5 Humble Chirammal 2016-06-22 15:02:33 UTC
Attaching  problematic process (agetty) to strace leads to below:

Its spinning on read(), however read() is successful.

[root@dhcp43-160 ~]# cat /tmp/strace_agetty.txt 
42614 19:26:56.182174 read(0</dev/tty1>, "", 1) = 0 <0.000014>
42614 19:26:56.182471 read(0</dev/tty1>, "", 1) = 0 <0.000009>
42614 19:26:56.182512 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182545 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182577 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182609 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182641 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182672 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182704 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182735 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182767 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182798 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182830 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182861 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182893 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182924 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182955 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.182986 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183034 read(0</dev/tty1>, "", 1) = 0 <0.000010>
42614 19:26:56.183074 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183107 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183139 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183171 read(0</dev/tty1>, "", 1) = 0 <0.000007>
42614 19:26:56.183202 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183234 read(0</dev/tty1>, "", 1) = 0 <0.000010>
42614 19:26:56.183282 read(0</dev/tty1>, "", 1) = 0 <0.000008>
42614 19:26:56.183315 read(0</dev/tty1>, "", 1) = 0 <0.000007>
42614 19:26:56.183346 read(0</dev/tty1>, "", 1) = 0 <0.000008>

.....


[root@dhcp43-160 ~]# ps aux |grep systemd
root          1  0.0  0.0 192200  7384 ?        Ss   Jun20   0:10 /usr/lib/systemd/systemd --system --deserialize 23
root        485  0.1  0.1  45408  9844 ?        Ss   Jun20   4:07 /usr/lib/systemd/systemd-journald
root        652  0.0  0.0  26872  2268 ?        Ss   Jun20   0:01 /usr/lib/systemd/systemd-logind
dbus        654  0.0  0.0 100768  2348 ?        Ssl  Jun20   0:02 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root      10910  0.0  0.0  43388  2288 ?        Ss   Jun20   0:00 /usr/lib/systemd/systemd-udevd -------------- [1]

root     111378  0.0  0.1  45404 12720 ?        Ss   15:25   0:00 /usr/lib/systemd/systemd-journald
root     111401  0.0  0.0  41488  1832 ?        Ss   15:25   0:00 /usr/lib/systemd/systemd-udevd                  ---------> [2]
root     111922  0.0  0.0  26400  1760 ?        Ss   15:25   0:00 /usr/lib/systemd/systemd-logind
dbus     111936  0.0  0.0  26464  1488 ?        Ss   15:25   0:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

there are couple of 'udev' process. 

Looking at the containers running in this system, I see only one container which is in 'privilege' mode.


[root@dhcp43-160 ~]# docker ps 
CONTAINER ID        IMAGE                                                                              COMMAND                  CREATED             STATUS              PORTS               NAMES
035fbf9b3dac        busybox                                                                            "sleep 3600"             43 minutes ago      Up 43 minutes                           k8s_busybox.cc96989f_busybox_aplo_516fa21e-386b-11e6-b7b2-5254004b88b2_c9f1c9ba
de04a60bfcb1        openshift3/ose-pod:v3.2.0.44                                                       "/pod"                   3 hours ago         Up 3 hours                              k8s_POD.6305dc28_busybox_aplo_516fa21e-386b-11e6-b7b2-5254004b88b2_87325127
e5c4fa7142f8        brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhgs3/rhgs-volmanager-rhel7   "/usr/bin/heketi -con"   4 hours ago         Up 4 hours                              k8s_heketi.3b63f3db_heketi-1-gxop7_aplo_c032f563-3865-11e6-b7b2-5254004b88b2_cd8852d0
7e6fcb55fa54        openshift3/ose-pod:v3.2.0.44                                                       "/pod"                   4 hours ago         Up 4 hours                              k8s_POD.ee96fd4c_heketi-1-gxop7_aplo_c032f563-3865-11e6-b7b2-5254004b88b2_1c78e083
8f4cb34a0b6f        brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhgs3/rhgs-server-rhel7       "/usr/sbin/init"         5 hours ago         Up 5 hours                              k8s_glusterfs.3c512e04_glusterfs-dc-dhcp43-160.lab.eng.blr.redhat.com-1-szxca_aplo_777729bc-385f-11e6-bf37-5254004b88b2_e1f578b3
9fa49519c75c        openshift3/ose-pod:v3.2.0.44                                                       "/pod"                   5 hours ago         Up 5 hours                              k8s_POD.6305dc28_glusterfs-dc-dhcp43-160.lab.eng.blr.redhat.com-1-szxca_aplo_777729bc-385f-11e6-bf37-5254004b88b2_14256003


[root@dhcp43-160 ~]# docker inspect 035fbf9b3dac 9fa49519c75c 8f4cb34a0b6f 7e6fcb55fa54 e5c4fa7142f8 de04a60bfcb1|grep -i privil
        "Privileged": false,
        "Privileged": false,
        "Privileged": true,
        "Privileged": false,
        "Privileged": false,
        "Privileged": false,
[root@dhcp43-160 ~]#

Comment 7 Luis Pabón 2016-06-22 15:16:36 UTC
I wonder if it is caused by https://github.com/heketi/heketi/blob/master/executors/kubeexec/kubeexec.go#L295.  I didn't find a Close() call for the stream, but I will check.

Comment 8 Humble Chirammal 2016-06-22 15:30:45 UTC
(In reply to Luis Pabón from comment #7)
> I wonder if it is caused by
> https://github.com/heketi/heketi/blob/master/executors/kubeexec/kubeexec.
> go#L295.  I didn't find a Close() call for the stream, but I will check.

May be a worth check, because this looks to be introduced in latest version of our product. Also not consistent in all the envs. Meanwhile we can check in systemd/udev/privilege/container angle where we had similar reports in past.

Comment 13 Luis Pabón 2016-06-24 18:42:21 UTC
Just to add, while updating Heketi's Go dependencies to the released Origin 1.2.0 (which is the base for OSE 3.2), the remotecommand.Stream API changed along with many other dependencies.

See https://bugzilla.redhat.com/show_bug.cgi?id=1349994

Comment 14 Humble Chirammal 2016-06-28 09:39:54 UTC
(In reply to Luis Pabón from comment #13)
> Just to add, while updating Heketi's Go dependencies to the released Origin
> 1.2.0 (which is the base for OSE 3.2), the remotecommand.Stream API changed
> along with many other dependencies.
> 
> See https://bugzilla.redhat.com/show_bug.cgi?id=1349994

Luis, are you saying there was an issue ( which can contribute to this bug report) previous to this version which is fixed with latest pull ?

Comment 22 Prasanth 2016-07-18 12:01:28 UTC
Created attachment 1181027 [details]
sosreport from the node

Comment 24 Luis Pabón 2016-07-18 14:28:28 UTC
I did see it before, but now I am not longer seeing this issue.  I upgraded OpenShift and Atomic.

Here are the versions that I am running with:

Client:
$ rpm -qa | grep openshift
atomic-openshift-utils-3.2.9-1.git.0.4f15c01.el7.noarch
openshift-ansible-docs-3.2.9-1.git.0.4f15c01.el7.noarch
openshift-ansible-playbooks-3.2.9-1.git.0.4f15c01.el7.noarch
openshift-ansible-3.2.9-1.git.0.4f15c01.el7.noarch
openshift-ansible-lookup-plugins-3.2.9-1.git.0.4f15c01.el7.noarch
openshift-ansible-roles-3.2.9-1.git.0.4f15c01.el7.noarch
atomic-openshift-clients-3.2.1.4-1.git.0.9fe156c.el7.x86_64
atomic-openshift-3.2.1.4-1.git.0.9fe156c.el7.x86_64
openshift-ansible-filter-plugins-3.2.9-1.git.0.4f15c01.el7.noarch
$ rpm -qa | grep heketi
heketi-templates-2.0.2-3.el7rhgs.x86_64
heketi-client-2.0.2-3.el7rhgs.x86_64


The client deploys OpenShift to the Atomic Hosts.

Atomic Systems are running 7.2.  I'm looking at how to determine actual version, and will provide that as soon as I can get it.

Comment 25 Luis Pabón 2016-07-18 14:35:29 UTC
Atomic Versions:
-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME               REFSPEC                                                   
* 2016-06-18 15:21:12     7.2.5       9bfe1fb650     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
  2016-05-06 05:57:30     7.2.4       b060975ce3     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard

Comment 26 Luis Pabón 2016-07-18 14:41:58 UTC
I'm going to retest again, to make sure I do not see it.  I will update accordingly.

Comment 31 Prasanth 2016-07-19 07:50:26 UTC
Created attachment 1181467 [details]
sosreport-1

Comment 32 Prasanth 2016-07-19 07:52:03 UTC
Created attachment 1181468 [details]
sosreport-2

Comment 33 Humble Chirammal 2016-07-19 08:22:10 UTC
[Analysis]

The root cause is pretty much same as we found in https://bugzilla.redhat.com/show_bug.cgi?id=1348947#c5. However as per the attached systemd bugzilla update.  

--snip--
As things stand now we do *not* support udev inside containers. In order to make udev work in containers there is probably a lot of things that need to be sorted out first. AFAICT, no one actively works in this area.

--/snip--

But we create devices ( PV/VG/LV ..etc for volume creation and snapshot creation) from the container and need udev support. Ideally the full udev support has to come in containers as mentioned above. 

After some more analysis, we have eliminated the services which can cause/trigger this issue when container is started. We have a container image  which disable the possibilities of triggering this scenario and its available @docker-registry.usersys.redhat.com/gluster/rhgs-test:5. 

I would like to call this as a 'possible fix'. It would be really appreciated if QE can verify this image and find the result ?

Comment 35 Prasanth 2016-07-20 12:54:44 UTC
(In reply to Humble Chirammal from comment #33)
> [Analysis]
> 
> The root cause is pretty much same as we found in
> https://bugzilla.redhat.com/show_bug.cgi?id=1348947#c5. However as per the
> attached systemd bugzilla update.  
> 
> --snip--
> As things stand now we do *not* support udev inside containers. In order to
> make udev work in containers there is probably a lot of things that need to
> be sorted out first. AFAICT, no one actively works in this area.
> 
> --/snip--
> 
> But we create devices ( PV/VG/LV ..etc for volume creation and snapshot
> creation) from the container and need udev support. Ideally the full udev
> support has to come in containers as mentioned above. 
> 
> After some more analysis, we have eliminated the services which can
> cause/trigger this issue when container is started. We have a container
> image  which disable the possibilities of triggering this scenario and its
> available @docker-registry.usersys.redhat.com/gluster/rhgs-test:5. 

Can you provide a list of services that you have eliminated which were triggering this issue? Also, do you think we need to perform any specific testing around that changes to validate this new image? If so, please let us know the details

> 
> I would like to call this as a 'possible fix'. It would be really
> appreciated if QE can verify this image and find the result ?

I've pulled in the above image and created a few volumes and other operations. Until now, i'm NOT seeing the reported issue (100% CPU utilization by agetty process) in any of the 3 nodes that are hosting the gluster pods. I've even scaled it beyond 65+ volumes and things are still looking good. However, i'll keep it running for some more time while closely watching the agetty process and see how it goes.

Hope this helps!

Comment 37 Prasanth 2016-07-21 11:14:35 UTC
I'm seeing this issue again with the latest build:
rhgs-volmanager-docker-3.1.3-12
heketi-2.0.6-1.el7rhgs.x86_64


#####################
        Tasks: 311 total,   2 running, 309 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5.9 us, 17.9 sy,  0.0 ni, 67.9 id,  0.1 wa,  0.0 hi,  0.1 si,  8.1 st
KiB Mem : 49296344 total, 47605008 free,  1034092 used,   657244 buff/cache
KiB Swap: 10485756 total, 10485756 free,        0 used. 47992064 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                          
 10315 root      20   0    8028    836    716 R  70.8  0.0  50:03.28 /sbin/agetty --noclear tty1 linux    



# ps aux |grep agetty
root      10315 98.4  0.0   8028   836 ?        Rs   15:42  45:55 /sbin/agetty --noclear tty1 linux
root      10328  0.0  0.0   8028   836 tty1     Ss+  15:43   0:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 linux
root      10330  0.0  0.0 110036   852 ?        Ss   15:43   0:00 /sbin/agetty --noclear tty1 linux
root      17577  0.0  0.0 112652   976 pts/1    R+   16:29   0:00 grep --color=auto agetty
#####################

Isn't this fix available in the latest build?

Do let me know if you require any additional details from my side.

Comment 39 Humble Chirammal 2016-07-22 08:37:20 UTC
(In reply to Prasanth from comment #37)
> I'm seeing this issue again with the latest build:
> rhgs-volmanager-docker-3.1.3-12
> heketi-2.0.6-1.el7rhgs.x86_64
> 
> 
> #####################
>         Tasks: 311 total,   2 running, 309 sleeping,   0 stopped,   0 zombie
> %Cpu(s):  5.9 us, 17.9 sy,  0.0 ni, 67.9 id,  0.1 wa,  0.0 hi,  0.1 si,  8.1
> st
> KiB Mem : 49296344 total, 47605008 free,  1034092 used,   657244 buff/cache
> KiB Swap: 10485756 total, 10485756 free,        0 used. 47992064 avail Mem 
> 
>    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
> 
>  10315 root      20   0    8028    836    716 R  70.8  0.0  50:03.28
> /sbin/agetty --noclear tty1 linux    
> 
> 
> 
> # ps aux |grep agetty
> root      10315 98.4  0.0   8028   836 ?        Rs   15:42  45:55
> /sbin/agetty --noclear tty1 linux
> root      10328  0.0  0.0   8028   836 tty1     Ss+  15:43   0:00
> /sbin/agetty --noclear --keep-baud console 115200 38400 9600 linux
> root      10330  0.0  0.0 110036   852 ?        Ss   15:43   0:00
> /sbin/agetty --noclear tty1 linux
> root      17577  0.0  0.0 112652   976 pts/1    R+   16:29   0:00 grep
> --color=auto agetty
> #####################
> 
> Isn't this fix available in the latest build?
> 
> Do let me know if you require any additional details from my side.

As discussed in rhs-containers ML  it was  an issue with OSBS and the new build is prepared from OSBS and should have the fix. Please validate the same.

Comment 41 Prasanth 2016-07-23 09:33:49 UTC
Verified in rhgs-server-docker-3.1.3-13

This issue is not seen in the latest build in a scale setup. Hence, marking it as Verified.

Comment 44 Ju Lim 2017-03-10 15:14:57 UTC
Per Dan Walsh (5 Jan 2017), these should be done by default in rhel7-init container.


Note You need to log in before you can comment on or make changes to this bug.