public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* different result on cross-compile on fc12 and fc13
@ 2011-03-21  2:28 Zhiwei Ying
  2011-03-21  9:55 ` Adrien Kunysz
  2011-03-21 14:31 ` Frank Ch. Eigler
  0 siblings, 2 replies; 7+ messages in thread
From: Zhiwei Ying @ 2011-03-21  2:28 UTC (permalink / raw)
  To: systemtap

Hi,

I have a develop board, which runs linux 2.6.35. The board is
connected to a fedora 12. I cross-compile the systemtap script to
generate trace.ko, and copy the trace.ko to run the instrumented code
on the board.

If I compiled the trace.ko on fc13, then everything is fine. The trace
log is generated correctly. But if I compiled the trace.ko on fc12,
whatever I use the stap on fc12 or compile a systemtap 1.4 myself, I
cannot see correct trace log on the board after running. The trace.ko
cannot generate any log from application, but only able to trace
probe.end.

I didn't see any compile error msg on fc12 system.

Any idea to solve this problem. I cannot drop fc12 now and don't want
to use another fc13 to compile the script.

Thanks,
Zhiwei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-21  2:28 different result on cross-compile on fc12 and fc13 Zhiwei Ying
@ 2011-03-21  9:55 ` Adrien Kunysz
  2011-03-23  1:25   ` Zhiwei Ying
  2011-03-21 14:31 ` Frank Ch. Eigler
  1 sibling, 1 reply; 7+ messages in thread
From: Adrien Kunysz @ 2011-03-21  9:55 UTC (permalink / raw)
  To: Zhiwei Ying; +Cc: systemtap

[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]

On Mon, Mar 21, 2011 at 10:28:02AM +0800, Zhiwei Ying wrote:
> I have a develop board, which runs linux 2.6.35. The board is
> connected to a fedora 12. I cross-compile the systemtap script to
> generate trace.ko, and copy the trace.ko to run the instrumented code
> on the board.
> 
> If I compiled the trace.ko on fc13, then everything is fine. The trace
> log is generated correctly. But if I compiled the trace.ko on fc12,
> whatever I use the stap on fc12 or compile a systemtap 1.4 myself, I
> cannot see correct trace log on the board after running. The trace.ko
> cannot generate any log from application, but only able to trace
> probe.end.
> 
> I didn't see any compile error msg on fc12 system.
> 
> Any idea to solve this problem. I cannot drop fc12 now and don't want
> to use another fc13 to compile the script.

I would rebuild both the working and non-working versions of the module
with -vvvvv and try to find any difference in there. Failing that, I
would look at differences in the modules themselves (maybe with objdump
and diff) then try to figure out where it comes from.

A more detailed description of what (doesn't) work(s) would also help.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-21  2:28 different result on cross-compile on fc12 and fc13 Zhiwei Ying
  2011-03-21  9:55 ` Adrien Kunysz
@ 2011-03-21 14:31 ` Frank Ch. Eigler
  2011-03-22  0:22   ` Zhiwei Ying
  1 sibling, 1 reply; 7+ messages in thread
From: Frank Ch. Eigler @ 2011-03-21 14:31 UTC (permalink / raw)
  To: Zhiwei Ying; +Cc: systemtap

Zhiwei Ying <zhiwei.ying@gmail.com> writes:

> [...]  If I compiled the trace.ko on fc13, then everything is
> fine. The trace log is generated correctly. But if I compiled the
> trace.ko on fc12, whatever I use the stap on fc12 or compile a
> systemtap 1.4 myself, I cannot see correct trace log on the board
> after running. [...]

One possibility is a mismatch between the version of stap on the host,
and the version of staprun installed on the board.  There was a
module<->staprun interface change in commit #3abb860f (in stap 1.4)
that was unfortunately not done in a cross-compatible manner.  You'd
see target kernel error (dmesg) messages of the form

    STP_RELOCATE message size mismatch (%lu vs %lu)

If you upgrade your staprun on the target, and your development stap,
it should work again.  We could change the next version of stap to
have its modules tolerate much older stapruns, if that's important.

- FChE

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-21 14:31 ` Frank Ch. Eigler
@ 2011-03-22  0:22   ` Zhiwei Ying
  0 siblings, 0 replies; 7+ messages in thread
From: Zhiwei Ying @ 2011-03-22  0:22 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Actually I am using staprun 1.4 on the board, and compiled same
version on the host. I am moving to Ubuntu to see if there is any
lucky.

