Skip to content

Commit 835fbe5

Browse files
keszybzbluca
authored andcommitted
bus-unit-util: extend the bus call timeout for UnitFreezer
Follow-up for 1d617b3. Should fix systemd/systemd#33269. From the logs in the bug: Jun 10 22:55:37 systemd-logind[909]: The system will suspend now! Jun 10 22:55:37 ModemManager[996]: <msg> [sleep-monitor-systemd] system is about to suspend ... Jun 10 22:55:48 systemd-sleep[422408]: Failed to freeze unit 'user.slice': Connection timed out Jun 10 22:55:48 systemd-sleep[422408]: Performing sleep operation 'suspend'... The delay is ~11 s, consistent with the patch that set the timeout to 10 s. Looks like this is not enough. It's the freeze operation that fails, but thawing might be slow too, so just bump the timeout again.
1 parent 7efaab4 commit 835fbe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shared/bus-unit-util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,8 +2945,8 @@ typedef struct UnitFreezer {
29452945
sd_bus *bus;
29462946
} UnitFreezer;
29472947

2948-
/* Wait for 10 seconds at maximum for freezer operation */
2949-
#define FREEZE_BUS_CALL_TIMEOUT (10 * USEC_PER_SEC)
2948+
/* Wait for 60 seconds at maximum for freezer operation */
2949+
#define FREEZE_BUS_CALL_TIMEOUT (60 * USEC_PER_SEC)
29502950

29512951
UnitFreezer* unit_freezer_free(UnitFreezer *f) {
29522952
if (!f)

0 commit comments

Comments
 (0)