Skip to content
Verified Commit bf9c0d99 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix deadlock when KConfigIni fails to acquire a file lock

KConfigIniBackend::lock() locks a mutex, then attempts to acquire a lock
file and returns whether acquiring the lock file was successful.
However, if acquiring the lock file failed (e.g. due to a full disk), it
would not unlock the mutex but would still return false, indicating a
failure to acquire the lock to the caller. Thus, any subsequent call to
KConfigIniBackend::lock() would deadlock on the locked mutex.

I was able to reliably reproduce this by running out of disk space and
running any application (e.g. Plasma) that attempted to invoke
KConfig::sync() multiple times.
parent ba37f5b6
Pipeline #463565 passed with stage
in 2 minutes and 53 seconds
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