From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Hillf Danton <hdanton@sina.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Tejun Heo <tj@kernel.org>
Subject: Re: BUG: MAX_LOCKDEP_KEYS too low!
Date: Sat, 23 Jan 2021 22:26:28 +1100 [thread overview]
Message-ID: <dc1e9f3a-b40f-8db3-bce3-07c3c12af8ea@ozlabs.ru> (raw)
In-Reply-To: <0bfad7f4-550a-0645-d24b-940e399e9c2c@i-love.sakura.ne.jp>
On 23/01/2021 21:29, Tetsuo Handa wrote:
> On 2021/01/23 15:35, Alexey Kardashevskiy wrote:
>> this behaves quite different but still produces the message (i have show_workqueue_state() right after the bug message):
>>
>>
>> [ 85.803991] BUG: MAX_LOCKDEP_KEYS too low!
>> [ 85.804338] turning off the locking correctness validator.
>> [ 85.804474] Showing busy workqueues and worker pools:
>> [ 85.804620] workqueue events_unbound: flags=0x2
>> [ 85.804764] pwq 16: cpus=0-7 flags=0x4 nice=0 active=1/512 refcnt=3
>> [ 85.804965] in-flight: 81:bpf_map_free_deferred
>> [ 85.805229] workqueue events_power_efficient: flags=0x80
>> [ 85.805357] pwq 4: cpus=2 node=0 flags=0x0 nice=0 active=1/256 refcnt=2
>> [ 85.805558] in-flight: 57:gc_worker
>> [ 85.805877] pool 4: cpus=2 node=0 flags=0x0 nice=0 hung=0s workers=3 idle: 82 24
>> [ 85.806147] pool 16: cpus=0-7 flags=0x4 nice=0 hung=69s workers=3 idle: 7 251
>> ^C[ 100.129747] maxlockdep (5104) used greatest stack depth: 8032 bytes left
>>
>> root@le-dbg:~# grep "lock-classes" /proc/lockdep_stats
>> lock-classes: 8192 [max: 8192]
>>
>
> Right. Hillf's patch can reduce number of active workqueue's worker threads, for
> only one worker thread can call bpf_map_free_deferred() (which is nice because
> it avoids bloat of active= and refcnt= fields). But Hillf's patch is not for
> fixing the cause of "BUG: MAX_LOCKDEP_KEYS too low!" message.
>
> Like Dmitry mentioned, bpf syscall allows producing work items faster than
> bpf_map_free_deferred() can consume. (And a similar problem is observed for
> network namespaces.) Unless there is a bug that prevents bpf_map_free_deferred()
> from completing, the classical solution is to put pressure on producers (i.e.
> slow down bpf syscall side) in a way that consumers (i.e. __bpf_map_put())
> will not schedule thousands of backlog "struct bpf_map" works.
Should not the first 8192 from "grep lock-classes /proc/lockdep_stats"
decrease after time (it does not), or once it has failed, it is permanent?
--
Alexey
next prev parent reply other threads:[~2021-01-23 11:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 3:43 Alexey Kardashevskiy
2021-01-22 9:16 ` Dmitry Vyukov
[not found] ` <6af41136-4344-73da-f821-e831674be473@i-love.sakura.ne.jp>
[not found] ` <70d427e8-7281-0aae-c524-813d73eca2d7@ozlabs.ru>
[not found] ` <CACT4Y+bqidtwh1HUFFoyyKyVy0jnwrzhVBgqmU+T9sN1yPMO=g@mail.gmail.com>
[not found] ` <eb71cc37-afbd-5446-6305-8c7abcc6e91f@i-love.sakura.ne.jp>
[not found] ` <6eaafbd8-1c10-75df-75ae-9afa0861f69b@i-love.sakura.ne.jp>
2021-01-22 22:53 ` Alexey Kardashevskiy
2021-01-23 0:39 ` BPF: unbounded bpf_map_free_deferred problem Tetsuo Handa
2021-01-23 3:27 ` Cong Wang
[not found] ` <cf17e6c4-76c7-52b9-39d5-c14946070fc4@i-love.sakura.ne.jp>
[not found] ` <c1aecd4e-8db7-87a5-94bf-c630f1cf0866@ozlabs.ru>
2021-01-25 0:52 ` Tetsuo Handa
[not found] ` <20210123060145.18356-1-hdanton@sina.com>
2021-01-23 6:35 ` BUG: MAX_LOCKDEP_KEYS too low! Alexey Kardashevskiy
2021-01-23 10:29 ` Tetsuo Handa
2021-01-23 11:26 ` Alexey Kardashevskiy [this message]
2021-01-23 13:12 ` Tetsuo Handa
-- strict thread matches above, loose matches on Subject: below --
2019-10-27 3:31 syzbot
2019-10-29 2:13 ` syzbot
2019-10-29 14:09 ` syzbot
2019-10-29 14:09 ` syzbot
2019-11-01 15:08 ` syzbot
2019-11-01 15:08 ` syzbot
2020-12-09 8:01 ` Dmitry Vyukov
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=dc1e9f3a-b40f-8db3-bce3-07c3c12af8ea@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=dvyukov@google.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=tj@kernel.org \
--subject='Re: BUG: MAX_LOCKDEP_KEYS too low'\!'' \
/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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.