-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
recieve: Panics #1594
Comments
Yes, I see exactly what is wrong. It’s a one-like fix. I’ll submit a PR
ASAP.
El El mar, oct. 1, 2019 a las 19:56, Devin Trejo <[email protected]>
escribió:
… *Thanos, Prometheus and Golang version used*
$ ./thanos --version
thanos, version 0.7.0 (branch: master, revision: baf2f3a)
build user: ***@***.***
build date: 20191001-13:19:04
go version: go1.12.5
Prometheus version 2.12.0
*What happened*
Go routine panic.
*What you expected to happen*
No go routine panic
*How to reproduce it (as minimally and precisely as possible)*:
Simply start a receiver --
./thanos receive --log.format=logfmt --log.level=debug --tsdb.path=./test/data --objstore.config-file=./test/bucket_config.yml --receive.replication-factor=1
*Full logs to relevant components*
Logs
level=debug ts=2019-10-01T17:51:34.346053081Z caller=main.go:122
msg="maxprocs: Leaving GOMAXPROCS=[8]: CPU quota undefined" level=info
ts=2019-10-01T17:51:34.346457856Z caller=main.go:170 msg="Tracing will be
disabled" level=warn ts=2019-10-01T17:51:34.346500366Z
caller=receive.go:143 component=receive msg="setting up receive; the Thanos
receive component is EXPERIMENTAL, it may break significantly without
notice" level=debug ts=2019-10-01T17:51:34.346746109Z caller=receive.go:192
component=receive msg="setting up tsdb" level=info
ts=2019-10-01T17:51:34.350840387Z caller=head.go:509 component=receive
component=tsdb component=tsdb msg="replaying WAL, this may take awhile"
level=info ts=2019-10-01T17:51:34.351074421Z caller=head.go:557
component=receive component=tsdb component=tsdb msg="WAL segment loaded"
segment=0 maxSegment=4 level=info ts=2019-10-01T17:51:34.35128205Z
caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL
segment loaded" segment=1 maxSegment=4 level=info
ts=2019-10-01T17:51:34.351416083Z caller=head.go:557 component=receive
component=tsdb component=tsdb msg="WAL segment loaded" segment=2
maxSegment=4 level=info ts=2019-10-01T17:51:34.352002711Z
caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL
segment loaded" segment=3 maxSegment=4 level=info
ts=2019-10-01T17:51:34.352230301Z caller=head.go:557 component=receive
component=tsdb component=tsdb msg="WAL segment loaded" segment=4
maxSegment=4 level=info ts=2019-10-01T17:51:34.360157392Z
caller=head.go:509 component=receive component=tsdb msg="replaying WAL,
this may take awhile" level=info ts=2019-10-01T17:51:34.360413948Z
caller=head.go:557 component=receive component=tsdb msg="WAL segment
loaded" segment=0 maxSegment=4 level=info ts=2019-10-01T17:51:34.360588495Z
caller=head.go:557 component=receive component=tsdb msg="WAL segment
loaded" segment=1 maxSegment=4 level=info ts=2019-10-01T17:51:34.360715952Z
caller=head.go:557 component=receive component=tsdb msg="WAL segment
loaded" segment=2 maxSegment=4 level=info ts=2019-10-01T17:51:34.360832443Z
caller=head.go:557 component=receive component=tsdb msg="WAL segment
loaded" segment=3 maxSegment=4 level=info ts=2019-10-01T17:51:34.360974741Z
caller=head.go:557 component=receive component=tsdb msg="WAL segment
loaded" segment=4 maxSegment=4 level=info ts=2019-10-01T17:51:34.374679961Z
caller=head.go:509 component=receive component=tsdb component=tsdb
msg="replaying WAL, this may take awhile" level=info
ts=2019-10-01T17:51:34.375273668Z caller=head.go:557 component=receive
component=tsdb component=tsdb msg="WAL segment loaded" segment=0
maxSegment=5 level=info ts=2019-10-01T17:51:34.3757924Z caller=head.go:557
component=receive component=tsdb component=tsdb msg="WAL segment loaded"
segment=1 maxSegment=5 level=info ts=2019-10-01T17:51:34.375991581Z
caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL
segment loaded" segment=2 maxSegment=5 level=info
ts=2019-10-01T17:51:34.376171243Z caller=head.go:557 component=receive
component=tsdb component=tsdb msg="WAL segment loaded" segment=3
maxSegment=5 level=info ts=2019-10-01T17:51:34.37632788Z caller=head.go:557
component=receive component=tsdb component=tsdb msg="WAL segment loaded"
segment=4 maxSegment=5 level=info ts=2019-10-01T17:51:34.37643955Z
caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL
segment loaded" segment=5 maxSegment=5 level=debug
ts=2019-10-01T17:51:34.37734948Z caller=receive.go:250 component=receive
msg="setting up hashring" level=debug ts=2019-10-01T17:51:34.37738744Z
caller=receive.go:302 component=receive msg="setting up http server"
level=debug ts=2019-10-01T17:51:34.377648418Z caller=receive.go:308
component=receive msg="setting up grpc server" level=debug
ts=2019-10-01T17:51:34.377683868Z caller=receive.go:353 component=receive
msg="setting up receive http handler" level=info
ts=2019-10-01T17:51:34.377706991Z caller=factory.go:39 component=receive
msg="loading bucket configuration" level=info
ts=2019-10-01T17:51:34.400789386Z caller=receive.go:432 component=receive
msg="starting receiver" panic: send on closed channel
goroutine 481 [running]:
main.runReceive.func5(0xc000155440, 0x0)
/go/src/github.com/thanos-io/thanos/cmd/thanos/receive.go:269 +0x77
github.com/oklog/run.(*Group).Run.func1(0xc00298ec00, 0xc0024900f0,
0xc0000b30e0)
***@***.***/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
***@***.***/group.go:37 +0xbe
*Anything else we need to know*
Issue arose since merging - #1480
<#1480>
CC @squat <https://github.com/squat>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1594?email_source=notifications&email_token=AE4JAP4JXYMAHCUXX67LIBTQMOFNPA5CNFSM4I4M2TS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HO5OYLA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE4JAPZO2AEP5EYQ3KMR7UTQMOFNPANCNFSM4I4M2TSQ>
.
|
squat
added a commit
to squat/thanos
that referenced
this issue
Oct 1, 2019
This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: thanos-io#1594 Signed-off-by: Lucas Servén Marín <[email protected]>
squat
added a commit
to squat/thanos
that referenced
this issue
Oct 1, 2019
This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: thanos-io#1594 Signed-off-by: Lucas Servén Marín <[email protected]>
brancz
pushed a commit
that referenced
this issue
Oct 2, 2019
* cmd/thanos/receive: fix close chan panic This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: #1594 Signed-off-by: Lucas Servén Marín <[email protected]> * cmd/thanos/receive: correctly clean up uploader This commit fixes how the uploader is cleaned up. Currently, it was cleaned up in a defer block that was run before the run groups. This ensures the cleanup occurs only when the run groups are returning. Signed-off-by: Lucas Servén Marín <[email protected]>
GiedriusS
pushed a commit
that referenced
this issue
Oct 28, 2019
* cmd/thanos/receive: fix close chan panic This commit fixes a panic caused by sending on the chan which is closed too early. This chan was closed when the setup func returned, rather than when the group's goroutine returned. Fixes: #1594 Signed-off-by: Lucas Servén Marín <[email protected]> * cmd/thanos/receive: correctly clean up uploader This commit fixes how the uploader is cleaned up. Currently, it was cleaned up in a defer block that was run before the run groups. This ensures the cleanup occurs only when the run groups are returning. Signed-off-by: Lucas Servén Marín <[email protected]> Signed-off-by: Giedrius Statkevičius <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanos, Prometheus and Golang version used
Prometheus version 2.12.0
What happened
Go routine panic.
What you expected to happen
No go routine panic
How to reproduce it (as minimally and precisely as possible):
Simply start a receiver --
Full logs to relevant components
level=debug ts=2019-10-01T17:51:34.346053081Z caller=main.go:122 msg="maxprocs: Leaving GOMAXPROCS=[8]: CPU quota undefined" level=info ts=2019-10-01T17:51:34.346457856Z caller=main.go:170 msg="Tracing will be disabled" level=warn ts=2019-10-01T17:51:34.346500366Z caller=receive.go:143 component=receive msg="setting up receive; the Thanos receive component is EXPERIMENTAL, it may break significantly without notice" level=debug ts=2019-10-01T17:51:34.346746109Z caller=receive.go:192 component=receive msg="setting up tsdb" level=info ts=2019-10-01T17:51:34.350840387Z caller=head.go:509 component=receive component=tsdb component=tsdb msg="replaying WAL, this may take awhile" level=info ts=2019-10-01T17:51:34.351074421Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=0 maxSegment=4 level=info ts=2019-10-01T17:51:34.35128205Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=1 maxSegment=4 level=info ts=2019-10-01T17:51:34.351416083Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=2 maxSegment=4 level=info ts=2019-10-01T17:51:34.352002711Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=3 maxSegment=4 level=info ts=2019-10-01T17:51:34.352230301Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=4 maxSegment=4 level=info ts=2019-10-01T17:51:34.360157392Z caller=head.go:509 component=receive component=tsdb msg="replaying WAL, this may take awhile" level=info ts=2019-10-01T17:51:34.360413948Z caller=head.go:557 component=receive component=tsdb msg="WAL segment loaded" segment=0 maxSegment=4 level=info ts=2019-10-01T17:51:34.360588495Z caller=head.go:557 component=receive component=tsdb msg="WAL segment loaded" segment=1 maxSegment=4 level=info ts=2019-10-01T17:51:34.360715952Z caller=head.go:557 component=receive component=tsdb msg="WAL segment loaded" segment=2 maxSegment=4 level=info ts=2019-10-01T17:51:34.360832443Z caller=head.go:557 component=receive component=tsdb msg="WAL segment loaded" segment=3 maxSegment=4 level=info ts=2019-10-01T17:51:34.360974741Z caller=head.go:557 component=receive component=tsdb msg="WAL segment loaded" segment=4 maxSegment=4 level=info ts=2019-10-01T17:51:34.374679961Z caller=head.go:509 component=receive component=tsdb component=tsdb msg="replaying WAL, this may take awhile" level=info ts=2019-10-01T17:51:34.375273668Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=0 maxSegment=5 level=info ts=2019-10-01T17:51:34.3757924Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=1 maxSegment=5 level=info ts=2019-10-01T17:51:34.375991581Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=2 maxSegment=5 level=info ts=2019-10-01T17:51:34.376171243Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=3 maxSegment=5 level=info ts=2019-10-01T17:51:34.37632788Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=4 maxSegment=5 level=info ts=2019-10-01T17:51:34.37643955Z caller=head.go:557 component=receive component=tsdb component=tsdb msg="WAL segment loaded" segment=5 maxSegment=5 level=debug ts=2019-10-01T17:51:34.37734948Z caller=receive.go:250 component=receive msg="setting up hashring" level=debug ts=2019-10-01T17:51:34.37738744Z caller=receive.go:302 component=receive msg="setting up http server" level=debug ts=2019-10-01T17:51:34.377648418Z caller=receive.go:308 component=receive msg="setting up grpc server" level=debug ts=2019-10-01T17:51:34.377683868Z caller=receive.go:353 component=receive msg="setting up receive http handler" level=info ts=2019-10-01T17:51:34.377706991Z caller=factory.go:39 component=receive msg="loading bucket configuration" level=info ts=2019-10-01T17:51:34.400789386Z caller=receive.go:432 component=receive msg="starting receiver" panic: send on closed channel
goroutine 481 [running]:
main.runReceive.func5(0xc000155440, 0x0)
/go/src/github.com/thanos-io/thanos/cmd/thanos/receive.go:269 +0x77
github.com/oklog/run.(*Group).Run.func1(0xc00298ec00, 0xc0024900f0, 0xc0000b30e0)
/go/pkg/mod/github.com/oklog/[email protected]/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
/go/pkg/mod/github.com/oklog/[email protected]/group.go:37 +0xbe
Anything else we need to know
Issue arose since merging - #1480
CC @squat
The text was updated successfully, but these errors were encountered: