all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up
@ 2026-11-16 16:01 Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 1/4] tree wide: update copyright notice to current year Shannon Sterz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Shannon Sterz @ 2026-11-16 16:01 UTC (permalink / raw)
  To: pve-devel

Issue #8325 describes a scenario that can happen on unstable Corosync
links and can leave certain processes interacting with pmxcfs stuck in D
state. For more information see patch 2/4.

The other patches here do the following:

- 1/4: trivial copyright notice update.
- 3/4: wake waiters when dfsm switches to an error mode.
- 4/4: handle error results of `dfsm_cpg_deliver_callback` correctly.

Shannon Sterz (4):
  tree wide: update copyright notice to current year
  fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle
  pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode
  pmxcfs: dfsm: make sure error results are processed correctly

 debian/copyright              |  2 +-
 src/pmxcfs/cfs-ipc-ops.h      |  2 +-
 src/pmxcfs/cfs-plug-func.c    |  2 +-
 src/pmxcfs/cfs-plug-link.c    |  2 +-
 src/pmxcfs/cfs-plug-memdb.c   |  2 +-
 src/pmxcfs/cfs-plug-memdb.h   |  2 +-
 src/pmxcfs/cfs-plug.c         |  2 +-
 src/pmxcfs/cfs-plug.h         |  2 +-
 src/pmxcfs/cfs-utils.c        |  2 +-
 src/pmxcfs/cfs-utils.h        |  2 +-
 src/pmxcfs/check_memdb.c      |  2 +-
 src/pmxcfs/confdb.c           |  2 +-
 src/pmxcfs/confdb.h           |  2 +-
 src/pmxcfs/create_pmxcfs_db.c |  2 +-
 src/pmxcfs/database.c         |  2 +-
 src/pmxcfs/dcdb.c             |  2 +-
 src/pmxcfs/dcdb.h             |  2 +-
 src/pmxcfs/dfsm.c             | 41 ++++++++++++++++++++++++++++-------
 src/pmxcfs/dfsm.h             |  2 +-
 src/pmxcfs/logger.c           |  2 +-
 src/pmxcfs/logger.h           |  2 +-
 src/pmxcfs/logtest.c          |  2 +-
 src/pmxcfs/logtest2.c         |  2 +-
 src/pmxcfs/loop.c             |  2 +-
 src/pmxcfs/loop.h             |  2 +-
 src/pmxcfs/memdb.c            |  2 +-
 src/pmxcfs/memdb.h            |  2 +-
 src/pmxcfs/pmxcfs.c           |  2 +-
 src/pmxcfs/quorum.c           |  2 +-
 src/pmxcfs/quorum.h           |  2 +-
 src/pmxcfs/server.c           |  2 +-
 src/pmxcfs/server.h           |  2 +-
 src/pmxcfs/status.c           |  2 +-
 src/pmxcfs/status.h           |  2 +-
 src/test/cpgtest.c            |  2 +-
 35 files changed, 67 insertions(+), 42 deletions(-)

--
2.47.3





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH cluster 1/4] tree wide: update copyright notice to current year
  2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
