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

measurexlite: implement robust conn.RemoteAddr access #2707

Closed
bassosimone opened this issue Apr 12, 2024 · 0 comments · Fixed by ooni/probe-cli#1551
Closed

measurexlite: implement robust conn.RemoteAddr access #2707

bassosimone opened this issue Apr 12, 2024 · 0 comments · Fixed by ooni/probe-cli#1551
Assignees
Labels
bug Something isn't working

Comments

@bassosimone
Copy link
Contributor

Sometimes, when using GVisor, we see this kind of QA crashes:

[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x113a83a]

goroutine 10346 [running]:
github.com/ooni/probe-cli/v3/internal/measurexlite.(*connTrace).Write(0xc005d2fa28, {0xc00c192000, 0x18, 0x180})
	/home/runner/work/probe-cli/probe-cli/internal/measurexlite/conn.go:102 +0x7a
github.com/ooni/oocrypto/tls.(*Conn).write(0xc0022b7c00, {0xc00c192000, 0x18, 0x180})
	/home/runner/go/pkg/mod/github.com/ooni/oocrypto@v0.5.8/tls/conn.go:924 +0x1b3
github.com/ooni/oocrypto/tls.(*Conn).writeRecordLocked(0xc0022b7c00, 0x15, {0xc0022b7f44, 0x2, 0x10})
	/home/runner/go/pkg/mod/github.com/ooni/oocrypto@v0.5.8/tls/conn.go:992 +0x4df
github.com/ooni/oocrypto/tls.(*Conn).sendAlertLocked(0xc0022b7c00, 0x0)
	/home/runner/go/pkg/mod/github.com/ooni/oocrypto@v0.5.8/tls/conn.go:825 +0xc7
github.com/ooni/oocrypto/tls.(*Conn).closeNotify(0xc0022b7c00)
	/home/runner/go/pkg/mod/github.com/ooni/oocrypto@v0.5.8/tls/conn.go:1402 +0x156
github.com/ooni/oocrypto/tls.(*Conn).Close(0xc0022b7c00)
	/home/runner/go/pkg/mod/github.com/ooni/oocrypto@v0.5.8/tls/conn.go:1371 +0xba
github.com/ooni/oohttp.(*persistConn).closeLocked(0xc00571f8c0, {0x1b57600, 0xc0001df480})
	/home/runner/go/pkg/mod/github.com/ooni/oohttp@v0.6.8/transport.go:2734 +0x223
github.com/ooni/oohttp.(*persistConn).close(0xc00571f8c0, {0x1b57600, 0xc0001df480})
	/home/runner/go/pkg/mod/github.com/ooni/oohttp@v0.6.8/transport.go:2719 +0xac
github.com/ooni/oohttp.(*persistConn).readLoop.func1()
	/home/runner/go/pkg/mod/github.com/ooni/oohttp@v0.6.8/transport.go:2077 +0x50
github.com/ooni/oohttp.(*persistConn).readLoop(0xc00571f8c0)
	/home/runner/go/pkg/mod/github.com/ooni/oohttp@v0.6.8/transport.go:2252 +0x105a
created by github.com/ooni/oohttp.(*Transport).dialConn
	/home/runner/go/pkg/mod/github.com/ooni/oohttp@v0.6.8/transport.go:1767 +0x25a6
FAIL	github.com/ooni/probe-cli/v3/internal/experiment/webconnectivitylte	48.055s

The line of code that fails is https://github.com/ooni/probe-cli/blob/release/3.21/internal/measurexlite/conn.go#L102.

We can avoid them by being more defensive when accessing the RemoteAddr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant