Skip to content

CI: different workfows - connectivity test - failing with panic "runtime error: index out of range [3] with length 0" #43901

@tsotne95

Description

@tsotne95

There are more CI failures with the same reasons, personally I checked and verified logs from:
https://github.com/cilium/cilium/actions/runs/21202871770
https://github.com/cilium/cilium/actions/runs/21201773204
https://github.com/cilium/cilium/actions/runs/21205748555

The Cilium agent panics with "index out of range" in pkg/datapath/linux/config/config.go during startup or configuration regeneration.

example of the error:

message: "=health reporter-id=agent.datapath.orchestrator.job-reinitialize\npanic:
            runtime error: index out of range [3] with length 0\n\ngoroutine 416 [running]:\ngithub.com/cilium/cilium/pkg/byteorder.NetIPv4ToHost32({0x0?,
            0xc000e12a50?, 0x4b2389c?})\n\t/go/src/github.com/cilium/cilium/pkg/byteorder/byteorder.go:15
            +0x65\ngithub.com/cilium/cilium/pkg/datapath/linux/config.(*HeaderfileWriter).WriteNodeConfig(0xc001ed8d80,
            {0x7f1bb24621c8, 0xc002ef6c80}, 0xc000fe5208)\n\t/go/src/github.com/cilium/cilium/pkg/datapath/linux/config/config.go:143
            +0x973\ngithub.com/cilium/cilium/pkg/datapath/loader.hashDatapath({0x51db458,
            0xc001ed8d80}, 0xc000fe5208)\n\t/go/src/github.com/cilium/cilium/pkg/datapath/loader/hash.go:20
            +0xa9\ngithub.com/cilium/cilium/pkg/datapath/loader.(*objectCache).UpdateDatapathHash(0xc000bc2f50,
            0xc0024a85f0?)\n\t/go/src/github.com/cilium/cilium/pkg/datapath/loader/cache.go:65
            +0x4d\ngithub.com/cilium/cilium/pkg/datapath/loader.(*loader).Reinitialize(0xc001fc9b80,
            {0x51d3f58, 0xc000b14870}, 0xc000fe5208, {{0x4aa10bf, 0x4}, {0x0, 0x0},
            0x0, 0x0, ...}, ...)\n\t/go/src/github.com/cilium/cilium/pkg/datapath/loader/base.go:356
            +0x3be\ngithub.com/cilium/cilium/pkg/datapath/orchestrator.(*orchestrator).reinitialize(0xc002008b08,
            {0x51d3f58?, 0xc000b14870?}, {{0x0?, 0x0?}, 0x0?}, 0xc000fe5208)\n\t/go/src/github.com/cilium/cilium/pkg/datapath/orchestrator/orchestrator.go:284
            +0x128\ngithub.com/cilium/cilium/pkg/datapath/orchestrator.(*orchestrator).reconciler(0xc002008b08,
            {0x51d3f58, 0xc000b14870}, {0x51e9c80, 0xc0022f24e0})\n\t/go/src/github.com/cilium/cilium/pkg/datapath/orchestrator/orchestrator.go:229
            +0x805\ngithub.com/cilium/hive/job.(*jobOneShot).start(0xc002060000, {0x51d3f58,
            0xc000b14870}, 0xc002c4dfd0?, {0x51e9c80, 0xc001ed9f20}, {{{0xc001f"
          reason: Error
          startedAt: "2026-01-21T09:00:16Z"

Reason: When EnableIPv4 is set to true, WriteNodeConfig unconditionally attempts to convert cfg.CiliumInternalIPv4 to a 32-bit host integer. If the internal IP (router IP) has not yet been initialized (e.g. waiting for IPAM or K8s sync), accessing the nil byte slice causes the panic in byteorder.

if option.Config.EnableIPv4 {
		ipv4GW := cfg.CiliumInternalIPv4
		cDefinesMap["IPV4_GATEWAY"] = fmt.Sprintf("%#x", byteorder.NetIPv4ToHost32(ipv4GW))

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/CIContinuous Integration testing issue or flakearea/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.area/loaderImpacts the loading of BPF programs into the kernel.ci/flakeThis is a known failure that occurs in the tree. Please investigate me!kind/bugThis is a bug in the Cilium logic.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions