From ef2c8f563b025463e1822105f397e097b9f36a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Fri, 10 Jul 2020 15:08:13 +0300 Subject: [PATCH] scylla-gdb.py: scylla fiber: add suggestion for further investigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scylla fiber often fails to really unwind the entire fiber, stopping sooner than expected. This is expected as scylla fiber only recognizes the most standard continuations but can drop the ball as soon as there is an unusual transmission. This commits adds a message below the found tasks explaining that the list might not be exhaustive and prints a command which can be used to explain why the unwinding stopped at the last task. While at it also rephrase an out-of-date comment. Signed-off-by: Botond Dénes Message-Id: <20200710120813.100009-1-bdenes@scylladb.com> --- scylla-gdb.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scylla-gdb.py b/scylla-gdb.py index e27547898a..44c93ca422 100644 --- a/scylla-gdb.py +++ b/scylla-gdb.py @@ -2571,8 +2571,8 @@ class scylla_fiber(gdb.Command): The pattern we are looking for is: ptr -> vtable ptr for a symbol that matches our whitelist - In addition, ptr has to point to a the beginning of an allocation - block, managed by seastar, that contains a live object. + In addition, ptr has to point to an allocation block, managed by + seastar, that contains a live object. """ try: maybe_vptr = int(gdb.Value(ptr).reinterpret_cast(self._vptr_type).dereference()) @@ -2677,13 +2677,20 @@ class scylla_fiber(gdb.Command): return try: - this_task, fiber = self._walk(int(gdb.parse_and_eval(args.task)), args.max_depth, args.scanned_region_size, args.force_fallback_mode, args.verbose) + initial_task_ptr = int(gdb.parse_and_eval(args.task)) + this_task, fiber = self._walk(initial_task_ptr, args.max_depth, args.scanned_region_size, args.force_fallback_mode, args.verbose) tptr, vptr, name = this_task gdb.write("Starting task: (task*) 0x{:016x} 0x{:016x} {}\n".format(tptr.ptr, int(vptr), name)) for i, (tptr, vptr, name) in enumerate(fiber): gdb.write("#{:<2d} (task*) 0x{:016x} 0x{:016x} {}\n".format(i, int(tptr), int(vptr), name)) + + gdb.write("\nFound no further pointers to task objects.\n") + if not fiber: + gdb.write("If this is unexpected, run `scylla fiber 0x{:016x} --verbose` to learn more.\n".format(initial_task_ptr)) + else: + gdb.write("If you think there should be more, run `scylla fiber 0x{:016x} --verbose` to learn more.\n".format(fiber[-1][0])) except KeyboardInterrupt: return