RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1335951 - heavy logging leads to Docker daemon OOM-ing
Summary: heavy logging leads to Docker daemon OOM-ing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: 7.3
Assignee: Nalin Dahyabhai
QA Contact: Luwen Su
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-13 15:22 UTC by Jay Vyas
Modified: 2019-03-06 02:41 UTC (History)
10 users (show)

Fixed In Version: docker-1.10.3-46.el7.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 09:08:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2634 0 normal SHIPPED_LIVE Moderate: docker security and bug fix update 2016-11-03 20:51:48 UTC

Description Jay Vyas 2016-05-13 15:22:13 UTC
Description of problem:

A simple container that is very verbose can cause docker's daemon to die if it doesnt take a break between logging events. 

This appears to be related to https://github.com/docker/docker/issues/18057.

Version-Release number of selected component (if applicable):

Docker version 1.9.1, build b795b73/1.9.1
atomic-enterprise v3.2.0.16

How reproducible:

Always, especially on machines with small free memory < 2G.


Steps to Reproduce:
1. export SPAM="ASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDF"
2. docker run -d gcr.io/google_containers/busybox:1.24 '/bin/sh' '-c' 'while true ; do echo $SPAM$SPAM$SPAM ; done'

Actual results:

docker daemon dies within about a minute due to memory overheating

Expected results:

machine should just die if disk fills up (not that this is a noble goal, but in our case, thats what we expected!)

Additional info:

Comment 2 Jay Vyas 2016-05-27 16:27:04 UTC
More details for folks doing scale testing of logging resilience: 

To generate the cluster wide soak test for this feature (basically, its a way to rapidly destroy a cluster if logging isnt tuned correctly, or else, to fill up ELK with logging if you are evaluating production quality performance of ELK logging stack for openshift), you can run : 

https://github.com/kubernetes/kubernetes/pull/24536 

(--ginkgo.focus="Logging soak" --scale=5) to generate 5 noisy pods per node.

Comment 3 Nalin Dahyabhai 2016-05-31 17:36:35 UTC
I think a combination of 1.10's changes to limit how much of the container's data it buffers, along with https://github.com/docker/docker/pull/22982 (currently in design review), should keep us from hitting OOM.

Comment 4 Rich Megginson 2016-05-31 17:46:32 UTC
So does that mean with docker 1.10 we have at least 2 options - 1) use docker journald log driver and avoid json file logs completely, or 2) use the docker json log file driver and configure it not to fill up the container file system?

Comment 5 Timothy St. Clair 2016-05-31 17:55:44 UTC
@Nalin have you verified the memory limit reached with your PR against the repro example listed above?

Comment 6 Nalin Dahyabhai 2016-05-31 19:06:26 UTC
(In reply to Timothy St. Clair from comment #5)
> @Nalin have you verified the memory limit reached with your PR against the
> repro example listed above?

The original description's case has its memory usage limited by 1.10, as starting with that version the container blocks trying to write to stdout/stderr until the daemon is ready to read that data, presumably after flushing whatever it's already done to disk.

The upstream issue 18057 also mentions OOMing when echo -n is used, so that the output doesn't include newlines.  That's something PR 22982 aims to fix, and it does when I run it on my system.

In both cases we grow until we hit a plateau.  Reading the logs seems to require allocating more memory than just writing them, though that now plateaus, too.

Comment 7 Nalin Dahyabhai 2016-08-05 15:45:40 UTC
This should be fixed by a backport that landed in docker-1.10.3-46.el7.4 and later.

Comment 11 errata-xmlrpc 2016-11-04 09:08:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2634.html


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