Gentoo Archives: gentoo-user

From: Fernando Rodriguez <frodriguez.developer@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] SystemTap failing on basic check
Date: Mon, 21 Sep 2015 07:15:09
Message-Id: BLU436-SMTP1927A8AA2304A623C4798A78D460@phx.gbl
In Reply to: [gentoo-user] SystemTap failing on basic check by "Lukáš Oliva"
1 On Monday, September 21, 2015 7:15:59 AM Lukáš Oliva wrote:
2 > Hi,
3 > I am trying SystemTap - a tool for dynamic tracing on Gentoo and I have
4 > some troubles to make it working. I followed the guide on
5 >
6 > https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel
7 >
8 > and built the kernel with required options:
9 >
10 > zgrep -E
11 > 'CONFIG_DEBUG_INFO|CONFIG_KPROBES|CONFIG_RELAY|CONFIG_DEBUG_FS|
12 CONFIG_MODULES|CONFIG_MODULE_UNLOAD|CONFIG_UPROBES|CONFIG_DEBUG_INFO'
13 > /proc/config.gz
14 > CONFIG_RELAY=y
15 > CONFIG_KPROBES=y
16 > CONFIG_UPROBES=y
17 > CONFIG_MODULES_USE_ELF_RELA=y
18 > CONFIG_MODULES=y
19 > CONFIG_MODULE_UNLOAD=y
20 > CONFIG_DEBUG_INFO=y
21 > # CONFIG_DEBUG_INFO_REDUCED is not set
22 > # CONFIG_DEBUG_INFO_SPLIT is not set
23 > CONFIG_DEBUG_INFO_DWARF4=y
24 > CONFIG_DEBUG_FS=y
25 > # CONFIG_KPROBES_SANITY_TEST is not set
26 >
27 > But even the simplest check fails on:
28 >
29 > stap -r /usr/src/linux -v -e 'probe vfs.read {printf("read performed\n");
30 > exit()}'
31 > Pass 1: parsed user script and 122 library script(s) using
32 > 214692virt/125980res/5604shr/122476data kb, in 450usr/20sys/464real ms.
33 > Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s)
34 > using 347656virt/260520res/6984shr/255440data kb, in
35 > 1210usr/250sys/1462real ms.
36 > Pass 3: translated to C into
37 > "/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c" using
38 > 347656virt/260772res/7236shr/255440data kb, in 0usr/0sys/4real ms.
39 > In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
40 > from /usr/share/systemtap/runtime/linux/runtime.h:206,
41 > from /usr/share/systemtap/runtime/runtime.h:24,
42 > from
43 > /tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c:24:
44 > /usr/share/systemtap/runtime/linux/task_finder2.c: In function
45 > '__stp_call_mmap_callbacks_with_addr':
46 > /usr/share/systemtap/runtime/linux/task_finder2.c:695:24: error: 'struct
47 > file' has no member named 'f_dentry'
48 > dentry = vma->vm_file->f_dentry;
49 > ^
50 > /usr/share/systemtap/runtime/linux/task_finder2.c: In function
51 > '__stp_call_mmap_callbacks_for_task':
52 > /usr/share/systemtap/runtime/linux/task_finder2.c:1198:42: error: 'struct
53 > file' has no member named 'f_dentry'
54 > vma_cache_p->dentry = vma->vm_file->f_dentry;
55 > ^
56 > scripts/Makefile.build:258: recipe for target
57 > '/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o' failed
58 > make[1]: ***
59 > [/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o] Error 1
60 > Makefile:1390: recipe for target '_module_/tmp/stap2nY7sY' failed
61 > make: *** [_module_/tmp/stap2nY7sY] Error 2
62 > WARNING: kbuild exited with status: 2
63 > Pass 4: compiled C into "stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259.ko" in
64 > 3230usr/260sys/4290real ms.
65 > Pass 4: compilation failed. [man error::pass4]
66 >
67 > I am wondering now - is there anything wrong with my aproach? Does anyone
68 > succesfully use SystemTap on Gentoo? And if so, could you help me to make
69 > this running?
70 >
71 > Lukas
72
73 It is outdated. It's trying to build a module that was written for an old
74 kernel. I remember that change because it broke some module for me, I think it
75 was on kernel 3.12.x or 3.14.x
76
77 --
78 Fernando Rodriguez