[dm-devel] unaligned access by multipathd logging

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Thu May 5 21:42:57 UTC 2005


Hi,

Logging code in multipathd cause unaligned access
which, on ia64, yields logs on both console and syslog like:
unaligned access to 0x60000000000141d1, ip=0x4000000000009d81

It's harmless except for the slight performance effect.
However, it's annoying for users and better to fix.

Attached patch aligns the la->tail to pointer size.
Patch is created on multipath-tools 0.4.4.
Please consider to apply.

This is a gdb trace of the case, for your reference:
#0  log_enqueue (prio=5, fmt=0x4000000000045970 "read /etc/multipath.conf",
    ap=0x6000000000013f70) at log.c:130
130             msg->prio = prio;
(gdb) where
#0  log_enqueue (prio=5, fmt=0x4000000000045970 "read /etc/multipath.conf",
    ap=0x6000000000013f70) at log.c:130
#1  0x400000000000a390 in log_safe (prio=5,
    fmt=0x4000000000045970 "read /etc/multipath.conf") at log_pthread.c:16
#2  0x4000000000007f60 in child (param=0x0) at main.c:883
#3  0x2000000000275930 in __clone2 () from /lib/tls/libc.so.6.1
(gdb) p msg
$1 = (struct logmsg *) 0x60000000000141d1
(gdb) p la->tail
$2 = (void *) 0x60000000000141d1
(gdb) p/x fwd
$3 = 0x31

Thanks,
Jun'ichi Nomura
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logarea.patch
Type: text/x-patch
Size: 1082 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20050505/30fddeee/attachment.bin>


More information about the dm-devel mailing list