This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Option -k broken
- From: Torsten Polle <Torsten dot Polle at gmx dot de>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Sun, 26 Nov 2017 22:26:13 +0100
- Subject: Re: Option -k broken
- Authentication-results: sourceware.org; auth=none
- References: <8E530B69-917A-450C-A74A-6A94D0511F16@gmx.de> <87d147wddt.fsf@redhat.com>
Hi Frank,
> Am 24.11.2017 um 22:55 schrieb Frank Ch. Eigler <fche@redhat.com>:
>
>
> Hi, Torsten -
>
>> I experienced a problem with the -k option of the stap command.
>> [...]
>> I checked the operation of stap with strace. It seems that the include
>> file <module>_src.i is passed to the kernel build script again and
>> again without having been created.
>
> Works OK here. :-)
> Can you say more about the kernel version / environment you're using?
> Try:
>
> % stap --vp 0002 -k -e 'probe begin {}' -p4
>
> - FChE
Works for me as well. Therefore I stripped my script down to the bare minimum. It does not make much sense now. Still I can reproduce the error.
stap --vp 0402 -k -e 'probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }' -p4
Regards,
Torsten
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/home/polle/bin:/home/polle/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin make -C /lib/modules/4.4.0-101-generic/build M=/tmp/stapd60AIJ/typequery_kmod_1 modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=x86_64 stap_5933_src.i V=1 -j3
make: Entering directory '/usr/src/linux-headers-4.4.0-101-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /tmp/stapd60AIJ/typequery_kmod_1/.tmp_versions ; rm -f /tmp/stapd60AIJ/typequery_kmod_1/.tmp_versions/*
make: *** No rule to make target 'stap_5933_src.i'. Stop.
make: *** Waiting for unfinished jobs....
make: Leaving directory '/usr/src/linux-headers-4.4.0-101-generic'
Spawn waitpid result (0x200): 2
WARNING: kbuild exited with status: 2
blacklist regexps:
blfn: ^(atomic_notifier_call_chain|default_do_nmi|__die|die_nmi|do_debug|do_general_protection|do_int3|do_IRQ|do_page_fault|do_sparc64_fault|do_trap|dummy_nmi_callback|flush_icache_range|ia64_bad_break|ia64_do_page_fault|ia64_fault|io_check_error|mem_parity_error|nmi_watchdog_tick|notifier_call_chain|oops_begin|oops_end|program_check_exception|single_step_exception|sync_regs|unhandled_fault|unknown_nmi_error|xen_[gs]et_debugreg|xen_irq_.*|xen_.*_fl_direct.*|check_events|xen_adjust_exception_frame|xen_iret.*|xen_sysret64.*|test_ti_thread_flag.*|inat_get_opcode_attribute|system_call_after_swapgs|HYPERVISOR_[gs]et_debugreg|HYPERVISOR_event_channel_op|hash_64|hash_ptr|native_set_pte|.*raw_.*_lock.*|.*raw_.*_unlock.*|.*raw_.*_trylock.*|.*read_lock.*|.*read_unlock.*|.*read_trylock.*|.*write_lock.*|.*write_unlock.*|.*write_trylock.*|.*write_seqlock.*|.*write_sequnlock.*|.*spin_lock.*|.*spin_unlock.*|.*spin_trylock.*|.*spin_is_locked.*|rwsem_.*lock.*|.*mutex_.*lock.*|atomic_.*|atomic64_.*|get_bh|put_bh|.*apic.*|.*APIC.*|.*softirq.*|.*IRQ.*|.*_intr.*|__delay|.*kernel_text.*|get_current|current_.*|.*exception_tables.*|.*setup_rt_frame.*|.*preempt_count.*|preempt_schedule|__switch_to|special_mapping_.*|.*_pte_.*)$
blfn_ret: ^(do_exit|sys_exit|sys_exit_group)$
blfile: ^(kernel/kprobes\.c|arch/.*/kernel/kprobes\.c|.*/include/asm/io\.h|.*/include/asm/io-defs\.h|.*/include/asm/io_64\.h|.*/include/asm/bitops\.h|drivers/ide/ide-iops\.c|arch/.*/kernel/paravirt\.c|.*/include/asm/paravirt\.h|fs/seq_file\.c)$
blsection: ^(\.init\.|\.exit\.|\.devinit\.|\.devexit\.|\.cpuinit\.|\.cpuexit\.|\.meminit\.|\.memexit\.)
WARNING: Eliding assignment to 'off_task': operator '=' at <input>:1:26
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
WARNING: Eliding side-effect-free expression : identifier 'off_task' at :1:15
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
Eliding side-effect-free empty block operator '{' at <input>:1:13
WARNING: side-effect-free probe: keyword at :1:1
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
WARNING: Eliding unused variable 'off_task': identifier 'off_task' at :1:15
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
Eliding side-effect-free null statement keyword at <input>:1:1
WARNING: side-effect-free probe: keyword at :1:1
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
Eliding side-effect-free null statement keyword at <input>:1:1
WARNING: side-effect-free probe: keyword at :1:1
source: probe begin { off_task = &@cast(0, "task_struct", "kernel<linux/sched.h>")->tasks; }
^
deleting module_cache
Pass 2: analyzed script: 1 probe, 0 functions, 0 embeds, 0 globals using 69384virt/46176res/6404shr/39940data kb, in 200usr/150sys/853real ms.
Pass 4: using cached /home/polle/.systemtap/cache/77/stapconf_77dd2fb97cd54580a56eb47abc8ad8e1_847.h
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/home/polle/bin:/home/polle/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin make -C /lib/modules/4.4.0-101-generic/build M=/tmp/stapd60AIJ modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=x86_64 stap_5933_src.i --no-print-directory -j3
CPP [M] /tmp/stapd60AIJ/stap_5933_src.i
LD /tmp/stapd60AIJ/built-in.o
CC [M] /tmp/stapd60AIJ/stap_5933_src.o
CC [M] /tmp/stapd60AIJ/stap_5933_aux_0.o
LD [M] /tmp/stapd60AIJ/stap_5933.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/stapd60AIJ/stap_5933.mod.o
LD [M] /tmp/stapd60AIJ/stap_5933.ko
Spawn waitpid result (0x0): 0
stap_5933.ko
Pass 4: compiled C into "stap_5933.ko" in 1290usr/170sys/2044real ms.
Copying /tmp/stapd60AIJ/stapconf_77dd2fb97cd54580a56eb47abc8ad8e1_847.h to /home/polle/.systemtap/cache/77/stapconf_77dd2fb97cd54580a56eb47abc8ad8e1_847.h
Copying /tmp/stapd60AIJ/stap_5933.ko to stap_5933.ko
Keeping temporary directory "/tmp/stapd60AIJ"