Conn.readRecord(...) with multiple goroutine error
wangluozhe opened this issue · 1 comments
error:
goroutine 146491 [IO wait]:
internal/poll.runtime_pollWait(0x203173577b0, 0x72)
E:/Go/src/runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xf656b1051e0a4118?, 0xc002cf7680?, 0x0)
E:/Go/src/internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.execIO(0xc00ccf8798, 0x7ffdd1a355b8)
E:/Go/src/internal/poll/fd_windows.go:175 +0xe6
internal/poll.(*FD).Read(0xc00ccf8780, {0xc00c39dc00, 0x700, 0x700})
E:/Go/src/internal/poll/fd_windows.go:436 +0x2b1
net.(*netFD).Read(0xc00ccf8780, {0xc00c39dc00?, 0xc00c39dc05?, 0x22?})
E:/Go/src/net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc0001bff60, {0xc00c39dc00?, 0xc002cf7808?, 0xc00cc7cdf8?})
E:/Go/src/net/net.go:179 +0x45
github.com/refraction-networking/utls.(*atLeastReader).Read(0xc000b04ee8, {0xc00c39dc00?, 0xc000b04ee8?, 0x0?})
D:/Go/pkg/mod/github.com/refraction-networking/utls@v1.5.3/conn.go:807 +0x3b
bytes.(*Buffer).ReadFrom(0xc00cc7cee8, {0x7ffdd1a97de0, 0xc000b04ee8})
E:/Go/src/bytes/buffer.go:211 +0x98
github.com/refraction-networking/utls.(*Conn).readFromUntil(0xc00cc7cc00, {0x20317651078?, 0xc0001bff60}, 0x700?)
D:/Go/pkg/mod/github.com/refraction-networking/utls@v1.5.3/conn.go:829 +0xde
github.com/refraction-networking/utls.(*Conn).readRecordOrCCS(0xc00cc7cc00, 0x0)
D:/Go/pkg/mod/github.com/refraction-networking/utls@v1.5.3/conn.go:627 +0x250
github.com/refraction-networking/utls.(*Conn).readRecord(...)
D:/Go/pkg/mod/github.com/refraction-networking/utls@v1.5.3/conn.go:589
github.com/refraction-networking/utls.(*Conn).Read(0xc00cc7cc00, {0xc002d12000, 0x1000, 0x7ffdd1584be5?})
D:/Go/pkg/mod/github.com/refraction-networking/utls@v1.5.3/conn.go:1380 +0x158
bufio.(*Reader).Read(0xc00d10a960, {0xc00caa4040, 0x9, 0x6e0959b782414?})
E:/Go/src/bufio/bufio.go:244 +0x197
io.ReadAtLeast({0x7ffdd1a974c0, 0xc00d10a960}, {0xc00caa4040, 0x9, 0x9}, 0x9)
E:/Go/src/io/io.go:335 +0x90
io.ReadFull(...)
E:/Go/src/io/io.go:354
github.com/wangluozhe/fhttp/http2.readFrameHeader({0xc00caa4040, 0x9, 0x7ffdd18b44c5?}, {0x7ffdd1a974c0?, 0xc00d10a960?})
D:/Go/pkg/mod/github.com/wangluozhe/fhttp@v0.0.2/http2/frame.go:237 +0x65
github.com/wangluozhe/fhttp/http2.(*Framer).ReadFrame(0xc00caa4000)
D:/Go/pkg/mod/github.com/wangluozhe/fhttp@v0.0.2/http2/frame.go:498 +0x85
github.com/wangluozhe/fhttp/http2.(*clientConnReadLoop).run(0xc002cf7f98)
D:/Go/pkg/mod/github.com/wangluozhe/fhttp@v0.0.2/http2/transport.go:2477 +0x11f
github.com/wangluozhe/fhttp/http2.(*ClientConn).readLoop(0xc00ccae180)
D:/Go/pkg/mod/github.com/wangluozhe/fhttp@v0.0.2/http2/transport.go:2372 +0x65
created by github.com/wangluozhe/fhttp/http2.(*Transport).newClientConn in goroutine 146904
D:/Go/pkg/mod/github.com/wangluozhe/fhttp@v0.0.2/http2/transport.go:890 +0xc70
This is the answer from ChatGPT:
The error message you provided indicates that the goroutine is stuck in an I/O wait state while executing the readFrameHeader function. This typically occurs when there is an issue with reading data from the underlying network connection.
Here are a few suggestions to help you debug and resolve the issue:
Check the network connection: Ensure that the network connection is established correctly and that there are no network issues causing interruptions or delays in data transmission.
Verify compatibility: Make sure that the github.com/wangluozhe/fhttp package you are using is compatible with the version of the Go programming language you have installed. Check for any updates or known issues with the package.
Review your code: Double-check your code implementation for any potential mistakes or misuse of the http2 package. Ensure that you are using the correct reader and that the buffer is properly initialized.
Enable debugging: Consider enabling debugging statements or logging to gather more information about the error. This can help you identify the specific line of code or the point at which the error occurs.
Consult the package documentation or community: Look for any relevant documentation or community forums related to the github.com/wangluozhe/fhttp package. There might be specific guidelines or known issues that can assist you in resolving the problem.
By investigating these areas, you should be able to diagnose and address the issue causing the readFrameHeader function to hang and generate the reported error.
Thanks for reporting.
The stack trace looked completely normal to me. So if you are looking for some help from the community, perhaps consider providing more details. A minimal example to deterministically/statistically replicate this error is a must, as we can't debug something until we see it. Any error messages or panic messages you could provide might be helpful as well.
By the way I don't believe the response generated by ChatGPT would be at all helpful without enough context provided to it.