Commit df2cc926 authored by Harald Sitter's avatar Harald Sitter
Browse files

substantially bump the helper timeout

its running time entirely depends on how fast the initrds are
to generate and how many there are. 60 seconds may not be nearly
enough.

BUG: 400641


(cherry picked from commit 2072c976)
parent 69e327a0
Pipeline #154078 passed with stage
in 35 seconds
/*
* SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
* SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org>
* SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
* SPDX-FileCopyrightText: 1998 Luca Montecchiani <m.luca@usa.net>
*
......@@ -159,7 +159,10 @@ ActionReply PlymouthHelper::save(const QVariantMap &args)
reply.setErrorDescription(i18n("Cannot start initramfs."));
return reply;
}
if (!process.waitForFinished(std::chrono::milliseconds(1min).count())) {
// We don't know how long this will take. The helper will need to generate N=installed_kernels initrds.
// Be very generous with the timeout! https://bugs.kde.org/show_bug.cgi?id=400641
// NB: there is also a timeout in the KCM
if (!process.waitForFinished(std::chrono::milliseconds(15min).count())) {
reply = ActionReply::BackendError;
reply.setErrorDescription(i18n("Initramfs failed to run."));
return reply;
......
/*
* SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org>
* SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in>
* SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
......@@ -9,6 +10,8 @@
#include "kcm.h"
#include "config-kcm.h"
#include <chrono>
#include <KAboutData>
#include <KConfigGroup>
#include <KPluginFactory>
......@@ -33,6 +36,8 @@
#include <KIO/CopyJob>
#include <kio/job.h>
using namespace std::chrono_literals;
K_PLUGIN_FACTORY_WITH_JSON(KCMPlymouthFactory, "kcm_plymouth.json", registerPlugin<KCMPlymouth>();)
KCMPlymouth::KCMPlymouth(QObject *parent, const QVariantList &args)
......@@ -194,7 +199,10 @@ void KCMPlymouth::save()
KAuth::Action action(authActionName());
action.setHelperId(QStringLiteral("org.kde.kcontrol.kcmplymouth"));
action.setArguments(helperargs);
action.setTimeout(60000);
// We don't know how long this will take. The helper will need to generate N=installed_kernels initrds.
// Be very generous with the timeout! https://bugs.kde.org/show_bug.cgi?id=400641
// NB: there is also a timeout in the helper
action.setTimeout(std::chrono::milliseconds(15min).count());
KAuth::ExecuteJob *job = action.execute();
bool rc = job->exec();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment