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

panic: tls: setSessionTicketExt failed: invalid state #260

Open
let4be opened this issue Nov 22, 2023 · 3 comments
Open

panic: tls: setSessionTicketExt failed: invalid state #260

let4be opened this issue Nov 22, 2023 · 3 comments
Labels
cannot reproduce Minimal reproducible example is needed until this can move forward

Comments

@let4be
Copy link

let4be commented Nov 22, 2023

I'm doing multiple http requests with uTLS being set on a transport level.

Recently caught this while doing mass requests, unfortunately no context on the exact server that caused this

panic: tls: setSessionTicketExt failed: invalid state

goroutine 1946 [running]:
modules/go-net/utls.uAssert(...)
        /opt/modules/go-net/utls/u_common.go:764
modules/go-net/utls.(*sessionController).setSessionTicketToUConn(0xc001942d80)
        /opt/modules/go-net/utls/u_session_controller.go:188 +0x1fd
modules/go-net/utls.(*UConn).uLoadSession(0xc0004da600)
        /opt/modules/go-net/utls/u_conn.go:163 +0x40b
modules/go-net/utls.(*UConn).BuildHandshakeState(0xc0004da600)
        /opt/modules/go-net/utls/u_conn.go:125 +0x71b
modules/go-net/utls.(*UConn).handshakeContext(0xc0004da600, {0x2440068, 0x40f5b60})
        /opt/modules/go-net/utls/u_conn.go:354 +0x651
modules/go-net/utls.(*UConn).HandshakeContext(...)
        /opt/modules/go-net/utls/u_conn.go:292
modules/go-net/utls.(*UConn).Handshake(...)
        /opt/modules/go-net/utls/u_conn.go:279
proxy_saver/pkg/performer.(*TlsFactoryWithSpec).NewUTLSConn(0xc000c4b6a0, {0x2446cd0, 0xc0001724a0}, 0xc0022349c0)
        /opt/proxy-saver/pkg/performer/utls.go:127 +0x5c5
packages/go-net/http.(*Transport).tlsClientFactory(0xc001e96c60, {0x2446cd0, 0xc0001724a0}, 0x0?)
        /opt/modules/packages/go-net/http/tlsconn.go:41 +0x88
packages/go-net/http.(*persistConn).addTLS(0xc000b65200, {0x2440068?, 0x40f5b60}, {0xc001cf84e0, 0x1c}, 0x0)
        /opt/modules/packages/go-net/http/transport.go:1543 +0x2a5
packages/go-net/http.(*Transport).dialConn(0xc001e96c60, {0x2440068, 0x40f5b60}, {{}, 0x0, {0x1ff07b9, 0x5}, {0xc001cf84e0, 0x20}, 0x0})
        /opt/modules/packages/go-net/http/transport.go:1640 +0x1274
packages/go-net/http.(*Transport).dialConnFor(0x7fa6ccb2c700?, 0xc000316bb0)
        /opt/modules/packages/go-net/http/transport.go:1465 +0x12a
created by packages/go-net/http.(*Transport).queueForDial in goroutine 1944
        /opt/modules/packages/go-net/http/transport.go:1434 +0x16b
@let4be
Copy link
Author

let4be commented Nov 22, 2023

@let4be
Copy link
Author

let4be commented Nov 22, 2023

PSK resumption is enabled by setting PSK extension and setting ClientSessionCache via utls.Config

@gaukas
Copy link
Contributor

gaukas commented Nov 22, 2023

It would help if you could provide a minimal example to replicate the error.

@gaukas gaukas added the invalid problem not well-defined, need to be more specific label Dec 11, 2023
@gaukas gaukas added cannot reproduce Minimal reproducible example is needed until this can move forward and removed invalid problem not well-defined, need to be more specific labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce Minimal reproducible example is needed until this can move forward
Projects
None yet
Development

No branches or pull requests

2 participants