From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/30831] Systemtap scripts fail to compile on newest linux 6.6 kernels
Date: Fri, 08 Sep 2023 02:49:18 +0000 [thread overview]
Message-ID: <bug-30831-6586-dXtC1fud2J@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30831-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=30831
--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
A bit more data. The reproducer works with Fedora Rawhide
kernel-6.5.0-57.fc40.x86_64. The failure happens with the later 6.6 kernels.
There are two issues going on:
-problem with the type used for the ibt_wrapper for task_work_add.
-use of flush_scheduled_work() is frowned upon because of possible deadlock
issues.
git commit c4f135d643823a869becfa87539f7820ef9d5bfa has details on the issues:
Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> 2022-06-01 03:32:47
Committer: Tejun Heo <tj@kernel.org> 2022-06-07 13:07:14
Parent: e71e60cd74df9386c3f684c54888f2367050b831 (Merge tag
'dma-mapping-5.19-2022-06-06' of git://git.infradead.org/users/hch/dma-mapping)
Child: 873a400938b31a1e443c4d94b560b78300787540 (workqueue: Fix type of cpu in
trace event)
Branches: master, remotes/origin/master, remotes/origin/mmu_gather-race-fix,
remotes/origin/x86-rep-insns, remotes/origin/x86-uaccess-cleanup
Follows: v5.19-rc1
Precedes: v5.19-rc2
workqueue: Wrap flush_workqueue() using a macro
Since flush operation synchronously waits for completion, flushing
system-wide WQs (e.g. system_wq) might introduce possibility of deadlock
due to unexpected locking dependency. Tejun Heo commented at [1] that it
makes no sense at all to call flush_workqueue() on the shared WQs as the
caller has no idea what it's gonna end up waiting for.
Although there is flush_scheduled_work() which flushes system_wq WQ with
"Think twice before calling this function! It's very easy to get into
trouble if you don't take great care." warning message, syzbot found a
circular locking dependency caused by flushing system_wq WQ [2].
Therefore, let's change the direction to that developers had better use
their local WQs if flush_scheduled_work()/flush_workqueue(system_*_wq) is
inevitable.
Steps for converting system-wide WQs into local WQs are explained at [3],
and a conversion to stop flushing system-wide WQs is in progress. Now we
want some mechanism for preventing developers who are not aware of this
conversion from again start flushing system-wide WQs.
Since I found that WARN_ON() is complete but awkward approach for teaching
developers about this problem, let's use __compiletime_warning() for
incomplete but handy approach. For completeness, we will also insert
WARN_ON() into __flush_workqueue() after all in-tree users stopped calling
flush_scheduled_work().
Link: https://lore.kernel.org/all/YgnQGZWT%2Fn3VAITX@slm.duckdns.org/ [1]
Link: https://syzkaller.appspot.com/bug?extid=bde0f89deacca7c765b8 [2]
Link:
https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp
[3]
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Tejun Heo <tj@kernel.org>
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2023-09-08 2:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 17:46 [Bug runtime/30831] New: The do_each_thread macro has been removed from " wcohen at redhat dot com
2023-09-07 19:23 ` [Bug runtime/30831] Systemtap scripts fail to compile on " wcohen at redhat dot com
2023-09-08 2:49 ` wcohen at redhat dot com [this message]
2023-09-18 13:46 ` wcohen at redhat dot com
2023-09-18 13:51 ` wcohen at redhat dot com
2023-09-27 14:24 ` wcohen at redhat dot com
2023-09-27 20:03 ` wcohen at redhat dot com
2023-11-23 15:16 ` Tetsuo Handa
2023-12-13 14:47 ` William Cohen
2023-12-17 10:41 ` Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-30831-6586-dXtC1fud2J@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).