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
dockerd left open file descriptors to deleted /var/log/journal/*/*.journal files #27343
Comments
It's worth noting that solution proposed by @JohnMorales here #8693 can be used as a workaround: https://gist.github.com/JohnMorales/4a4277510190d187bac5 |
yes, but - workaround are very bad. and using gdb on dockerd is a bit dangerous. |
ping @nalind |
@theundefined I agree it's not the safest, but it does work. I'm not trying to convince you to use it, but I have been using this workaround for ~a year w/ no repercussions. |
When I try to reproduce the bug here, I'm seeing deleted files in the list of open descriptors between when the files are removed and when the daemon notices that they're gone, but they reliably get closed a fraction of a second later. What's supposed to happen is that the daemon is woken up when it gets a message on an inotify socket that it's using to watch the directory which contains the journal files, and when it calls When you're seeing this happen on your systems, is the set of open deleted files staying the same, or are they being closed, with other open files possibly being deleted after that? |
During the weekend amount of deleted-not-closed files increased from 111 to 163 but I don't have exact list. I will report back tomorrow. |
Ok so here is ~one week diff https://gist.github.com/suside/10ecd6e61edfa9062272f94027b0ac3b Moreover when I CtrlC during gdb session docker crashed there: |
I'm running a load balanced application on two servers and one of them has far more undeleted files than the other. The main difference between the two is that I've certainly run |
small and dirty workaround to release disk space without connecting to existing docker process and closing files:
|
is it the same than #30063 |
Any resolution to this issue on ubuntu 14.04 running docker? |
Same problem with docker 1.11.2 and json log driver
|
@rvadim This is a different issue and is fixed in a newer release. |
@cpuguy83 Can you specify which version, please? Or link to issue. |
Not sure if this can be anyway related, as we do not use Moby - but we've seen similar problems on some docker nodes in swarm mode and log-driver journald. Googling for this file descriptor problem gives not many hits. We switched to this log-driver because we use a journalbeat-container on each node, which then sends the logs to our ELK-stack. For that the journalbeat-containers are mounting /var/log/journal and somehow it then seemed that docker keeps his hands on all those deleted journald files. What we then did was mounting the needed folders and partitions with Forgot to add: we are using docker version 17.06.0-ce |
Pull request for this (but needs to be carried); #36254 |
Proposed fix: #38859 |
dockerd left open file descriptors do deleted /var/log/journal//.journal files
I'm using dockerd with --log-driver=journald.
After few days it left many open fd to files in /var/log/journal:
ls -l /proc/$(cat /var/run/docker.pid)/fd |grep deleted |wc -l
6250
which store place on disk.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
no open deleted files.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
kvm
The text was updated successfully, but these errors were encountered: