zdtm: add UDP multicast checkpoint/restore test#2897
zdtm: add UDP multicast checkpoint/restore test#2897Piyushkhobragade wants to merge 1 commit intocheckpoint-restore:criu-devfrom
Conversation
Add socket_udp-multicast ZDTM test to validate preservation of IP_ADD_MEMBERSHIP across CRIU dump/restore. The test joins 239.0.0.1, performs checkpoint/restore, and verifies post-restore multicast packet transmission. Current behavior indicates sendto() fails with ENETUNREACH after restore, suggesting multicast egress state may not be fully restored.
|
We usually don't add tests for unsupported things. Could you try to investigate what we need to do to support C/R of socket multicast groups. |
|
@avagin I investigated the kernel and CRIU architecture to map out exactly what is missing and what it will take to fully support C/R for socket multicast groups. The Architectural BlockerCurrently, the Linux kernel does not expose a socket's multicast group memberships (
To support this in CRIU, we have to execute a full-stack fix starting upstream: 1. Kernel Patch (
|
|
Could you try to implement a socket diag extension to dump multicast groups? |
|
@avagin Absolutely, I will take this on. Before I start drafting the patch for the upstream I propose adding a new extension flag, e.g., During a /* In include/uapi/linux/inet_diag.h */
struct inet_diag_mcast_item {
__u8 family; /* AF_INET or AF_INET6 */
__u8 pad[3];
__u32 ifindex; /* Interface index bound to */
__u32 addr[4]; /* Multicast address (up to 128 bits for IPv6) */
}; |
It is a long way to the netdev mailing list. Let's implement both linux kernel and criu changes. Then we will discuss/review them and only then you will start thinking on sending something to netdev.
I don't have time right now to deep dive into details. So far it looks okay, we will be able to adjust it later. |
This PR introduces a deterministic ZDTM test (
socket_udp-multicast.c) to exercise UDP multicast group membership (IP_ADD_MEMBERSHIP) across the CRIU checkpoint/restore lifecycle.Test Design
The test:
239.0.0.1IFF_UPThe implementation is intentionally minimal and avoids namespace-specific assumptions.
Observed Behavior
Multicast join succeeds before checkpoint
criu dumpandcriu restoreboth complete successfullyAfter restore, the verification step fails:
sendto() → ENETUNREACH (Network is unreachable)
The multicast route (
224.0.0.0/4) is present and the interface is UP.No explicit
IP_MULTICAST_IFreconfiguration is performed after restore.This suggests that multicast egress/interface state may not be fully preserved across checkpoint/restore.
Question
Is multicast egress/interface state expected to be restored for UDP sockets?
If this is currently unsupported, I can:
Looking for guidance on the preferred direction.