From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com, Daniel Kral <d.kral@proxmox.com>
Subject: Re: [PATCH-SERIES cluster 00/12] addressing large ipc message responses
Date: Fri, 23 Oct 2026 17:45:17 +0200 [thread overview]
Message-ID: <179277014467.3697247.5808391556729339767.b4-ty@b4> (raw)
In-Reply-To: <20260824085610.111211-2-d.kral@proxmox.com>
On Mon, 24 Aug 2026 10:55:59 +0200, Daniel Kral wrote:
> Currently, the IPC server can only send MAX_MSG_SIZE (currently, 1 MiB)
> to IPC clients, i.e. users of PVE::IPCC::ipcc_send_recv(). Otherwise,
> the IPC clients will fail with:
>
> ipcc_send_rec[13] failed: Transport endpoint is not connected
>
> and the IPC server will log:
>
> [...]
Applied, thanks!
I had to fix a few issues on top though that I then fixed up and folded in
(and replaced on commit) as I had it locally already anyway (and missed you
twice in person), the main ones being:
- 11/12 made pmxcfs crash on every API token verification, as the new
struct with a `char *token` member reads the start of the token as a
pointer. The handler now uses the request body directly.
- 12/12 was not upgrade safe in either direction. A pmxcfs that is not
yet restarted read the new request header as part of the body, so
requests without a body failed and status updates got stored under a
bogus key. And the new client parsed the old, shorter responses with
the extended header, which made Perl die with "panic: memory wrap".
- Detecting new clients through a magic value at the start of the
request body is ambiguous, as a request from an old client can start
with the same bytes, e.g. a cluster log request with max=48164.
- Pushing all chunks at once made the single IPC worker retry with a
sleep while the client's ring buffer was full, so a client that stops
reading blocked all IPC on the node.
- The client gave up after 2 seconds, whereas it previously waited as
long as pmxcfs is connected. It also retried only after send failures,
reported negative errno values, and its size limit for old clients was
16 bytes too strict.
So I basically rewrote 12/12: clients now announce chunk support with a
flag bit in the request id, which an old pmxcfs answers with -ECHRNG
without handling the request, so the client can fall back to plain
requests. And the client fetches each further chunk with its own
request, so the server never waits on a client. As most of the code is
new now, I took over authorship and added you as Co-authored-by.
Separately, testing on a 15 node cluster showed that pmxcfs crashed
whenever a response could not be sent, because it disconnected the
client from within the libqb message callback. That bug predates this
series, and 05/12 already avoids its most common trigger, oversized
responses. I fixed it in a follow-up commit.
[01/12] buildsys: include pmxcfs tidy target in top-level tidy target
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=0d6998a5cfa1d6165039c86c31fbfa891bbc8229
[02/12] run make tidy
superfluous due to recent other cahnges
[03/12] pmxcfs: server: simplify non-negative ipc message result responses
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=af840e5f86bbd92b48a425d7637bc2369d8d48a9
[04/12] pmxcfs: server: simplify ipc message response logic
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=0e4c64f53efbce58e2b9058cec9a427d9ef51ace
[05/12] pmxcfs: server: report responses exceeding the maximum message size
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=8aa1d4be0285984bfd65af16ffca3ef50c2b789f
[06/12] pmxcfs: server: remove unnecessary local variable alignment attributes
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=2982458dda26363b7f4f2a3d0c736869673e769c
[07/12] pmxcfs: server: move message handling to separate function
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=391e395274fb219ccea37b5fd8f94dce07755ca8
[08/12] pmxcfs: server: move message response sending to separate function
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=c4daf3cf26f04d1001b490306ce2e3fb54861aa2
[09/12] pmxcfs: server: simplify message response size calculation
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=4d19d09e811588b7f20c2d67c00b8aa7e1827f1c
[10/12] ipcc: move the data pointer initialization up
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=87f576fe2bb603169a913531de5ee1cb105dad26
[11/12] pmxcfs: server: do not forward qb_ipc_request_header to s1_msg_handle_request
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=f44af776b8067d7db4be1a508017137ff88eb1a8
[12/12] allow large ipc responses by sending the response message in chunks
https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=8f0871672323457beb5acfebfd10c367e15658c8
prev parent reply other threads:[~2026-10-23 16:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 8:55 [PATCH-SERIES cluster 00/12] addressing large ipc message responses Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 01/12] buildsys: include pmxcfs tidy target in top-level tidy target Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 02/12] run make tidy Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 03/12] pmxcfs: server: simplify non-negative ipc message result responses Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 04/12] pmxcfs: server: simplify ipc message response logic Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 05/12] pmxcfs: server: report responses exceeding the maximum message size Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 06/12] pmxcfs: server: remove unnecessary local variable alignment attributes Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 07/12] pmxcfs: server: move message handling to separate function Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 08/12] pmxcfs: server: move message response sending " Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 09/12] pmxcfs: server: simplify message response size calculation Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 10/12] ipcc: move the data pointer initialization up Daniel Kral
2026-08-24 8:56 ` [PATCH cluster 11/12] pmxcfs: server: do not forward qb_ipc_request_header to s1_msg_handle_request Daniel Kral
2026-08-24 8:56 ` [RFC PATCH cluster 12/12] allow large ipc responses by sending the response message in chunks Daniel Kral
2026-10-23 15:45 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179277014467.3697247.5808391556729339767.b4-ty@b4 \
--to=t.lamprecht@proxmox.com \
--cc=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox