Skip to content
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

Log in goroutine after TestFailedPreconditionShutdown has completed #3217

Closed
AnnaShaleva opened this issue Nov 22, 2023 · 0 comments · Fixed by #3335
Closed

Log in goroutine after TestFailedPreconditionShutdown has completed #3217

AnnaShaleva opened this issue Nov 22, 2023 · 0 comments · Fixed by #3335
Labels
bug Something isn't working I4 No visible changes S4 Routine test Unit tests U2 Seriously planned
Milestone

Comments

@AnnaShaleva
Copy link
Member

Ubuntu, Go 1.21, v0.103.1 with a set of comments on top of it:

panic: Log in goroutine after TestFailedPreconditionShutdown has completed: 2023-11-22T14:00:08.975+0300	INFO	persisted to disk	{"blocks": 0, "keys": 127, "headerHeight": 0, "blockHeight": 0, "took": "47.595µs"}

goroutine 11944 [running]:
testing.(*common).logDepth(0xc017eec1a0, {0xc01ae48000, 0x88}, 0x3)
	/usr/local/go/src/testing/testing.go:1022 +0x4c5
testing.(*common).log(...)
	/usr/local/go/src/testing/testing.go:1004
testing.(*common).Logf(0xc017eec1a0, {0x109fc96?, 0x410505?}, {0xc01b8753f0?, 0xedecc0?, 0xc003c48301?})
	/usr/local/go/src/testing/testing.go:1055 +0x54
go.uber.org/zap/zaptest.testingWriter.Write({{0x7f0f8d4db120?, 0xc017eec1a0?}, 0x80?}, {0xc01aa5ac00?, 0x89, 0xc01b8753e0?})
	/home/anna/go/pkg/mod/go.uber.org/[email protected]/zaptest/logger.go:130 +0xdc
go.uber.org/zap/zapcore.(*ioCore).Write(0xc004422060, {0x0, {0xc14f95ae3a25ad68, 0xd6a11c4f2, 0x1b31620}, {0x0, 0x0}, {0x10ae318, 0x11}, {0x0, ...}, ...}, ...)
	/home/anna/go/pkg/mod/go.uber.org/[email protected]/zapcore/core.go:99 +0xb5
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc010b5c270, {0xc00741c000, 0x5, 0x5})
	/home/anna/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:255 +0x1dc
go.uber.org/zap.(*Logger).Info(0x9e00dd4e257b9dc4?, {0x10ae318?, 0x1b31620?}, {0xc00741c000, 0x5, 0x5})
	/home/anna/go/pkg/mod/go.uber.org/[email protected]/logger.go:220 +0x4e
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).persist(0xc0017f4580, 0x0)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/core/blockchain.go:2119 +0x4be
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).Run(0xc0017f4580)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/core/blockchain.go:1075 +0x1a8
created by github.com/nspcc-dev/neo-go/pkg/services/rpcsrv.getUnitTestChainWithCustomConfig in goroutine 11942
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/services/rpcsrv/server_helper_test.go:85 +0x5e7
FAIL	github.com/nspcc-dev/neo-go/pkg/services/rpcsrv	57.638s

@AnnaShaleva AnnaShaleva added bug Something isn't working test Unit tests labels Nov 22, 2023
@AnnaShaleva AnnaShaleva added this to the v0.105.0 milestone Nov 22, 2023
@roman-khimov roman-khimov added U2 Seriously planned S4 Routine I4 No visible changes labels Dec 21, 2023
@AnnaShaleva AnnaShaleva modified the milestones: v0.105.0, v0.106.0 Dec 28, 2023
AliceInHunterland added a commit that referenced this issue Feb 14, 2024
Added sync logs for every service separately to provide the ability to
have a custom logger for each service. Data race in logging is fixed by
adding a sync log, this problem is related to uber-go/zap#687.

 Close #2973
 Close #2974
 Close #3112
 Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Feb 14, 2024
Added sync logs for every service separately to provide the ability to
have a custom logger for each service. Data race in logging is fixed by
adding a sync log, this problem is related to uber-go/zap#687.

 Close #2973
 Close #2974
 Close #3112
 Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Feb 14, 2024
Added sync logs for every service separately to provide the ability to
have a custom logger for each service. Data race in logging is fixed by
adding a sync log, this problem is related to uber-go/zap#687.

 Close #2973
 Close #2974
 Close #3112
 Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Feb 14, 2024
Added sync logs for every service separately to provide the ability to
have a custom logger for each service. Data race in logging is fixed by
adding a sync log, this problem is related to uber-go/zap#687.

 Close #2973
 Close #2974
 Close #3112
 Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Feb 14, 2024
Added sync logs for every service separately to provide the ability to
have a custom logger for each service. Data race in logging is fixed by
adding a sync log, this problem is related to uber-go/zap#687.

 Close #2973
 Close #2974
 Close #3112
 Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 4, 2024
The `persist` goroutine could write logs after the blockchain service
shutdown that leads to tests failure.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 4, 2024
The `persist` goroutine could write logs after the blockchain service
shutdown that leads to tests failure.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 4, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
AliceInHunterland added a commit that referenced this issue Mar 5, 2024
The logs race issue is a result of improper shutdown during testing.

Close #3217

Signed-off-by: Ekaterina Pavlova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine test Unit tests U2 Seriously planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants