Skip to content

encoding/gob: Weird errors when using gob in more than one goroutine #1238

@alberts

Description

@alberts
What steps will reproduce the problem?
1. Run attached code with more than one client goroutine.

What do you see instead?

panic: Encode of Msg1 failed: "encoder: buffer not empty"

or sometimes:

Decode failed: "gob: unknown type id or corrupted data"

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

4798dc1f040a+ tip

Please provide any additional information below.

In the code that originally caused this crash, we also see stuff like:

gob: internal error: field numbers out of bounds

Attachments:

  1. gobbork.go (1315 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions