Skip to content

Kernel/virtio-net: git clone causes kernel panic #26477

@oskar-skog

Description

@oskar-skog
Image

When using zsh as /bin/sh, trying to git clone any repo will reliably cause the following panic.
With dash it takes several attempts until it happens, it seems to depend on how much RAM you have.
It appears to either be a regression, or x86_64 is somehow immune.

112.630 [#0 git-remote-https(49:49)]: setsockopt(10) at IPPROTO_TCP not implemented.
[Network Task(8:8)]: ASSERTION FAILED: copy_data_to_chain(chain, *m_tx_buffers, reinterpret_cast<u8*>(&hdr), sizeof(hdr))
[Network Task(8:8)]: ./Kernel/Net/VirtIO/VirtIONetworkAdapter.cpp:273 in virtual void Kernel::VirtIONetworkAdapter::send_raw(AK::ReadonlyBytes)
[Network Task(8:8)]: KERNEL PANIC! :^(
[Network Task(8:8)]: Aborted
[Network Task(8:8)]: at ./Kernel/Library/Assertions.cpp:38 in void abort()
Kernel + 0x000000000033df60  Kernel::__panic(char const*, unsigned int, char const*) +0xc0
Kernel + 0x0000000000338abc  abort +0x100
Kernel + 0x00000000003389bc  abort +0x0
Kernel + 0x000000000034f2ac  Kernel::VirtIONetworkAdapter::send_raw(AK::Span<unsigned char const>) +0x468
Kernel + 0x0000000000368fcc  Kernel::NetworkAdapter::send_packet(AK::Span<unsigned char const>) +0x60
Kernel + 0x0000000000390710  Kernel::TCPSocket::send_tcp_packet(unsigned short, Kernel::UserOrKernelBuffer const*, unsigned long, Kernel::RoutingDecision*) +0xf08
Kernel + 0x0000000000374ddc  Kernel::handle_ipv4(EthernetFrameHeader const&, unsigned long, AK::UnixDateTime const&, AK::RefPtr<Kernel::NetworkAdapter>) +0x22b4
Kernel + 0x0000000000376d7c  Kernel::NetworkTask_main(void*) +0xef4
Kernel + 0x00000000000079e0  exit_kernel_thread +0x0

Panics on bff31bc on aarch64 with zsh as /bin/sh and 2G of RAM, other shells and RAM sizes are yet to be tested.

Panics on 81d31ee on riscv64 with zsh as /bin/sh and 2G of RAM

Panics on 2nd git clone on 81d31ee on riscv64 with dash as /bin/sh and 2G RAM (tested twice)

Panics on 11th git clone on 81d31ee on riscv64 with dash as /bin/sh and 5G RAM (tested once)

No panic, at least on first attempt to git clone, on a month old version on x86-64
For testing on x86-64, I've hacked Meta/serenity.sh to allow me to run the old build I already have.
Latest modified date in Build/x86_64 is 2025-11-08 for the OS and 2025-11-07 for the Ports
About SerenityOS says it's commit 66087b3 which sounds reasonable
I was probably using zsh and 2G of RAM here as well.

All tests with default toolchain/gcc and run with Meta/serenity.sh run

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions