Panics can be caused by all sorts of things, but concurrency issues are a
big one. Have you tried running your code under the race detector?
https://go.dev/blog/race-detector
On Wednesday 3 January 2024 at 10:57:49 UTC cheng dong wrote:
> i have a program paniced with
>
> ```
> runtime.deferCallSave(0xc0313d56d8, 0xc0401839e8?)
> /home/ubuntu/go/go1.19.5/src/runtime/panic.go:796 +0x88
> fp=0xc0313d5618 sp=0xc0313d5608 pc=0x43b248
> runtime.runOpenDeferFrame(0xc02349b860?, 0xc0300967d0)
> /home/ubuntu/go/go1.19.5/src/runtime/panic.go:769 +0x1a5
> fp=0xc0313d5660 sp=0xc0313d5618 pc=0x43b065
> panic({0x344a800, 0xc03352c8d0})
> /home/ubuntu/go/go1.19.5/src/runtime/panic.go:884 +0x212
> fp=0xc0313d5720 sp=0xc0313d5660 pc=0x43b4b2
> runtime.panicdottypeE(0x6648f00, 0x32b77a0, 0x33adc40)
> /home/ubuntu/go/go1.19.5/src/runtime/iface.go:262 +0x6a
> fp=0xc0313d5740 sp=0xc0313d5720 pc=0x40cb2a
> context.(*cancelCtx).Done(0xc040183824?)
> /home/ubuntu/go/go1.19.5/src/context/context.go:361 +0x1d4
> fp=0xc0313d57c0 sp=0xc0313d5740 pc=0x512554
> ```
>
> however, this code just not match with go1.19.5 context/context.go:361. so
> i cant figure out what happened
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/1009082f-2528-4adb-b853-a2bebc5e018dn%40googlegroups.com.