This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Error removing module: Device or resource busy
On Wed, Jan 25, 2012 at 07:31:07AM -0500, Frank Ch. Eigler wrote:
> Chris Dunlop <chris@onthe.net.au> writes:
>
>> [...]
>> Aha! That's done the trick.
>
> Could you save/compare the same script compiled on one machine
> vs. the other, so we can try to figure out what makes the two
> gcc versions incompatible in this way?
See below. Nothing too interesting in the text differences to my gcc-illiterate eye.
The entire output directories including binaries are available at:
http://www.onthe.net.au/private/stap.tar.bz2
----------------------------------------------------------------------
#
# Ubuntu + munge to reduce diff noise
#
$ stap -v -p4 -k -m stap_test -r /home/chris/git/linux-build/3.1.10-otn-00021-gb30b2e5 -e 'probe begin {printf("foo\n"); exit()}'
$ mv stapzqQuo8 stap-ubu
$ mv stap-ubu/stapconf_{c79dc3547856b1805cd168ea2d33cb99_643,XXXXXX}.h
$ perl -pi -e 's/stapzqQuo8/stapXXXXXX/g; s/stapconf_c79dc3547856b1805cd168ea2d33cb99_643/stapconf_XXXXXX/g' $(grep -rIl . stap-ubu)
#
# Debian + munge to reduce diff noise
#
$ ssh debhost "cd /tmp; stap -v -p4 -k -m stap_test -e 'probe begin {printf("foo\n"); exit()}'"
$ scp debhost /tmp/stapbDWXl7 /tmp/stap-deb
$ mv stap-deb/stapconf_{ae64122f2786f892fe9f30069e551b52_589,XXXXXX}.h
$ perl -pi -e 's/stapbDWXl7/stapXXXXXX/g; s/stapconf_ae64122f2786f892fe9f30069e551b52_589/stapconf_XXXXXX/g' $(grep -rIl . stap-deb)
#
# Text differences...
#
$ diff -rbu stap-ubu stap-deb
Binary files stap-ubu/stap_test.ko and stap-deb/stap_test.ko differ
diff -rbu stap-ubu/stap_test.mod.c stap-deb/stap_test.mod.c
--- stap-ubu/stap_test.mod.c 2012-01-26 10:57:53.000000000 +1100
+++ stap-deb/stap_test.mod.c 2012-01-26 10:57:21.000000000 +1100
@@ -58,7 +58,6 @@
{ 0x672144bd, "strlcpy" },
{ 0x23abf82b, "mutex_lock" },
{ 0xb69b5665, "alloc_vm_area" },
- { 0x1e6d26a8, "strstr" },
{ 0xc2cdbf1, "synchronize_sched" },
{ 0xce095088, "mod_timer" },
{ 0x71205378, "add_timer" },
Binary files stap-ubu/stap_test.mod.o and stap-deb/stap_test.mod.o differ
diff -rbu stap-ubu/.stap_test.mod.o.cmd stap-deb/.stap_test.mod.o.cmd
--- stap-ubu/.stap_test.mod.o.cmd 2012-01-26 10:57:53.000000000 +1100
+++ stap-deb/.stap_test.mod.o.cmd 2012-01-26 10:57:21.000000000 +1100
@@ -1,4 +1,4 @@
-cmd_/tmp/stapXXXXXX/stap_test.mod.o := gcc -Wp,-MD,/tmp/stapXXXXXX/.stap_test.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include -I/home/chris/git/linux/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/chris/git/linux/include -include /home/chris/git/linux/include/linux/kconfig.h -I/tmp/stapXXXXXX -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/home/chris/git/linux/include2/asm/mach-default -Iinclude2/asm/mach-default -include /tmp/stapXXXXXX/stapconf_XXXXXX.h -freorder-blocks -Wframe-larger-than=256 -Wno-unused -Werror -I/home/chris/git/linux/"/usr/share/systemtap/runtime" -I"/usr/share/systemtap/runtime" -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_test.mod)" -D"KBUILD_MODNAME=KBUILD_STR(stap_test)" -DMODULE -c -o /tmp/stapXXXXXX/stap_test.mod.o /tmp/stapXXXXXX/stap_test.mod.c
+cmd_/tmp/stapXXXXXX/stap_test.mod.o := gcc -Wp,-MD,/tmp/stapXXXXXX/.stap_test.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I/home/chris/git/linux/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/chris/git/linux/include -include /home/chris/git/linux/include/linux/kconfig.h -I/tmp/stapXXXXXX -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/home/chris/git/linux/include2/asm/mach-default -Iinclude2/asm/mach-default -include /tmp/stapXXXXXX/stapconf_XXXXXX.h -freorder-blocks -Wframe-larger-than=256 -Wno-unused -Werror -I/home/chris/git/linux/"/usr/share/systemtap/runtime" -I"/usr/share/systemtap/runtime" -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_test.mod)" -D"KBUILD_MODNAME=KBUILD_STR(stap_test)" -DMODULE -c -o /tmp/stapXXXXXX/stap_test.mod.o /tmp/stapXXXXXX/stap_test.mod.c
source_/tmp/stapXXXXXX/stap_test.mod.o := /tmp/stapXXXXXX/stap_test.mod.c
@@ -68,7 +68,7 @@
$(wildcard include/config/ring/buffer.h) \
$(wildcard include/config/numa.h) \
$(wildcard include/config/compaction.h) \
- /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stdarg.h \
+ /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h \
/home/chris/git/linux/include/linux/linkage.h \
/home/chris/git/linux/arch/x86/include/asm/linkage.h \
$(wildcard include/config/x86/64.h) \
@@ -455,6 +455,7 @@
/home/chris/git/linux/include/linux/tracepoint.h \
/home/chris/git/linux/include/linux/jump_label.h \
$(wildcard include/config/jump/label.h) \
+ /home/chris/git/linux/arch/x86/include/asm/jump_label.h \
/home/chris/git/linux/arch/x86/include/asm/module.h \
$(wildcard include/config/m586.h) \
$(wildcard include/config/m586tsc.h) \
Binary files stap-ubu/stap_test.o and stap-deb/stap_test.o differ
diff -rbu stap-ubu/stap_test_src.c stap-deb/stap_test_src.c
--- stap-ubu/stap_test_src.c 2012-01-26 10:57:53.000000000 +1100
+++ stap-deb/stap_test_src.c 2012-01-26 10:57:21.000000000 +1100
@@ -77,7 +77,7 @@
(void) l;
#define CONTEXT c
#define THIS l
- c->last_stmt = "identifier 'exit' at /usr/share//systemtap/tapset/logging.stp:49:10";
+ c->last_stmt = "identifier 'exit' at /usr/share/systemtap/tapset/logging.stp:49:10";
if (unlikely (c->nesting+1 >= MAXNESTING)) {
c->last_error = "MAXNESTING exceeded";
return;
@@ -346,7 +346,7 @@
for (i = 0; i < ARRAY_SIZE(stap_probes); ++i)
stap_probes[i].timing = _stp_stat_init (HIST_NONE);
#endif
- _stp_print_kernel_info("1.7/0.143", (num_online_cpus() * sizeof(struct context)), 1);
+ _stp_print_kernel_info("1.7/0.152", (num_online_cpus() * sizeof(struct context)), 1);
for (i=0; i<1; i++) {
struct stap_be_probe* stp = & stap_be_probes [i];
if (stp->type == 0)
Binary files stap-ubu/stap_test_src.o and stap-deb/stap_test_src.o differ
diff -rbu stap-ubu/.stap_test_src.o.cmd stap-deb/.stap_test_src.o.cmd
--- stap-ubu/.stap_test_src.o.cmd 2012-01-26 10:57:53.000000000 +1100
+++ stap-deb/.stap_test_src.o.cmd 2012-01-26 10:57:21.000000000 +1100
@@ -1,4 +1,4 @@
-cmd_/tmp/stapXXXXXX/stap_test_src.o := gcc -Wp,-MD,/tmp/stapXXXXXX/.stap_test_src.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include -I/home/chris/git/linux/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/chris/git/linux/include -include /home/chris/git/linux/include/linux/kconfig.h -I/tmp/stapXXXXXX -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/home/chris/git/linux/include2/asm/mach-default -Iinclude2/asm/mach-default -include /tmp/stapXXXXXX/stapconf_XXXXXX.h -freorder-blocks -Wframe-larger-than=256 -Wno-unused -Werror -I/home/chris/git/linux/"/usr/share/systemtap/runtime" -I"/usr/share/systemtap/runtime" -DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_test_src)" -D"KBUILD_MODNAME=KBUILD_STR(stap_test)" -c -o /tmp/stapXXXXXX/.tmp_stap_test_src.o /tmp/stapXXXXXX/stap_test_src.c
+cmd_/tmp/stapXXXXXX/stap_test_src.o := gcc -Wp,-MD,/tmp/stapXXXXXX/.stap_test_src.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I/home/chris/git/linux/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/chris/git/linux/include -include /home/chris/git/linux/include/linux/kconfig.h -I/tmp/stapXXXXXX -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/home/chris/git/linux/include2/asm/mach-default -Iinclude2/asm/mach-default -include /tmp/stapXXXXXX/stapconf_XXXXXX.h -freorder-blocks -Wframe-larger-than=256 -Wno-unused -Werror -I/home/chris/git/linux/"/usr/share/systemtap/runtime" -I"/usr/share/systemtap/runtime" -DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_test_src)" -D"KBUILD_MODNAME=KBUILD_STR(stap_test)" -c -o /tmp/stapXXXXXX/.tmp_stap_test_src.o /tmp/stapXXXXXX/stap_test_src.c
source_/tmp/stapXXXXXX/stap_test_src.o := /tmp/stapXXXXXX/stap_test_src.c
@@ -72,7 +72,7 @@
$(wildcard include/config/prove/locking.h) \
$(wildcard include/config/numa.h) \
$(wildcard include/config/compaction.h) \
- /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stdarg.h \
+ /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h \
/home/chris/git/linux/include/linux/linkage.h \
/home/chris/git/linux/arch/x86/include/asm/linkage.h \
$(wildcard include/config/x86/64.h) \
@@ -459,6 +459,7 @@
/home/chris/git/linux/include/linux/tracepoint.h \
/home/chris/git/linux/include/linux/jump_label.h \
$(wildcard include/config/jump/label.h) \
+ /home/chris/git/linux/arch/x86/include/asm/jump_label.h \
/home/chris/git/linux/arch/x86/include/asm/module.h \
$(wildcard include/config/m586.h) \
$(wildcard include/config/m586tsc.h) \
#
# Munge the generated gcc command lines to see the differences...
#
$ diff -u <(head -1 stap-ubu/.stap_test.mod.o.cmd | sed -r 's/ /\n/g') <(head -1 stap-deb/.stap_test.mod.o.cmd | sed -r 's/ /\n/g')
--- /dev/fd/63 2012-01-26 11:08:03.173357443 +1100
+++ /dev/fd/62 2012-01-26 11:08:03.173357443 +1100
@@ -5,7 +5,7 @@
-nostdinc
-isystem
-/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include
+/usr/lib/gcc/x86_64-linux-gnu/4.6/include
-I/home/chris/git/linux/arch/x86/include
-Iarch/x86/include/generated
-Iinclude
@@ -46,6 +46,7 @@
-mno-3dnow
-Wframe-larger-than=2048
-fno-stack-protector
+-Wno-unused-but-set-variable
-fno-omit-frame-pointer
-fno-optimize-sibling-calls
-g
@@ -53,6 +54,7 @@
-Wno-pointer-sign
-fno-strict-overflow
-fconserve-stack
+-DCC_HAVE_ASM_GOTO
-I/home/chris/git/linux/include2/asm/mach-default
-Iinclude2/asm/mach-default
$ diff -u <(head -1 stap-ubu/.stap_test_src.o.cmd | sed -r 's/ /\n/g') <(head -1 stap-deb/.stap_test_src.o.cmd | sed -r 's/ /\n/g')
--- /dev/fd/63 2012-01-26 11:08:58.450840261 +1100
+++ /dev/fd/62 2012-01-26 11:08:58.450840261 +1100
@@ -5,7 +5,7 @@
-nostdinc
-isystem
-/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include
+/usr/lib/gcc/x86_64-linux-gnu/4.6/include
-I/home/chris/git/linux/arch/x86/include
-Iarch/x86/include/generated
-Iinclude
@@ -46,6 +46,7 @@
-mno-3dnow
-Wframe-larger-than=2048
-fno-stack-protector
+-Wno-unused-but-set-variable
-fno-omit-frame-pointer
-fno-optimize-sibling-calls
-g
@@ -53,6 +54,7 @@
-Wno-pointer-sign
-fno-strict-overflow
-fconserve-stack
+-DCC_HAVE_ASM_GOTO
-I/home/chris/git/linux/include2/asm/mach-default
-Iinclude2/asm/mach-default
----------------------------------------------------------------------