From 4440a4db2e3fdb5277c2ad283504ea3504b43ecf Mon Sep 17 00:00:00 2001 From: Jerome Marchand Date: Wed, 10 Jun 2020 10:28:42 +0200 Subject: [PATCH 1/3] deadlock: print a more explicit message when pthread_mutex_unlock can't be attached Most likely, this happen because of a missing --binary argument. Let's be friendly to our user and print a more useful messsage. --- tools/deadlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deadlock.py b/tools/deadlock.py index 17848720020a..81122adb7661 100755 --- a/tools/deadlock.py +++ b/tools/deadlock.py @@ -483,7 +483,7 @@ def main(): pid=args.pid, ) except Exception as e: - print('%s. Failed to attach to symbol: %s' % (str(e), symbol)) + print('%s. Failed to attach to symbol: %s\nIs --binary argument missing?' % (str(e), symbol)) sys.exit(1) for symbol in args.lock_symbols: try: From eddf9dd07a4c1d94aad70894f98df24bc0e4cbc2 Mon Sep 17 00:00:00 2001 From: Jerome Marchand Date: Wed, 10 Jun 2020 11:30:35 +0200 Subject: [PATCH 2/3] man: remove non-existent -x argument from tcpconnect man page There's no -x option in tcpconnect. I don't know how it get into the man page sysnopsis, but it doesn't belong there. --- man/man8/tcpconnect.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/tcpconnect.8 b/man/man8/tcpconnect.8 index bc2589ed60b6..36247241d944 100644 --- a/man/man8/tcpconnect.8 +++ b/man/man8/tcpconnect.8 @@ -2,7 +2,7 @@ .SH NAME tcpconnect \- Trace TCP active connections (connect()). Uses Linux eBPF/bcc. .SH SYNOPSIS -.B tcpconnect [\-h] [\-c] [\-t] [\-x] [\-p PID] [-P PORT] [\-\-cgroupmap MAPPATH] [\-\-mntnsmap MAPPATH] +.B tcpconnect [\-h] [\-c] [\-t] [\-p PID] [-P PORT] [\-\-cgroupmap MAPPATH] [\-\-mntnsmap MAPPATH] .SH DESCRIPTION This tool traces active TCP connections (eg, via a connect() syscall; accept() are passive connections). This can be useful for general From 7830947fad1e0a9e2c723e7cb800af9d7e5b8e77 Mon Sep 17 00:00:00 2001 From: Jerome Marchand Date: Wed, 10 Jun 2020 11:41:59 +0200 Subject: [PATCH 3/3] loader: suggest to install the right kernel devel package Unfortunately, some package dependency system do not allow to make sure that the kernel development package installed is the same version as the running kernel. When this happen, the loader, unable to find the kernel header, will suggest to rebuild the kernel with CONFIG_IKHEADERS. For most users, this is probably not an option, but installing the kernel development package corresponding to the running kernel version is. --- src/cc/frontends/clang/loader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/frontends/clang/loader.cc b/src/cc/frontends/clang/loader.cc index 50b24bcbbe93..5ec778ceb86f 100644 --- a/src/cc/frontends/clang/loader.cc +++ b/src/cc/frontends/clang/loader.cc @@ -151,7 +151,8 @@ int ClangLoader::parse(unique_ptr *mod, TableStorage &ts, kpath = tmpdir; } else { std::cout << "Unable to find kernel headers. "; - std::cout << "Try rebuilding kernel with CONFIG_IKHEADERS=m (module)\n"; + std::cout << "Try rebuilding kernel with CONFIG_IKHEADERS=m (module) "; + std::cout << "or installing the kernel development package for your running kernel version.\n"; } }