@ 2026-11-16 16:01 ` Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 2/4] fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle Shannon Sterz
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Shannon Sterz @ 2026-11-16 16:01 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 debian/copyright              | 2 +-
 src/pmxcfs/cfs-ipc-ops.h      | 2 +-
 src/pmxcfs/cfs-plug-func.c    | 2 +-
 src/pmxcfs/cfs-plug-link.c    | 2 +-
 src/pmxcfs/cfs-plug-memdb.c   | 2 +-
 src/pmxcfs/cfs-plug-memdb.h   | 2 +-
 src/pmxcfs/cfs-plug.c         | 2 +-
 src/pmxcfs/cfs-plug.h         | 2 +-
 src/pmxcfs/cfs-utils.c        | 2 +-
 src/pmxcfs/cfs-utils.h        | 2 +-
 src/pmxcfs/check_memdb.c      | 2 +-
 src/pmxcfs/confdb.c           | 2 +-
 src/pmxcfs/confdb.h           | 2 +-
 src/pmxcfs/create_pmxcfs_db.c | 2 +-
 src/pmxcfs/database.c         | 2 +-
 src/pmxcfs/dcdb.c             | 2 +-
 src/pmxcfs/dcdb.h             | 2 +-
 src/pmxcfs/dfsm.c             | 2 +-
 src/pmxcfs/dfsm.h             | 2 +-
 src/pmxcfs/logger.c           | 2 +-
 src/pmxcfs/logger.h           | 2 +-
 src/pmxcfs/logtest.c          | 2 +-
 src/pmxcfs/logtest2.c         | 2 +-
 src/pmxcfs/loop.c             | 2 +-
 src/pmxcfs/loop.h             | 2 +-
 src/pmxcfs/memdb.c            | 2 +-
 src/pmxcfs/memdb.h            | 2 +-
 src/pmxcfs/pmxcfs.c           | 2 +-
 src/pmxcfs/quorum.c           | 2 +-
 src/pmxcfs/quorum.h           | 2 +-
 src/pmxcfs/server.c           | 2 +-
 src/pmxcfs/server.h           | 2 +-
 src/pmxcfs/status.c           | 2 +-
 src/pmxcfs/status.h           | 2 +-
 src/test/cpgtest.c            | 2 +-
 35 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 211e357..567f155 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Copyright (C) 2010 - 2021 Proxmox Server Solutions GmbH
+Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
 This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
 
diff --git a/src/pmxcfs/cfs-ipc-ops.h b/src/pmxcfs/cfs-ipc-ops.h
index 249308d..9289c4a 100644
--- a/src/pmxcfs/cfs-ipc-ops.h
+++ b/src/pmxcfs/cfs-ipc-ops.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2018 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2018 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug-func.c b/src/pmxcfs/cfs-plug-func.c
index f192851..6d26c83 100644
--- a/src/pmxcfs/cfs-plug-func.c
+++ b/src/pmxcfs/cfs-plug-func.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2011 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2011 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug-link.c b/src/pmxcfs/cfs-plug-link.c
index 573db4d..2323866 100644
--- a/src/pmxcfs/cfs-plug-link.c
+++ b/src/pmxcfs/cfs-plug-link.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug-memdb.c b/src/pmxcfs/cfs-plug-memdb.c
index dd32684..0af3b18 100644
--- a/src/pmxcfs/cfs-plug-memdb.c
+++ b/src/pmxcfs/cfs-plug-memdb.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug-memdb.h b/src/pmxcfs/cfs-plug-memdb.h
index 077a8d8..c0b3b81 100644
--- a/src/pmxcfs/cfs-plug-memdb.h
+++ b/src/pmxcfs/cfs-plug-memdb.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug.c b/src/pmxcfs/cfs-plug.c
index b943df5..95f62f5 100644
--- a/src/pmxcfs/cfs-plug.c
+++ b/src/pmxcfs/cfs-plug.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-plug.h b/src/pmxcfs/cfs-plug.h
index cee3f7a..ab4e680 100644
--- a/src/pmxcfs/cfs-plug.h
+++ b/src/pmxcfs/cfs-plug.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
 
diff --git a/src/pmxcfs/cfs-utils.c b/src/pmxcfs/cfs-utils.c
index db5e3ed..239d380 100644
--- a/src/pmxcfs/cfs-utils.c
+++ b/src/pmxcfs/cfs-utils.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/cfs-utils.h b/src/pmxcfs/cfs-utils.h
index ed67264..85e60af 100644
--- a/src/pmxcfs/cfs-utils.h
+++ b/src/pmxcfs/cfs-utils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/check_memdb.c b/src/pmxcfs/check_memdb.c
index f21abd0..74728df 100644
--- a/src/pmxcfs/check_memdb.c
+++ b/src/pmxcfs/check_memdb.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/confdb.c b/src/pmxcfs/confdb.c
index 3479e52..51be7b7 100644
--- a/src/pmxcfs/confdb.c
+++ b/src/pmxcfs/confdb.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/confdb.h b/src/pmxcfs/confdb.h
index 2412521..46ec888 100644
--- a/src/pmxcfs/confdb.h
+++ b/src/pmxcfs/confdb.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/create_pmxcfs_db.c b/src/pmxcfs/create_pmxcfs_db.c
index bbf4dd2..1ec17ca 100644
--- a/src/pmxcfs/create_pmxcfs_db.c
+++ b/src/pmxcfs/create_pmxcfs_db.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/database.c b/src/pmxcfs/database.c
index c084623..9637684 100644
--- a/src/pmxcfs/database.c
+++ b/src/pmxcfs/database.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/dcdb.c b/src/pmxcfs/dcdb.c
index 3a0bb81..6f160a9 100644
--- a/src/pmxcfs/dcdb.c
+++ b/src/pmxcfs/dcdb.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/dcdb.h b/src/pmxcfs/dcdb.h
index 988da96..d637cc7 100644
--- a/src/pmxcfs/dcdb.h
+++ b/src/pmxcfs/dcdb.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/dfsm.c b/src/pmxcfs/dfsm.c
index cc2b4db..b9d07d0 100644
--- a/src/pmxcfs/dfsm.c
+++ b/src/pmxcfs/dfsm.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/dfsm.h b/src/pmxcfs/dfsm.h
index 8628e0b..f1c2af9 100644
--- a/src/pmxcfs/dfsm.h
+++ b/src/pmxcfs/dfsm.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/logger.c b/src/pmxcfs/logger.c
index 3bbb7c0..57fea74 100644
--- a/src/pmxcfs/logger.c
+++ b/src/pmxcfs/logger.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/logger.h b/src/pmxcfs/logger.h
index 92d79d3..911b875 100644
--- a/src/pmxcfs/logger.h
+++ b/src/pmxcfs/logger.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/logtest.c b/src/pmxcfs/logtest.c
index a488160..281b0ea 100644
--- a/src/pmxcfs/logtest.c
+++ b/src/pmxcfs/logtest.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/logtest2.c b/src/pmxcfs/logtest2.c
index 184713d..97d16af 100644
--- a/src/pmxcfs/logtest2.c
+++ b/src/pmxcfs/logtest2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/loop.c b/src/pmxcfs/loop.c
index 4750230..76ae823 100644
--- a/src/pmxcfs/loop.c
+++ b/src/pmxcfs/loop.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/loop.h b/src/pmxcfs/loop.h
index f59fed9..c8befaa 100644
--- a/src/pmxcfs/loop.h
+++ b/src/pmxcfs/loop.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/memdb.c b/src/pmxcfs/memdb.c
index a47bea8..8862607 100644
--- a/src/pmxcfs/memdb.c
+++ b/src/pmxcfs/memdb.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/memdb.h b/src/pmxcfs/memdb.h
index bca8967..970ae14 100644
--- a/src/pmxcfs/memdb.h
+++ b/src/pmxcfs/memdb.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2021 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/pmxcfs.c b/src/pmxcfs/pmxcfs.c
index 14f1168..b8a212d 100644
--- a/src/pmxcfs/pmxcfs.c
+++ b/src/pmxcfs/pmxcfs.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/quorum.c b/src/pmxcfs/quorum.c
index e2ec0a3..0ac3cfe 100644
--- a/src/pmxcfs/quorum.c
+++ b/src/pmxcfs/quorum.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/quorum.h b/src/pmxcfs/quorum.h
index da6ba85..3dec79c 100644
--- a/src/pmxcfs/quorum.h
+++ b/src/pmxcfs/quorum.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/server.c b/src/pmxcfs/server.c
index 1563a66..2e9316d 100644
--- a/src/pmxcfs/server.c
+++ b/src/pmxcfs/server.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/server.h b/src/pmxcfs/server.h
index bf32a4f..e471fa2 100644
--- a/src/pmxcfs/server.h
+++ b/src/pmxcfs/server.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c
index 80fa682..861cf97 100644
--- a/src/pmxcfs/status.c
+++ b/src/pmxcfs/status.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/pmxcfs/status.h b/src/pmxcfs/status.h
index 6a6b0a7..709ef64 100644
--- a/src/pmxcfs/status.h
+++ b/src/pmxcfs/status.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2010 - 2020 Proxmox Server Solutions GmbH
+  Copyright (C) 2010 - 2026 Proxmox Server Solutions GmbH
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU Affero General Public License as published by
diff --git a/src/test/cpgtest.c b/src/test/cpgtest.c
index 82f577e..2261fdb 100644
--- a/src/test/cpgtest.c
+++ b/src/test/cpgtest.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009 Proxmox Server Solutions GmbH
+  Copyright (C) 2009 - 2026 Proxmox Server Solutions GmbH
 
   Copyright: This program is under GNU GPL, the GNU General Public License.
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH cluster 2/4] fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle
  2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 1/4] tree wide: update copyright notice to current year Shannon Sterz
@ 2026-11-16 16:01 ` Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 3/4] pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode Shannon Sterz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Shannon Sterz @ 2026-11-16 16:01 UTC (permalink / raw)
  To: pve-devel

