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
SIGSEGV in github.com/fluent/fluent-logger-golang/fluent.(*Fluent).write #40829
Comments
Is this a |
Docker v19.03.1 uses fluent/fluent-logger-golang v1.4.0 (see here). fluent/fluent-logger-golang v1.5.0 has been released on Feb. 19th and by looking at the diff, I found out this commit which fixes the exact problem described here. Unfortunately Docker entered its code freeze period to prepare the next major release, so there're little chances this got fixed in that release. However, the fluent-logger-golang lib, and thus the fluentd driver in Docker, are suffering from another (major) bug, as reported in #40063. Docker maintainers currently recommend to create and use a log driver plugin to bump fluent-logger lib to a newer, fixed version. The good news is, I worked on a fix for #40063 and created my own logging driver plugin to overcome these issues and I just published a v0.1. |
Feel free to make a pr to update fluentd. |
Updates the fluent logger library. Namely this fixes a couple places where the library could panic when closing and writing to channels. see fluent/fluent-logger-golang#93 and fluent/fluent-logger-golang#95 closes moby#40829 closes moby#32567 Signed-off-by: Cam <gh@sparr.email>
Updates the fluent logger library. Namely this fixes a couple places where the library could panic when closing and writing to channels. see fluent/fluent-logger-golang#93 and fluent/fluent-logger-golang#95 closes moby#40829 closes moby#32567 Signed-off-by: Cam <gh@sparr.email> (cherry picked from commit a6a98d6) Signed-off-by: Wesley <wppttt@amazon.com>
Description
docker crash
Steps to reproduce the issue:
Describe the results you received:
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: panic: runtime error: invalid memory address or nil pointer dereference
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x563fc57ebad9]
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: goroutine 561046 [running]:
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent.(*Fluent).write(0xc000824210, 0xc00153f350, 0xc00153f2f0, 0xc00153f320)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent/fluent.go:384 +0x119
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent.(*Fluent).postRawData(0xc000824210, 0xc00153f350, 0x44, 0x18f43bbd)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent/fluent.go:223 +0x6e
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent.(*Fluent).EncodeAndPostData(0xc000824210, 0xc0005e4b90, 0x44, 0x18f43bbd, 0xed62a3596, 0x0, 0x563fc6792da0, 0xc00153f2f0, 0x98, 0x8)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent/fluent.go:210 +0x1be
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent.(*Fluent).PostWithTime(0xc000824210, 0xc0005e4b90, 0x44, 0x18f43bbd, 0xed62a3596, 0x0, 0x563fc67982c0, 0xc00153f2c0, 0x1a13, 0x563fc41b1833)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/vendor/github.com/fluent/fluent-logger-golang/fluent/fluent.go:201 +0x7bb
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/daemon/logger/fluentd.(*fluentd).Log(0xc001717ec0, 0xc0012ac230, 0x563fc7fa82a0, 0x400a)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/daemon/logger/fluentd/fluentd.go:177 +0x3cb
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: github.com/docker/docker/daemon/logger.(*Copier).copySrc(0xc001576040, 0x563fc5ac17b5, 0x6, 0x7fd920d88d70, 0xc001717f00)
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/daemon/logger/copier.go:123 +0x369
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: created by github.com/docker/docker/daemon/logger.(*Copier).Run
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ dockerd[2120]: /root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/daemon/logger/copier.go:48 +0x111
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ systemd[1]: docker.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ systemd[1]: Unit docker.service entered failed state.
Apr 16 19:16:38 iZuf6jb9uv1lmingd0agruZ systemd[1]: docker.service failed.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: docker.service holdoff time over, scheduling restart.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Stopped Docker Application Container Engine.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Closed Docker Socket for the API.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Stopping Docker Socket for the API.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Starting Docker Socket for the API.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Listening on Docker Socket for the API.
Apr 16 19:16:40 iZuf6jb9uv1lmingd0agruZ systemd[1]: Starting Docker Application Container Engine...
Describe the results you expected:
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.):
ALIYUN
The text was updated successfully, but these errors were encountered: