This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/24720] New: stap Can't insert module and exit with error "Invalid module format"


https://sourceware.org/bugzilla/show_bug.cgi?id=24720

            Bug ID: 24720
           Summary: stap Can't insert module and exit with error "Invalid
                    module format"
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: gromero at linux dot vnet.ibm.com
  Target Milestone: ---

stap can't install module in Pass 5 and fails with "Invalid module format":

gromero@2q14gto1:~/systemtap/bin$ sudo ./stap -g -k -v -r
/home/gromero/git/linux tm.d
Pass 1: parsed user script and 496 library scripts using
101632virt/89920res/7936shr/81472data kb, in 520usr/10sys/529real ms.
Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals using
148544virt/139200res/8960shr/128384data kb, in 880usr/10sys/881real ms.
Pass 3: translated to C into "/tmp/stap1fSq2k/stap_25649_src.c" using
148544virt/139456res/9216shr/128384data kb, in 0usr/10sys/11real ms.
Pass 4: compiled C into "stap_25649.ko" in 2690usr/310sys/3134real ms.
Pass 5: starting run.
ERROR: Couldn't insert module '/tmp/stap1fSq2k/stap_25649.ko': Invalid module
format
WARNING: /home/gromero/systemtap/bin/staprun exited with status: 1
Pass 5: run completed in 10usr/0sys/3real ms.
Pass 5: run failed.  [man error::pass5]
Keeping temporary directory "/tmp/stap1fSq2k"

If Guru mode is disabled it installs correctly:

gromero@2q14gto1:~/systemtap/bin$ sudo ./stap -k -v -r /home/gromero/git/linux
tm.d
Pass 1: parsed user script and 496 library scripts using
101568virt/89856res/7936shr/81408data kb, in 510usr/10sys/525real ms.
Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals using
148416virt/139136res/8960shr/128256data kb, in 860usr/10sys/873real ms.
Pass 3: translated to C into "/tmp/stap2dpqpG/stap_22990_src.c" using
148416virt/139392res/9216shr/128256data kb, in 10usr/0sys/11real ms.
Pass 4: compiled C into "stap_22990.ko" in 14460usr/900sys/15826real ms.
Pass 5: starting run.
tm_unavailable() -> apache2
tm_unavailable() -> apache2
tm_unavailable() -> apache2
^CPass 5: run completed in 0usr/20sys/10304real ms.
Keeping temporary directory "/tmp/stap2dpqpG"

Also, passing flags "-B CONFIG_MODVERSIONS=y" with Guru mode work-around the
issue:

gromero@2q14gto1:~/systemtap/bin$ sudo ./stap -B CONFIG_MODVERSIONS=y -g -k -v
-r /home/gromero/git/linux tm.d
Pass 1: parsed user script and 496 library scripts using
101568virt/89920res/7936shr/81408data kb, in 520usr/10sys/528real ms.
Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals using
148480virt/139136res/8960shr/128320data kb, in 860usr/10sys/882real ms.
Pass 3: translated to C into "/tmp/stapXWnZ4f/stap_24910_src.c" using
148480virt/139392res/9216shr/128320data kb, in 10usr/10sys/11real ms.
Pass 4: compiled C into "stap_24910.ko" in 14420usr/900sys/15758real ms.
Pass 5: starting run.
tm_unavailable() -> apache2
tm_unavailable() -> apache2
tm_unavailable() -> apache2
tm_unavailable() -> apache2

Probe in use is trivial but will only work on recent PPC64 kernels:

gromero@2q14gto1:~/systemtap/bin$ cat tm.d 
probe kernel.function("tm_unavailable").inline {
  printf("tm_unavailable() -> %s\n", execname());
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]