* [igt-dev] [PATCH i-g-t] lib/core: Use libdw to decode stack trace with debugging symbols
@ 2018-08-28 12:16 Maarten Lankhorst
2018-08-28 13:19 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2018-08-28 12:16 UTC (permalink / raw)
To: igt-dev
elfutils is LGPLv3 or GPLv2, so it's ok to link against it.
Before:
IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64)
Starting subtest: fail-result
(meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94:
(meta_test:29661) CRITICAL: Failed assertion: result == 1
(meta_test:29661) CRITICAL: error: 0 != 1
Stack trace:
#0 [__igt_fail_assert+0x20a]
#1 [test_result+0x7a]
#2 [__real_main120+0x240]
#3 [main+0x4a]
#4 (../csu/libc-start.c) __libc_start_main:344
#5 [_start+0x2a]
After:
IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64)
Starting subtest: fail-result
(meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94:
(meta_test:1357) CRITICAL: Failed assertion: result == 1
(meta_test:1357) CRITICAL: error: 0 != 1
Stack trace:
#0 (../lib/igt_core.c) __igt_fail_assert:1467
#1 (../tests/meta_test.c) test_result:95
#2 (../tests/meta_test.c) __real_main120:137
#3 (../tests/meta_test.c) main:120
#4 (../csu/libc-start.c) __libc_start_main:344
#5 [_start+0x2a]
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
configure.ac | 1 +
lib/Makefile.am | 2 ++
lib/igt_core.c | 50 ++++++++++++++++++++++++++++++++++++++++++++-----
lib/meson.build | 1 +
meson.build | 1 +
5 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 72f359943779..c75ef284f3bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,6 +128,7 @@ PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
PKG_CHECK_MODULES(KMOD, [libkmod])
PKG_CHECK_MODULES(PROCPS, [libprocps])
PKG_CHECK_MODULES(LIBUNWIND, [libunwind])
+PKG_CHECK_MODULES(LIBDW, [libdw])
PKG_CHECK_MODULES(SSL, [openssl])
PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 6251bdb85f67..388b8b00ae36 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -60,6 +60,7 @@ AM_CFLAGS = \
$(DRM_CFLAGS) \
$(PCIACCESS_CFLAGS) \
$(LIBUNWIND_CFLAGS) \
+ $(LIBDW_CFLAGS) \
$(GSL_CFLAGS) \
$(KMOD_CFLAGS) \
$(PROCPS_CFLAGS) \
@@ -86,6 +87,7 @@ libintel_tools_la_LIBADD = \
$(CAIRO_LIBS) \
$(LIBUDEV_LIBS) \
$(LIBUNWIND_LIBS) \
+ $(LIBDW_LIBS) \
$(TIMER_LIBS) \
$(XMLRPC_LIBS) \
$(LIBUDEV_LIBS) \
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 09c40af93ee1..b0a47449c7f7 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -73,6 +73,7 @@
#define UNW_LOCAL_ONLY
#include <libunwind.h>
+#include <elfutils/libdwfl.h>
#ifdef HAVE_LIBGEN_H
#include <libgen.h> /* for basename() on Solaris */
@@ -1212,20 +1213,59 @@ static void print_backtrace(void)
unw_context_t uc;
int stack_num = 0;
+ Dwfl_Callbacks cbs = {
+ .find_elf = dwfl_linux_proc_find_elf,
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ };
+
+ Dwfl *dwfl = dwfl_begin(&cbs);
+
+ if (dwfl_linux_proc_report(dwfl, getpid())) {
+ dwfl_end(dwfl);
+ dwfl = NULL;
+ } else
+ dwfl_report_end(dwfl, NULL, NULL);
+
igt_info("Stack trace:\n");
unw_getcontext(&uc);
unw_init_local(&cursor, &uc);
while (unw_step(&cursor) > 0) {
char name[255];
- unw_word_t off;
+ unw_word_t off, ip;
+ Dwfl_Module *mod = NULL;
- if (unw_get_proc_name(&cursor, name, 255, &off) < 0)
- strcpy(name, "<unknown>");
+ unw_get_reg(&cursor, UNW_REG_IP, &ip);
+
+ if (dwfl)
+ mod = dwfl_addrmodule(dwfl, ip);
- igt_info(" #%d [%s+0x%x]\n", stack_num++, name,
- (unsigned int) off);
+ if (mod) {
+ const char *src, *name;
+ Dwfl_Line *line;
+ int lineno;
+ GElf_Sym sym;
+
+ line = dwfl_module_getsrc(mod, ip);
+ name = dwfl_module_addrsym(mod, ip, &sym, NULL);
+
+ if (line && name) {
+ src = dwfl_lineinfo(line, NULL, &lineno, NULL, NULL, NULL);
+ igt_info(" #%d (%s) %s:%d\n", stack_num++, src, name, lineno);
+ continue;
+ }
+ }
+
+ if (unw_get_proc_name(&cursor, name, 255, &off) < 0)
+ igt_info(" #%d [<unknown>+0x%x]\n", stack_num++,
+ (unsigned int) ip);
+ else
+ igt_info(" #%d [%s+0x%x]\n", stack_num++, name,
+ (unsigned int) off);
}
+
+ if (dwfl)
+ dwfl_end(dwfl);
}
static const char hex[] = "0123456789abcdef";
diff --git a/lib/meson.build b/lib/meson.build
index 6b554c681579..e60e5e02f9d0 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -60,6 +60,7 @@ lib_deps = [
libprocps,
libudev,
libunwind,
+ libdw,
pciaccess,
pthreads,
math,
diff --git a/meson.build b/meson.build
index 7278c4383624..faf1b764d69d 100644
--- a/meson.build
+++ b/meson.build
@@ -103,6 +103,7 @@ pciaccess = dependency('pciaccess', version : '>=0.10')
libkmod = dependency('libkmod')
libprocps = dependency('libprocps', required : true)
libunwind = dependency('libunwind', required : true)
+libdw = dependency('libdw', required : true)
ssl = dependency('openssl', required : true)
valgrind = null_dep
--
2.18.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for lib/core: Use libdw to decode stack trace with debugging symbols
2018-08-28 12:16 [igt-dev] [PATCH i-g-t] lib/core: Use libdw to decode stack trace with debugging symbols Maarten Lankhorst
@ 2018-08-28 13:19 ` Patchwork
2018-08-28 13:25 ` Maarten Lankhorst
2018-08-29 7:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-08-30 8:01 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2018-08-28 13:19 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
== Series Details ==
Series: lib/core: Use libdw to decode stack trace with debugging symbols
URL : https://patchwork.freedesktop.org/series/48795/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
c40743d3fce5055682d31610519758dd7379c0f8 Make string commands dynamic allocate
The Meson build system
Version: 0.45.1
Source dir: /home/cidrm/igt-gpu-tools
Build dir: /home/cidrm/igt-gpu-tools/build
Build type: native build
Project name: igt-gpu-tools
Native C compiler: ccache cc (gcc 7.3.0 "cc (Ubuntu 7.3.0-16ubuntu3) 7.3.0")
Appending CPPFLAGS from environment: '-I/home/cidrm/kernel_headers/include'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Compiler for C supports argument -Wno-unused-parameter: YES
Compiler for C supports argument -Wno-sign-compare: YES
Compiler for C supports argument -Wno-missing-field-initializers: YES
Compiler for C supports argument -Wno-clobbered: YES
Compiler for C supports argument -Wno-type-limits: YES
Compiler for C supports argument -Wimplicit-fallthrough=0: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libdrm found: YES 2.4.94
Native dependency libdrm_intel found: YES 2.4.94
Native dependency libdrm_nouveau found: YES 2.4.91
Native dependency libdrm_amdgpu found: YES 2.4.91
Native dependency pciaccess found: YES 0.14
Native dependency libkmod found: YES 24
Native dependency libprocps found: YES 3.3.12
Native dependency libunwind found: YES 1.21
meson.build:106:0: ERROR: Native dependency 'libdw' not found
A full log can be found at /home/cidrm/igt-gpu-tools/build/meson-logs/meson-log.txt
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] ✗ Fi.CI.BAT: failure for lib/core: Use libdw to decode stack trace with debugging symbols
2018-08-28 13:19 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-08-28 13:25 ` Maarten Lankhorst
0 siblings, 0 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2018-08-28 13:25 UTC (permalink / raw)
To: igt-dev
Op 28-08-18 om 15:19 schreef Patchwork:
> == Series Details ==
>
> Series: lib/core: Use libdw to decode stack trace with debugging symbols
> URL : https://patchwork.freedesktop.org/series/48795/
> State : failure
>
> == Summary ==
>
> IGT patchset build failed on latest successful build
> c40743d3fce5055682d31610519758dd7379c0f8 Make string commands dynamic allocate
>
> The Meson build system
> Version: 0.45.1
> Source dir: /home/cidrm/igt-gpu-tools
> Build dir: /home/cidrm/igt-gpu-tools/build
> Build type: native build
> Project name: igt-gpu-tools
> Native C compiler: ccache cc (gcc 7.3.0 "cc (Ubuntu 7.3.0-16ubuntu3) 7.3.0")
> Appending CPPFLAGS from environment: '-I/home/cidrm/kernel_headers/include'
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
> Compiler for C supports argument -Wno-unused-parameter: YES
> Compiler for C supports argument -Wno-sign-compare: YES
> Compiler for C supports argument -Wno-missing-field-initializers: YES
> Compiler for C supports argument -Wno-clobbered: YES
> Compiler for C supports argument -Wno-type-limits: YES
> Compiler for C supports argument -Wimplicit-fallthrough=0: YES
> Found pkg-config: /usr/bin/pkg-config (0.29.1)
> Native dependency libdrm found: YES 2.4.94
> Native dependency libdrm_intel found: YES 2.4.94
> Native dependency libdrm_nouveau found: YES 2.4.91
> Native dependency libdrm_amdgpu found: YES 2.4.91
> Native dependency pciaccess found: YES 0.14
> Native dependency libkmod found: YES 24
> Native dependency libprocps found: YES 3.3.12
> Native dependency libunwind found: YES 1.21
>
> meson.build:106:0: ERROR: Native dependency 'libdw' not found
>
> A full log can be found at /home/cidrm/igt-gpu-tools/build/meson-logs/meson-log.txt
>
Can we install libdw-dev on the build system?
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for lib/core: Use libdw to decode stack trace with debugging symbols
2018-08-28 12:16 [igt-dev] [PATCH i-g-t] lib/core: Use libdw to decode stack trace with debugging symbols Maarten Lankhorst
2018-08-28 13:19 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-08-29 7:13 ` Patchwork
2018-08-30 8:01 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-29 7:13 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
== Series Details ==
Series: lib/core: Use libdw to decode stack trace with debugging symbols
URL : https://patchwork.freedesktop.org/series/48795/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4715 -> IGTPW_1750 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48795/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1750:
=== IGT changes ===
==== Possible regressions ====
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
{fi-bdw-samus}: PASS -> DMESG-WARN
== Known issues ==
Here are the changes found in IGTPW_1750 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
== Participating hosts (53 -> 48) ==
Additional (1): fi-bxt-dsi
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* IGT: IGT_4610 -> IGTPW_1750
CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1750: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1750/
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1750/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for lib/core: Use libdw to decode stack trace with debugging symbols
2018-08-28 12:16 [igt-dev] [PATCH i-g-t] lib/core: Use libdw to decode stack trace with debugging symbols Maarten Lankhorst
2018-08-28 13:19 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-08-29 7:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-30 8:01 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-30 8:01 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: igt-dev
== Series Details ==
Series: lib/core: Use libdw to decode stack trace with debugging symbols
URL : https://patchwork.freedesktop.org/series/48795/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4610_full -> IGTPW_1750_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1750_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1750_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48795/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1750_full:
=== IGT changes ===
==== Warnings ====
igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-untiled:
shard-snb: SKIP -> PASS
igt@pm_rc6_residency@rc6-accuracy:
shard-kbl: PASS -> SKIP
== Known issues ==
Here are the changes found in IGTPW_1750_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_available_modes_crc@available_mode_test_crc:
shard-snb: PASS -> FAIL (fdo#106641)
igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_plane_lowres@pipe-a-tiling-y:
shard-glk: PASS -> FAIL (fdo#103166)
igt@kms_setmode@basic:
shard-glk: NOTRUN -> FAIL (fdo#99912)
shard-kbl: PASS -> FAIL (fdo#99912)
igt@kms_vblank@pipe-a-ts-continuation-suspend:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#107556)
igt@prime_busy@hang-bsd2:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@gem_ctx_isolation@vcs0-s3:
shard-kbl: INCOMPLETE (fdo#103665, fdo#107556) -> PASS
igt@gem_ctx_isolation@vcs1-none:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-snb: FAIL (fdo#103166) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4610 -> IGTPW_1750
* Linux: CI_DRM_4706 -> CI_DRM_4715
CI_DRM_4706: 6d5687919f3a3426243041b99111b576dd0576d0 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1750: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1750/
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1750/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-30 8:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 12:16 [igt-dev] [PATCH i-g-t] lib/core: Use libdw to decode stack trace with debugging symbols Maarten Lankhorst
2018-08-28 13:19 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-08-28 13:25 ` Maarten Lankhorst
2018-08-29 7:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-08-30 8:01 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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.