thanos-io/thanos · error

proto: Chunk: wiretype end group for non-group

Error message

proto: Chunk: wiretype end group for non-group

What it means

Hand-written protobuf unmarshalling of the Chunk message encountered wire type 4 (end-group) where no group was open. The input at fault is the dAtA payload; it is not valid protobuf for Chunk, typically meaning truncated, corrupted, or wrongly-versioned serialized chunk bytes.

Solutions

  1. Drop and re-fetch the corrupted chunk/block from its source
  2. Run bucket verify to detect malformed blocks
  3. Check for client/server protobuf version skew on the Series RPC
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/store/storepb/custom.go:608 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/a6e3a5f5cfdff0fc. Report an issue: GitHub.

Appendix: source

Thrown at pkg/store/storepb/custom.go:608

		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTypes
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Chunk: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Chunk: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTypes
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]

View on GitHub (pinned to 35b8b99117)