All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Christian Brauner" <brauner@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>
Cc: Joel Fernandes <joel@joelfernandes.org>,
	Hridya Valsaraju <hridya@google.com>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Li Li <dualli@google.com>, Masahiro Yamada <masahiroy@kernel.org>,
	Carlos Llamas <cmllamas@google.com>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v2 1/5] binder: add failed transaction logging info
Date: Fri, 29 Apr 2022 23:56:40 +0000	[thread overview]
Message-ID: <20220429235644.697372-2-cmllamas@google.com> (raw)
In-Reply-To: <20220429235644.697372-1-cmllamas@google.com>

Make sure we log relevant information about failed transactions such as
the target proc/thread, call type and transaction id. These details are
particularly important when debugging userspace issues.

Signed-off-by: Carlos Llamas <cmllamas@google.com>
---
 drivers/android/binder.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 8351c5638880..f0885baa53a1 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3459,8 +3459,12 @@ static void binder_transaction(struct binder_proc *proc,
 	}
 
 	binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-		     "%d:%d transaction failed %d/%d, size %lld-%lld line %d\n",
-		     proc->pid, thread->pid, return_error, return_error_param,
+		     "%d:%d transaction %s to %d:%d failed %d/%d/%d, size %lld-%lld line %d\n",
+		     proc->pid, thread->pid, reply ? "reply" :
+		     (tr->flags & TF_ONE_WAY ? "async" : "call"),
+		     target_proc ? target_proc->pid : 0,
+		     target_thread ? target_thread->pid : 0,
+		     t_debug_id, return_error, return_error_param,
 		     (u64)tr->data_size, (u64)tr->offsets_size,
 		     return_error_line);
 
-- 
2.36.0.464.gb9c8b46e94-goog


  reply	other threads:[~2022-04-29 23:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 23:56 [PATCH v2 0/5] binder: extended error and logging enhancements Carlos Llamas
2022-04-29 23:56 ` Carlos Llamas [this message]
2022-05-02 15:25   ` [PATCH v2 1/5] binder: add failed transaction logging info Todd Kjos
2022-05-09 10:06   ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 2/5] binder: add BINDER_GET_EXTENDED_ERROR ioctl Carlos Llamas
2022-05-02 15:27   ` Todd Kjos
2022-05-09 10:13   ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 3/5] binderfs: add extended_error feature entry Carlos Llamas
2022-05-06 22:05   ` Todd Kjos
2022-05-09 10:03   ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 4/5] binder: convert logging macros into functions Carlos Llamas
2022-05-02 15:28   ` Todd Kjos
2022-05-09 10:04   ` Christian Brauner
2022-04-29 23:56 ` [PATCH v2 5/5] binder: additional transaction error logs Carlos Llamas
2022-05-02 15:29   ` Todd Kjos
2022-05-09 10:06   ` Christian Brauner

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=20220429235644.697372-2-cmllamas@google.com \
    --to=cmllamas@google.com \
    --cc=arnd@arndb.de \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=dualli@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maco@android.com \
    --cc=masahiroy@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /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 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.