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

Segfault on s390x inside yaml.v3 #231

Closed
cole-miller opened this issue Mar 13, 2023 · 2 comments
Closed

Segfault on s390x inside yaml.v3 #231

cole-miller opened this issue Mar 13, 2023 · 2 comments
Assignees
Labels
Bug Confirmed to be a bug

Comments

@cole-miller
Copy link
Contributor

cole-miller commented Mar 13, 2023

https://launchpadlibrarian.net/655817390/buildlog_ubuntu-focal-s390x.go-dqlite_1.11.7+git5-g394129c~focal1_BUILDING.txt.gz

--- FAIL: TestNew_JoinerRestart (0.28s)
    app_test.go:1073: 19:04:03.209 - 4: DEBUG: new connection from 127.0.0.1:38408
    app_test.go:1073: 19:04:03.212 - 4: DEBUG: attempt 1: server 127.0.0.1:9001: connected
    app_test.go:1073: 19:04:03.213 - 4: DEBUG: new connection from 127.0.0.1:38410
    app_test.go:1073: 19:04:03.306 - 4: DEBUG: new connection from 127.0.0.1:38426
    app_test.go:1073: 19:04:03.309 - 5: DEBUG: attempt 1: server 127.0.0.1:9001: connected
    app_test.go:1073: 19:04:03.312 - 5: DEBUG: new connection from 127.0.0.1:33438
    app_test.go:1073: 19:04:03.312 - 4: DEBUG: new connection from 127.0.0.1:38442
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12f8e42]

goroutine 58 [running]:
testing.tRunner.func1(0xc0003fc000)
	/usr/lib/go-1.13/src/testing/testing.go:874 +0x41a
panic(0x154fb00, 0x1949de0)
	/usr/lib/go-1.13/src/runtime/panic.go:679 +0x1d4
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.handleErr(0xc00011d9c8)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/yaml.go:294 +0xb2
panic(0x154fb00, 0x1949de0)
	/usr/lib/go-1.13/src/runtime/panic.go:679 +0x1d4
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.yaml_parser_parse_node(0xc000166000, 0xc0001662b0, 0x100000000000000, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/parserc.go:564 +0x4c2
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.yaml_parser_state_machine(0xc000166000, 0xc0001662b0, 0xc0000ce280)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/parserc.go:170 +0x1c6
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.yaml_parser_parse(0xc000166000, 0xc0001662b0, 0x3ff83337460)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/parserc.go:129 +0x8a
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.(*parser).peek(0xc000166000, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/decode.go:106 +0x42
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.(*parser).parse(0xc000166000, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/decode.go:149 +0x38
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.(*parser).parseChild(0xc000166000, 0xc0000ce280, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/decode.go:197 +0x2a
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.(*parser).document(0xc000166000, 0x300000000000030)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/decode.go:206 +0xa8
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.(*parser).parse(0xc000166000, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/decode.go:159 +0x154
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.unmarshal(0xc00022e480, 0x38, 0x238, 0x1512620, 0xc000196ca0, 0x0, 0x0, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/yaml.go:161 +0x270
github.com/canonical/go-dqlite/vendor/gopkg.in/yaml%2ev3.Unmarshal(...)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/vendor/gopkg.in/yaml.v3/yaml.go:89
github.com/canonical/go-dqlite/app.fileUnmarshal(0xc00046aa80, 0x1e, 0x15cf6b8, 0x9, 0x1512620, 0xc000196ca0, 0x0, 0x127ed30)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/app/files.go:71 +0x174
github.com/canonical/go-dqlite/app.New(0xc00046aa80, 0x1e, 0xc000196c80, 0x3, 0x4, 0xc000196c80, 0x0, 0x0)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/app/app.go:113 +0x2218
github.com/canonical/go-dqlite/app_test.newAppWithDir(0xc0003fc000, 0xc00046aa80, 0x1e, 0xc00011df58, 0x1, 0x1, 0x0, 0xc000481d00)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/app/app_test.go:1079 +0x190
github.com/canonical/go-dqlite/app_test.TestNew_JoinerRestart(0xc0003fc000)
	/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/github.com/canonical/go-dqlite/app/app_test.go:79 +0x2da
testing.tRunner(0xc0003fc000, 0x15edc28)
	/usr/lib/go-1.13/src/testing/testing.go:909 +0xd6
created by testing.(*T).Run
	/usr/lib/go-1.13/src/testing/testing.go:960 +0x36c
FAIL	github.com/canonical/go-dqlite/app	0.698s

Originally posted by @MathieuBordere in #230 (comment)

@cole-miller cole-miller self-assigned this Mar 13, 2023
@cole-miller
Copy link
Contributor Author

I'm trying to reproduce this in a s390x VM, but in the meantime we could switch to yaml.v2, which is the "backend" for github.com/ghodss/yaml that we were using before.

@MathieuBordere MathieuBordere added the Bug Confirmed to be a bug label Jun 12, 2023
@cole-miller
Copy link
Contributor Author

I'm going to close this in favor of an issue that tracks upgrading to yaml.v3, with a backreference to the potential bug here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

No branches or pull requests

2 participants