Summary: | Threading-related crash in Gwenview in file KIO worker | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Kai Uwe Broulik <kde> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | faure, kdelibs-bugs |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/215c03d98fb7f47cdc673178cedb9a50589767c7 | Version Fixed In: | |
Sentry Crash Report: |
Description
Kai Uwe Broulik
2022-05-30 17:01:35 UTC
https://invent.kde.org/frameworks/kio/-/merge_requests/861 https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/231 Git commit 215c03d98fb7f47cdc673178cedb9a50589767c7 by David Faure. Committed on 03/06/2022 at 19:48. Pushed by dfaure into branch 'master'. kio_file: fix data race on static user cache Now that the kio_file code runs in threads, static data leads to data races and should be thread_local instead. Reproduced the issue by running the new test ./jobtest multipleListRecursive in a TSAN build, after adding QThread::msleep(50) in WorkerThread::run. Running this test alone will actually fail the test in any case, but that doesn't matter, TSAN tells us about the data race. Even with this fix, it still shouts about KUser not being threadsafe, I'll fix this in KCoreAddons separately. M +47 -13 autotests/jobtest.cpp M +1 -0 autotests/jobtest.h M +2 -3 src/ioslaves/file/file_unix.cpp https://invent.kde.org/frameworks/kio/commit/215c03d98fb7f47cdc673178cedb9a50589767c7 |