On Mon, Mar 21, 2011 at 10:30 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Zhiwei Ying <zhiwei.ying@gmail.com> writes:
>
>> [...]  If I compiled the trace.ko on fc13, then everything is
>> fine. The trace log is generated correctly. But if I compiled the
>> trace.ko on fc12, whatever I use the stap on fc12 or compile a
>> systemtap 1.4 myself, I cannot see correct trace log on the board
>> after running. [...]
>
> One possibility is a mismatch between the version of stap on the host,
> and the version of staprun installed on the board.  There was a
> module<->staprun interface change in commit #3abb860f (in stap 1.4)
> that was unfortunately not done in a cross-compatible manner.  You'd
> see target kernel error (dmesg) messages of the form
>
>    STP_RELOCATE message size mismatch (%lu vs %lu)
>
> If you upgrade your staprun on the target, and your development stap,
> it should work again.  We could change the next version of stap to
> have its modules tolerate much older stapruns, if that's important.
>
> - FChE
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-21  9:55 ` Adrien Kunysz
@ 2011-03-23  1:25   ` Zhiwei Ying
  2011-03-23  1:53     ` Josh Stone
  0 siblings, 1 reply; 7+ messages in thread
From: Zhiwei Ying @ 2011-03-23  1:25 UTC (permalink / raw)
  To: Adrien Kunysz; +Cc: systemtap

Yes, the -vvvvv and the compare is useful. I found some difference is
suspicious in the comparison. I recompiled the systemtap with another
version elfutils, looks like it solve the problem. Thanks!

On Mon, Mar 21, 2011 at 5:55 PM, Adrien Kunysz <adrien@kunysz.be> wrote:
> On Mon, Mar 21, 2011 at 10:28:02AM +0800, Zhiwei Ying wrote:
>> I have a develop board, which runs linux 2.6.35. The board is
>> connected to a fedora 12. I cross-compile the systemtap script to
>> generate trace.ko, and copy the trace.ko to run the instrumented code
>> on the board.
>>
>> If I compiled the trace.ko on fc13, then everything is fine. The trace
>> log is generated correctly. But if I compiled the trace.ko on fc12,
>> whatever I use the stap on fc12 or compile a systemtap 1.4 myself, I
>> cannot see correct trace log on the board after running. The trace.ko
>> cannot generate any log from application, but only able to trace
>> probe.end.
>>
>> I didn't see any compile error msg on fc12 system.
>>
>> Any idea to solve this problem. I cannot drop fc12 now and don't want
>> to use another fc13 to compile the script.
>
> I would rebuild both the working and non-working versions of the module
> with -vvvvv and try to find any difference in there. Failing that, I
> would look at differences in the modules themselves (maybe with objdump
> and diff) then try to figure out where it comes from.
>
> A more detailed description of what (doesn't) work(s) would also help.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAk2HIH8ACgkQKLX03ZSPZGyWvwCfUJWrv3IjG4vG5dKvhFprkcFA
> F2gAn2VMceMx4NL51YRlUAO7V7E/ftgx
> =IYfX
> -----END PGP SIGNATURE-----
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-23  1:25   ` Zhiwei Ying
@ 2011-03-23  1:53     ` Josh Stone
  2011-03-23  2:25       ` Zhiwei Ying
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Stone @ 2011-03-23  1:53 UTC (permalink / raw)
  To: Zhiwei Ying; +Cc: Adrien Kunysz, systemtap

On 03/22/2011 06:25 PM, Zhiwei Ying wrote:
> Yes, the -vvvvv and the compare is useful. I found some difference is
> suspicious in the comparison. I recompiled the systemtap with another
> version elfutils, looks like it solve the problem. Thanks!

I hope it was a newer version of elfutils?  If an older version was
necessary, then please provide details so we can check for regression.

Josh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: different result on cross-compile on fc12 and fc13
  2011-03-23  1:53     ` Josh Stone
@ 2011-03-23  2:25       ` Zhiwei Ying
  0 siblings, 0 replies; 7+ messages in thread
From: Zhiwei Ying @ 2011-03-23  2:25 UTC (permalink / raw)
  To: Josh Stone; +Cc: Adrien Kunysz, systemtap

I used 0.149.

On Wed, Mar 23, 2011 at 9:53 AM, Josh Stone <jistone@redhat.com> wrote:
> On 03/22/2011 06:25 PM, Zhiwei Ying wrote:
>> Yes, the -vvvvv and the compare is useful. I found some difference is
>> suspicious in the comparison. I recompiled the systemtap with another
>> version elfutils, looks like it solve the problem. Thanks!
>
> I hope it was a newer version of elfutils?  If an older version was
> necessary, then please provide details so we can check for regression.
>
> Josh
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-23  2:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21  2:28 different result on cross-compile on fc12 and fc13 Zhiwei Ying
2011-03-21  9:55 ` Adrien Kunysz
2011-03-23  1:25   ` Zhiwei Ying
2011-03-23  1:53     ` Josh Stone
2011-03-23  2:25       ` Zhiwei Ying
2011-03-21 14:31 ` Frank Ch. Eigler
2011-03-22  0:22   ` Zhiwei Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).