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

all goroutines are asleep - deadlock #920

Closed
kung-foo opened this issue Jan 31, 2024 · 4 comments · Fixed by #925
Closed

all goroutines are asleep - deadlock #920

kung-foo opened this issue Jan 31, 2024 · 4 comments · Fixed by #925

Comments

@kung-foo
Copy link

$ s2d -verify backfill-2024-01-20-part1.tsv.s2
Decompressing backfill-2024-01-20-part1.tsv.s2 -> (verify)fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
A8bLpkf9.(*ZTAjQ8Mt1sN).DecodeConcurrent(0xc0000c4a00, {0x70f6c0?, 0x95b7c0}, 0x400000?)
	VfKozfd0P.go:4 +0xbf3
main.main.func2(0xc000092e70, {0x69afa0, 0x8}, 0x0, 0x0, 0x0, 0xc0000c4a00)
	i1KAe4bJ0v.go:1 +0xa9d
main.main()
	OuTLN3Athff.go:4 +0x10d9

goroutine 6 [select]:
SKLy2Y0xu9.(*oz9lVfO4HX).lJlFJs.func1()
	nzSkYK29lib.go:4 +0x105
created by SKLy2Y0xu9.(*oz9lVfO4HX).lJlFJs in goroutine 1
	yC74qrhkyO3u.go:4 +0x2ba

goroutine 7 [chan receive]:
A8bLpkf9.(*ZTAjQ8Mt1sN).DecodeConcurrent.func3()
	S235yXH9.go:3 +0x118
created by A8bLpkf9.(*ZTAjQ8Mt1sN).DecodeConcurrent in goroutine 1
	dQoqsu.go:2 +0x4ac
$ dpkg-deb --info s2_package__linux_amd64.deb 
 new Debian package, version 2.0.
 size 14053886 bytes: control archive=412 bytes.
       1 bytes,     0 lines      conffiles            
     231 bytes,     9 lines      control              
     145 bytes,     3 lines      md5sums              
 Package: compress
 Version: 1.17.5
 Section: 
 Priority: optional
 Architecture: amd64
 Maintainer: Klaus Post <[email protected]>
 Installed-Size: 22152
 Homepage: https://github.com/klauspost/compress
 Description: S2 Compression Tool

I don't have a shareable reproducer since the file above contains customer data.

@klauspost
Copy link
Owner

@kung-foo Is this is a regression, or does it happen on older versions? Does adding --cpu=10 change this?

@kung-foo
Copy link
Author

kung-foo commented Feb 1, 2024

Looks to happen on older versions as well. Tried v1.17.4 and v1.16.7. cpu=10 or cpu=1 had no effect.

Weirdly if I go install ... it (latest) then the command just hangs

@klauspost
Copy link
Owner

Ok! I will dig a bit deeper! Thanks for the report and double checking!

@klauspost
Copy link
Owner

Got it reproduced. Will send a fix!

klauspost added a commit that referenced this issue Feb 5, 2024
When DecodeConcurrent encounters an error it can lock up in some cases.

Fix and add fuzz test for stream decoding.

Fixes #920
klauspost added a commit that referenced this issue Feb 5, 2024
When DecodeConcurrent encounters an error it can lock up in some cases.

Fix and add fuzz test for stream decoding.

Fixes #920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants