From: Bart Van Assche <bvanassche@acm.org>
To: Eric Dumazet <eric.dumazet@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org,
syzbot <syzbot+6f39a9deb697359fe520@syzkaller.appspotmail.com>,
syzkaller-bugs@googlegroups.com
Subject: Re: BUG: MAX_STACK_TRACE_ENTRIES too low! (2)
Date: Wed, 10 Jul 2019 14:23:39 -0700 [thread overview]
Message-ID: <9219c421-0868-f97f-2d84-df48aed9f8a8@acm.org> (raw)
In-Reply-To: <ee3bac8d-d061-7d07-5990-59871e7e2a4b@gmail.com>
On 7/10/19 1:47 PM, Eric Dumazet wrote:
>
>
> On 7/10/19 9:09 PM, Bart Van Assche wrote:
>> On 7/10/19 11:44 AM, Eric Dumazet wrote:
>>> If anything using workqueues in dynamically allocated objects can turn off lockdep,
>>> we have a serious issue.
>>
>> As far as I know that issue is only hit by syzbot tests.
>
>
>
>> Anyway, I see
>> two possible paths forward:
>> * Revert the patch that makes workqueues use dynamic lockdep keys and
>> thereby reintroduce the false positives that lockdep reports if
>> different workqueues share a lockdep key. I think there is agreement
>> that having to analyze lockdep false positives is annoying, time
>> consuming and something nobody likes.
>> * Modify lockdep such that space in its fixed size arrays that is no
>> longer in use gets reused. Since the stack traces saved in the
>> stack_trace[] array have a variable size that array will have to be
>> compacted to avoid fragmentation.
>>
>
> Can not destroy_workqueue() undo what alloc_workqueue() did ?
destroy_workqueue() already calls lockdep_unregister_key(). If that
wouldn't happen then sooner or later one of the warning statements in
the lockdep code would be triggered, e.g. the WARN_ON_ONCE() statement
in lockdep_register_key(). I think the root cause is that
lockdep_unregister_key() does not free the stack traces recorded by the
lockdep save_trace() function. save_trace() is called every time a lock
is acquired and lockdep encounters a new lock dependency chain.
As one can see in remove_class_from_lock_chain() there is already code
present in lockdep for compacting the chain_hlocks[] array. Similar code
is not yet available for the stack_trace[] array because I had not
encountered any overflows of that array during my tests.
Bart.
next prev parent reply other threads:[~2019-07-10 21:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 10:42 syzbot
2019-03-30 11:10 ` syzbot
2019-03-30 21:58 ` syzbot
2019-03-31 2:17 ` Bart Van Assche
2019-07-10 5:30 ` Eric Biggers
2019-07-10 14:19 ` Bart Van Assche
2019-07-10 17:00 ` Eric Biggers
2019-07-10 17:21 ` Eric Biggers
2019-07-10 17:46 ` Bart Van Assche
2019-07-10 18:02 ` Eric Biggers
2019-07-10 18:36 ` Bart Van Assche
2019-07-10 18:44 ` Eric Dumazet
2019-07-10 19:09 ` Bart Van Assche
2019-07-10 20:47 ` Eric Dumazet
2019-07-10 21:23 ` Bart Van Assche [this message]
2019-07-10 22:09 ` Peter Zijlstra
2019-07-11 18:53 ` Bart Van Assche
2019-07-12 8:55 ` Peter Zijlstra
2019-07-12 23:03 ` Bart Van Assche
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=9219c421-0868-f97f-2d84-df48aed9f8a8@acm.org \
--to=bvanassche@acm.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=syzbot+6f39a9deb697359fe520@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=will@kernel.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
all inboxes | Powered by JetHome®