Re: unaligned access
Right way to cure it is to fix the code that is generating unaligned
access. To do this, compile the source code with "-g" and then run gdb
on it using prctl as follows:
$ prctl --unaligned=signal gdb <your_app>
When your app generates unaligned access, kernel will send it a SIGBUS
signal which will be trapped by gdb. Look at the backtrace to see where
the unaligned access is coming from and fix the code there.
You can also tell the kernel to not log unaligned access messages by
starting your app through prctl as follows:
$ prctl --unaligned=silent <your_app> <args.........>
This will get rid of those messages in dmesg but will not get rid of the
fundamental alignment problem in the app. Unaligned accesses cause
performance penalty. A better thing to do would be to fix the app.
Kenneth Geisshirt wrote:
> I think the following issue has been discussed on this list in
> relationship with snort. But I have started (after a reboot) to get the
> following message in my logs:
> Sep 16 06:05:03 herodot kernel: php4(16829): unaligned access to
> 0x200000000068989c, ip=0x40000000001b0591
> (both apache and php)
> I run 2.4.19-itanium-smp and woody.
> Does anyone knows any cure?
Khalid Aziz Linux and Open Source Lab
email@example.com Fort Collins, CO
"The Linux kernel is subject to relentless development"
- Alessandro Rubini