[Pkg-haskell-maintainers] Bug#756260: ghc generates lots of unaligned access syslog warnings on hppa
Helge Deller
deller at gmx.de
Mon Jul 28 08:06:54 UTC 2014
Package: ghc
Version: 7.6.3-15
Severity: bug
On the hppa architecture, ghc generates during build (and when builing with ghc) lots of unaligned accesses to the same addresses.
Here is the example which happens in syslog when ghc is running:
[74791.164000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac7f523
[74791.268000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac792af
[74791.372000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac80983
[74791.472000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac798b3
[74793.636000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac7f523
[74822.640000] handle_unaligned: 15 callbacks suppressed
[74822.704000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac7f523
[74822.804000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac792af
[74822.908000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac80983
[74823.008000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac798b3
[74823.112000] ghc-stage2(6230): unaligned access to 0x00000000043b77fa at ip=0x00000000fac7f523
[74828.264000] handle_unaligned: 527 callbacks suppressed
"Unaligned accesses" means, that ghc tries to load e.g. a 4-byte word where the word is not aligned to a 4-byte address.
In C for example, this would produce an unaligned access "* (int*) 0x0003".
On hppa unaligned accesses are expensive, since the Linux kernel will trigger an exception and will fix this unaligned access for userspace.
In general it should be trivial to find where those unaligned accesses happen.
On hppa you could for example run "prctl --unaligned=signal <testprogram>" and the kernel will then trigger a fault in userspace and you should get a backtrace.
I don't have much knowledge in ghc myself else I would have tried to find the bug.
Maybe the ghc developers can take a look at this?
I can provide access to a hppa porterbox where this can be reproduced.
Thanks,
Helge
More information about the Pkg-haskell-maintainers
mailing list