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 runtime/3518] New: unaligned accesses on ia64


Josh Stone did some analysis to determine the cause of unaligned accesses on
ia64 machines when the testsuite is being run:

On Thursday, November 09, 2006 11:19 AM, William Cohen wrote:

>> RHLE4 U4 ia64
>> Kernel: Linux 2.6.9-42.0.3.EL #1 SMP Mon Sep 25 17:14:34 EDT 2006
>> ia64 ia64 ia64 GNU/Linux
>> [...]
>> The earliest record of staprun causing unaligned accesses on the ia64
>> machine is Nov 5. See things like the following in the systemtap.log
>> output of dejagnu.
>> [...]
>> staprun(9115): unaligned access to 0x2000000000338014,

ip=0x4000000000007c01

>> staprun(9115): unaligned access to 0x200000000033801c,

ip=0x4000000000007c10

>> staprun(9115): unaligned access to 0x2000000000338024,

ip=0x4000000000007c01

>> staprun(9115): unaligned access to 0x200000000033802c,

ip=0x4000000000007c10

In do_kernel_symbols (runtime/stpd/symbols.c), there are these lines:

144:     sym_base = malloc(MAX_SYMBOLS*sizeof(struct
_stp_symbol)+sizeof(int));
[...]
154:     *(int *)sym_base = STP_SYMBOLS;
155:     syms = (struct _stp_symbol *)(sym_base + sizeof(int));
[...]
178:             syms[i].addr = addr;
179:             syms[i].symbol = (char *)(dataptr - data);

The ips 7c01 and 7c10 correspond to lines 178 and 179.  Line 144 will
return an 8-byte aligned pointer, and then 155 adds 4 to it.  From then
on, all access to 8-byte fields through 'syms' will be misaligned.
There's a logging rate limiter that's saving us from seeing more than
four of the same message, thankfully.

One potential solution is to make the transport command a long instead
of int.  Such a fix would require changes to the whole transport layer,
though, so I'll leave it to Martin to decide what to do...

Josh

-- 
           Summary: unaligned accesses on ia64
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: wcohen at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3518

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


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