Bug 5948 - [1.4.3] crosstap doesn't work on qemuppc
Summary: [1.4.3] crosstap doesn't work on qemuppc
Status: RESOLVED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.4.3
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-03-12 03:14 UTC by Yi Zhao
Modified: 2014-03-27 14:43 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2014-03-12 03:14:42 UTC
Git rev: dylan/7ab82abcad9ede847c42c01d2a4f4c2c18877e6f

This issue was fixed on 1.4 with bug 4099, but now it happens on 1.4.3.
Please refer to bug 5403 and 4099. 
 

Steps:
1.Create the trace_open.stp script as follows:
probe syscall.open
{
        printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
}

2.Bitbake a qemuppc core-image-sato-sdk image and start it under qemu.
3.From the host machine poky build_dir, run "crosstap root@192.168.7.2 trace_open.stp".

Error message:
######################
semantic error: not accessible at this address [man error::dwarf] (0xc012cdc0, dieoffset: 0xc1840d): identifier '$flags' at /buildarea3/yzhao1/poky-build/build-cross/tmp/sysroots/x86_64-linux/usr/share/systemtap/tapset/linux/syscalls2.stp:129:10
        source: 	flags = $flags
                	        ^

semantic error: not accessible at this address [man error::dwarf] (0xc012cdc0, dieoffset: 0xc183fd): identifier '$filename' at :132:54
        source: 		argstr = sprintf("%s, %s, %#o", user_string_quoted($filename),
                		                                                   ^

Pass 2: analysis failed.  [man error::pass2]
####################
Comment 1 Paul Eggleton 2014-03-12 11:15:49 UTC
I'm not sure what to do with this; the fix is definitely in the kernel source branch we're using for qemuppc. Tom, any suggestions?
Comment 2 Tom Zanussi 2014-03-12 13:28:08 UTC
At this point, I would suggest bisecting to figure out what caused the regression - if I'm not mistaken, the number of commits between broken and not should be pretty small.
Comment 3 Paul Eggleton 2014-03-12 18:51:42 UTC
Well, FWIW I just tried this on a fresh build of 1.4.2 and it failed there, so this isn't a 1.4.3 regression. (CentOS 6.5 build machine.)
Comment 4 Yi Zhao 2014-03-13 06:41:52 UTC
(In reply to comment #3)
> Well, FWIW I just tried this on a fresh build of 1.4.2 and it failed there,
> so this isn't a 1.4.3 regression. (CentOS 6.5 build machine.)

I tested it on original 1.4 , it also failed.
Comment 5 Paul Eggleton 2014-03-20 14:35:43 UTC
Could we re-test this on master just to make sure it definitely works there?
Comment 6 Darren Hart 2014-03-21 21:57:01 UTC
*** Bug 6016 has been marked as a duplicate of this bug. ***
Comment 7 Adrian Dudau 2014-03-26 12:29:47 UTC
IIRC, this was a result of the way later gcc compiles the kernel causing some issues in the debuginfo that scrambles the function entries and variable locations.

We have had this kind of failures before at Enea, in particular with the scheduler.stp file. We wrote some patches around the issue for scheduler.stp but those do not solve the root cause.

Some related bugs are already reported/fixed upstream, not sure if they help with our problem :
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793
https://sourceware.org/bugzilla/show_bug.cgi?id=15123

I would say we need to investigate if the existing fixes solve our problem and, if not, push the problem upstream.
Comment 8 Tom Zanussi 2014-03-26 13:10:35 UTC
(In reply to comment #7)
> IIRC, this was a result of the way later gcc compiles the kernel causing
> some issues in the debuginfo that scrambles the function entries and
> variable locations.
> 
> We have had this kind of failures before at Enea, in particular with the
> scheduler.stp file. We wrote some patches around the issue for scheduler.stp
> but those do not solve the root cause.
> 
> Some related bugs are already reported/fixed upstream, not sure if they help
> with our problem :
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793
> https://sourceware.org/bugzilla/show_bug.cgi?id=15123
> 
> I would say we need to investigate if the existing fixes solve our problem
> and, if not, push the problem upstream.

If you look at the yocto bugs mentioned e.g. 4099 and 5403, you can see that the fix was incorporating those upstream gcc and systemtap fixes.

The fixes did work and were verified by QA at that point - apparently the whole situation is so fragile that unrelated patches added to the point release broke it again.

You mentioned that you have patches that fix the issue - if could please submit them, that would help.

For master, I'll try upgrading systemtap to the very latest commit and see if it fixes the problem.  If it does, great, if not, we may just have to remove systemtap support for ppc unless someone comes up with fixes.

For 1.4.3, we may or may not be able to upgrade to the latest systemtap, if not, we'll probably have to remove support for ppc unless someone can come up with fixes.

It's not a great use of our time to be chasing down bugs in fundamentally broken software.
Comment 9 Darren Hart 2014-03-27 14:43:23 UTC
This will not make 1.4.3 at this point, and is not likely to get fixed for 1.4 in general. Will un-duplicate Bug 6016 opened against master. If someone wants to perform the work to fix this for 1.4, please reopen and assign the bug to yourself.