lkml.org 
[lkml]   [2021]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] binder: tell userspace to dump current backtrace when detected oneway spamming
On Fri, Apr 09, 2021 at 11:40:57AM +0800, Hang Lu wrote:
> When async binder buffer got exhausted, some normal oneway transactions
> will also be discarded and may cause system or application failures. By
> that time, the binder debug information we dump may not be relevant to
> the root cause. And this issue is difficult to debug if without the
> backtrace of the thread sending spam.
>
> This change will send BR_ONEWAY_SPAM_SUSPECT to userspace when oneway
> spamming is detected, request to dump current backtrace. Oneway spamming
> will be reported only once when exceeding the threshold (target process
> dips below 80% of its oneway space, and current process is responsible for
> either more than 50 transactions, or more than 50% of the oneway space).
> And the detection will restart when the async buffer has returned to a
> healthy state.
>
> Signed-off-by: Hang Lu <hangl@codeaurora.org>
> ---
> v4: add missing BR_FROZEN_REPLY in binder_return_strings and change the size of binder_stats.br array

Should the BR_FROZEN_REPLY string be a separate patch as it's a fix for
the "binder frozen feature", not this new feature, right? Or does this
patch require that change and the frozen patch did not?

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-04-09 08:09    [W:0.094 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site