`cpg_mcast_joined()` seems to return `CS_OK` for unfragmented messages
even if `cpg_join()` has not joined a group yet. the message will be
dropped and an error message is logged by Corosync ("corosync[1028]:
[CPG   ] *** 0xXXXXXXXXXXXXX can't mcast to group state:0, error:12").

this leads to the following situation in which a thread can get stuck:

1. a new dfsm is initialized via `dfsm_initialize()`
2. a FUSE thread tries to issue a write
   (`dcdb_send_fuse_message_full()`) -> this triggers a
   `dfsm_send_message_sync()` which in turn triggers
   `dfsm_send_message_full()` and `cpg_mcast_joined()`. the message is
   dropped as `cpg_join()` did not successfully complete yet.
3. only now `dfsm_join()` successfully returns from `cpg_join()` (note
   that this step can take longer if the cluster is unstable as it
   will be indefinitely retried).
4. the thread handling `dfsm_send_message_sync()` is stuck waiting on
   `dfsm->sync_cond`

in theory a later message from the same node could wake the thread
again. however, if the FUSE thread is trying to acquire a lock, it is
highly likely that all other requests get stuck on trying to acquire
the same lock before ever sending a message out via dfsm. so threads
can get stuck.

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=8325
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---

Notes:
    to reproduce run the following:
    
    - set up at least a quorate two node cluster.
    - install pve-cluster debug symbols via the debug repo [1] and gdb
      (`apt install pve-cluster-dbgsym gdb`)
    - save the following gdb script in `reproducer.gdb`:
      ```gdb
      tbreak dfsm_dispatch if $_streq(dfsm->log_domain, "dcdb")
      commands
        return CS_ERR_LIBRARY
        continue
      end
    
      break dfsm_join if $_streq(dfsm->log_domain, "dcdb")
      ```
        this sets two break points:
        1. a temporary breakpoint that will return an error on the next
           `dfsm_dispatch()` call to simulate a dropped corosync
           connection. this will trigger pmxcfs to re-initialize dfsm.
        2. a break point on `dfsm_join()` that will make the next `dcdb`
           join take as long as needed.
    - open three shells to the same node of the cluster
        1. run `journalctl -u pve-cluster.service -u corosync.service -f`
        2. run `gdb -iex 'set non-stop on' -iex 'set pagination off' -iex\
           'set confirm off' -x reproducer.gdb -p "$(pidof pmxcfs)"`
           this will attach gdb to pmxcfs in non-stop mode and execute the
           script from the previous step. type `continue -a` and hit
           enter. wait until gdb reports a stop at `dfsm_join`. note that
           the temporary breakpoint at `dfsm_dispatch()` may need an event
           on another node, however by default `pvestatd` is likely to do
           this for you anyway.
        3. run `mkdir /etc/pve/priv/lock/repro &`
    - run `del 2` to remove the second breakpoint (the first one should be
      removed automatically since its a temporary one) and then execute
      `continue -a`
    - the `mkdir` process in terminal 3. should be stuck in D state now
      and the journal in terminal 1. should contain log lines such as:
      ```
      corosync[1208]:   [CPG   ] *** 0xXXXXXXXXXXXXX can't mcast to group  state:0, error:12
      ```
    
    with this patch applied the reproducer will stop working, the fuse
    request will simply fail (it should log `cpg_send_message failed:
    CS_ERR_NOT_EXIST`). nothing about a failed mcast will be logged and
    processes should not be stuck in D state.
    
    [1]: https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_dbgsym_repo

 src/pmxcfs/dfsm.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/pmxcfs/dfsm.c b/src/pmxcfs/dfsm.c
index b9d07d0..741db54 100644
--- a/src/pmxcfs/dfsm.c
+++ b/src/pmxcfs/dfsm.c
@@ -187,7 +187,12 @@ dfsm_send_message_full(dfsm_t *dfsm, struct iovec *iov, unsigned int len, int re
     int retries = 0;
 loop:
     g_mutex_lock(&dfsm->cpg_mutex);
-    result = cpg_mcast_joined(dfsm->cpg_handle, CPG_TYPE_AGREED, iov, len);
+    /* only send when joined, Corosync will otherwise silently drop messages. */
+    if (!dfsm->joined) {
+        result = CS_ERR_NOT_EXIST;
+    } else {
+        result = cpg_mcast_joined(dfsm->cpg_handle, CPG_TYPE_AGREED, iov, len);
+    }
     g_mutex_unlock(&dfsm->cpg_mutex);
     if (retry && result == CS_ERR_TRY_AGAIN) {
         nanosleep(&tvreq, NULL);
@@ -1362,7 +1367,9 @@ cs_error_t dfsm_initialize(dfsm_t *dfsm, int *fd) {
     dfsm_free_message_queue(dfsm);
     dfsm_send_sync_message_abort(dfsm);
 
+    g_mutex_lock(&dfsm->cpg_mutex);
     dfsm->joined = FALSE;
+    g_mutex_unlock(&dfsm->cpg_mutex);
     dfsm->we_are_member = 0;
 
     dfsm_set_mode(dfsm, DFSM_MODE_START);
@@ -1425,6 +1432,9 @@ cs_error_t dfsm_join(dfsm_t *dfsm) {
 loop:
     g_mutex_lock(&dfsm->cpg_mutex);
     result = cpg_join(dfsm->cpg_handle, &dfsm->cpg_group_name);
+    if (result == CS_OK) {
+        dfsm->joined = TRUE;
+    }
     g_mutex_unlock(&dfsm->cpg_mutex);
     if (result == CS_ERR_TRY_AGAIN) {
         nanosleep(&tvreq, NULL);
@@ -1440,7 +1450,6 @@ loop:
         return result;
     }
 
-    dfsm->joined = TRUE;
     return TRUE;
 }
 
@@ -1455,6 +1464,9 @@ cs_error_t dfsm_leave(dfsm_t *dfsm) {
 loop:
     g_mutex_lock(&dfsm->cpg_mutex);
     result = cpg_leave(dfsm->cpg_handle, &dfsm->cpg_group_name);
+    if (result == CS_OK) {
+        dfsm->joined = FALSE;
+    }
     g_mutex_unlock(&dfsm->cpg_mutex);
     if (result == CS_ERR_TRY_AGAIN) {
         nanosleep(&tvreq, NULL);
@@ -1470,8 +1482,6 @@ loop:
         return result;
     }
 
-    dfsm->joined = FALSE;
-
     return TRUE;
 }
 
@@ -1485,9 +1495,11 @@ gboolean dfsm_finalize(dfsm_t *dfsm) {
     }
 
     if (dfsm->cpg_handle) {
+        g_mutex_lock(&dfsm->cpg_mutex);
         cpg_finalize(dfsm->cpg_handle);
         dfsm->cpg_handle = 0;
         dfsm->joined = FALSE;
+        g_mutex_unlock(&dfsm->cpg_mutex);
         dfsm->we_are_member = 0;
     }
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH cluster 3/4] pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode
  2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 1/4] tree wide: update copyright notice to current year Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 2/4] fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle Shannon Sterz
@ 2026-11-16 16:01 ` Shannon Sterz
  2026-11-16 16:01 ` [PATCH cluster 4/4] pmxcfs: dfsm: make sure error results are processed correctly Shannon Sterz
  2026-11-17  1:32 ` applied: [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Shannon Sterz @ 2026-11-16 16:01 UTC (permalink / raw)
  To: pve-devel

if the dfsm switches to an abnormal state (`>= DFSM_ERROR_MODE_START`)
and a thread is waiting in `dfsm_send_message_sync()` for a message to
return, it will wait indefinitely. this is because only two functions
will broadcast on the condition `&dfsm->sync_cond` that is waited for:

- `dfsm_record_local_result()`: only called by
  `dfsm_cpg_deliver_callback()` for local messages and only if mode is
  `< DFSM_ERROR_MODE_START`.
- `dfsm_send_sync_message_abort()`: only called on `dfsm_finalize()`
  or `dfsm_initialize()`. which are only called when the dfsm service
  is finalized or initialized; not on error modes.

further a call to `dcdb_deliver()` can call `dfsm_set_errormode()`
during a local delivery. then right after the abort
`dfsm_record_local_result()` will set the `msgcount_rcvd` back to that
message's number. a waiter in `dfsm_send_message_sync()` will be
woken, but the `msgcount_rcvd` will not be increased by default.
meaning the thread goes back to waiting. so a check on whether an
error mode here is set is necessary.

this patch does three things:

- wake any waiter of `&dfsm->sync_cond` upon entering an abnormal mode
- return an error on `dfsm_send_message_sync()` when in an error mode
- check whether dfsm is in an error mode when awoken in
  `dfsm_send_message_sync()`

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/pmxcfs/dfsm.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/pmxcfs/dfsm.c b/src/pmxcfs/dfsm.c
index 741db54..a5f241c 100644
--- a/src/pmxcfs/dfsm.c
+++ b/src/pmxcfs/dfsm.c
@@ -145,6 +145,7 @@ struct dfsm {
 
 static gboolean dfsm_deliver_queue(dfsm_t *dfsm);
 static gboolean dfsm_deliver_sync_queue(dfsm_t *dfsm);
+static dfsm_mode_t dfsm_get_mode(dfsm_t *dfsm);
 
 gboolean dfsm_nodeid_is_local(dfsm_t *dfsm, uint32_t nodeid, uint32_t pid) {
     g_return_val_if_fail(dfsm != NULL, FALSE);
@@ -262,6 +263,13 @@ cs_error_t dfsm_send_message_sync(
     g_return_val_if_fail(!len || iov != NULL, CS_ERR_INVALID_PARAM);
 
     g_mutex_lock(&dfsm->sync_mutex);
+    /* abort sending if we are in an abnormal state */
+    if (dfsm_get_mode(dfsm) >= DFSM_ERROR_MODE_START) {
+        cfs_dom_debug(dfsm->log_domain, "error mode - refusing to send message");
+        g_mutex_unlock(&dfsm->sync_mutex);
+        return CS_ERR_NOT_EXIST;
+    }
+
     /* note: hold lock until message is sent - to guarantee ordering */
     uint64_t msgcount = ++dfsm->msgcount;
     if (rp) {
@@ -303,7 +311,7 @@ cs_error_t dfsm_send_message_sync(
     if (rp) {
         g_mutex_lock(&dfsm->sync_mutex);
 
-        while (dfsm->msgcount_rcvd < msgcount) {
+        while (dfsm->msgcount_rcvd < msgcount && dfsm_get_mode(dfsm) < DFSM_ERROR_MODE_START) {
             g_cond_wait(&dfsm->sync_cond, &dfsm->sync_mutex);
         }
 
@@ -476,6 +484,11 @@ static void dfsm_set_mode(dfsm_t *dfsm, dfsm_mode_t new_mode) {
         return;
     }
 
+    if (new_mode >= DFSM_ERROR_MODE_START) {
+        /* abort waiting for sync messages to arrive if we are in an abnormal state */
+        dfsm_send_sync_message_abort(dfsm);
+    }
+
     if (new_mode == DFSM_MODE_START) {
         cfs_dom_message(dfsm->log_domain, "start cluster connection");
     } else if (new_mode == DFSM_MODE_START_SYNC) {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH cluster 4/4] pmxcfs: dfsm: make sure error results are processed correctly
  2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
                   ` (2 preceding siblings ...)
  2026-11-16 16:01 ` [PATCH cluster 3/4] pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode Shannon Sterz
@ 2026-11-16 16:01 ` Shannon Sterz
  2026-11-17  1:32 ` applied: [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Shannon Sterz @ 2026-11-16 16:01 UTC (permalink / raw)
  To: pve-devel

the comment in dfsm.h states that `res <= 0` is a serious error and
the group should be left. it is passed directly to
`dfsm_record_local_result()` as a `gboolean`. for the status dfsm's
deliver callback `dfsm_deliver()` this works as it only ever returns
`1` once `dfsm`, `msg` and `res_ptr` are set.

however, `dcdb_deliver()` will return `-1` on error. since there is no
validation when assigning a `gboolean` it could contain any `gint`
value, this includes `-1` [1].

`dfsm_record_local_result()` then sets the `processed` field of the
related `dfsm_result_t` struct. `-1` is truthy, so in
`dfsm_send_message_sync()` messages whose delivery callback failed
still returned `CS_OK`, because the check there is simply:

```c
         return rp->processed ? CS_OK : CS_ERR_FAILED_OPERATION;
```

note that dfsm would still leave the group correctly no matter what,
since the check in `dfsm_cpg_deliver_callback()` already was `res <
0`. so `-1` was handled correctly. this is technically also a
correctness issue, though, since currently the case `res == 0` does
not leave the group as intended. luckily, neither `dfsm_deliver()` nor
`dcdb_deliver()` ever returned 0. this patch still fixes this error to
avoid issues if either callback's behavior should change in the
future.

[1]: https://docs.gtk.org/glib/types.html#gboolean

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/pmxcfs/dfsm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pmxcfs/dfsm.c b/src/pmxcfs/dfsm.c
index a5f241c..9c5f5d5 100644
--- a/src/pmxcfs/dfsm.c
+++ b/src/pmxcfs/dfsm.c
@@ -666,10 +666,10 @@ static void dfsm_cpg_deliver_callback(
             );
 
             if (nodeid == dfsm->nodeid && pid == dfsm->pid) {
-                dfsm_record_local_result(dfsm, header->count, msg_res, res);
+                dfsm_record_local_result(dfsm, header->count, msg_res, res > 0);
             }
 
-            if (res < 0) {
+            if (res <= 0) {
                 goto leave;
             }
         }
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* applied: [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up
  2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
                   ` (3 preceding siblings ...)
  2026-11-16 16:01 ` [PATCH cluster 4/4] pmxcfs: dfsm: make sure error results are processed correctly Shannon Sterz
@ 2026-11-17  1:32 ` Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2026-11-17  1:32 UTC (permalink / raw)
  To: pve-devel, Shannon Sterz

On Mon, 16 Nov 2026 17:01:27 +0100, Shannon Sterz wrote:
> Issue #8325 describes a scenario that can happen on unstable Corosync
> links and can leave certain processes interacting with pmxcfs stuck in D
> state. For more information see patch 2/4.
> 
> The other patches here do the following:
> 
> - 1/4: trivial copyright notice update.
> - 3/4: wake waiters when dfsm switches to an error mode.
> - 4/4: handle error results of `dfsm_cpg_deliver_callback` correctly.
> 
> [...]

Applied, many thanks!

[1/4] tree wide: update copyright notice to current year
      https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=2b1006ca27543b3ef2d2930aed9400796156af2b
[2/4] fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle
      https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=870282b6040e553d50f7308a8a6289cb4f8d68ee
[3/4] pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode
      https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=66556ac74e1d1b6296c321755d5282a79706021a
[4/4] pmxcfs: dfsm: make sure error results are processed correctly
      https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=c62d105d156628fd206b575b03906786e4454928




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-17  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 16:01 [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Shannon Sterz
2026-11-16 16:01 ` [PATCH cluster 1/4] tree wide: update copyright notice to current year Shannon Sterz
2026-11-16 16:01 ` [PATCH cluster 2/4] fix #8325: pmxcfs: dfsm: abort send if dfsm is not joined via a handle Shannon Sterz
2026-11-16 16:01 ` [PATCH cluster 3/4] pmxcfs: dfsm: wake waiters in dfsm_send_message_sync() on error mode Shannon Sterz
2026-11-16 16:01 ` [PATCH cluster 4/4] pmxcfs: dfsm: make sure error results are processed correctly Shannon Sterz
2026-11-17  1:32 ` applied: [PATCH cluster 0/4] Fix 8325 and minor pmxcfs Clean-Up Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal