*** stack smashing detected ***: /sbin/mpath_prio_hds_modular terminated

Bug #386619 reported by ewr2san
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: multipath-tools

Jaunty server 32-bit.

Running mpath_prio_hds_modular against any device causes the *** stack smashing detected *** message to be displayed.

root@tie-interceptor:~# /sbin/mpath_prio_hds_modular -v /dev/sda
VENDOR: HITACHI
PRODUCT: DF600F
SERIAL: 0x
LDEV: 0x0007
CTRL: 2
PORT: A
CTRL EVEN, LDEV ODD, PRIO 0
*** stack smashing detected ***: /sbin/mpath_prio_hds_modular terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb8074da8]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb8074d60]
/sbin/mpath_prio_hds_modular[0x8048b92]
/sbin/mpath_prio_hds_modular[0x80486b3]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7f8d775]
/sbin/mpath_prio_hds_modular[0x8048551]
======= Memory map: ========
08048000-08049000 r-xp 00000000 09:02 1537228 /sbin/mpath_prio_hds_modular
08049000-0804a000 r--p 00001000 09:02 1537228 /sbin/mpath_prio_hds_modular
0804a000-0804b000 rw-p 00002000 09:02 1537228 /sbin/mpath_prio_hds_modular
09e2c000-09e4d000 rw-p 09e2c000 00:00 0 [heap]
b7f63000-b7f70000 r-xp 00000000 09:02 1496221 /lib/libgcc_s.so.1
b7f70000-b7f71000 r--p 0000c000 09:02 1496221 /lib/libgcc_s.so.1
b7f71000-b7f72000 rw-p 0000d000 09:02 1496221 /lib/libgcc_s.so.1
b7f76000-b7f77000 rw-p b7f76000 00:00 0
b7f77000-b80d3000 r-xp 00000000 09:02 1496367 /lib/tls/i686/cmov/libc-2.9.so
b80d3000-b80d4000 ---p 0015c000 09:02 1496367 /lib/tls/i686/cmov/libc-2.9.so
b80d4000-b80d6000 r--p 0015c000 09:02 1496367 /lib/tls/i686/cmov/libc-2.9.so
b80d6000-b80d7000 rw-p 0015e000 09:02 1496367 /lib/tls/i686/cmov/libc-2.9.so
b80d7000-b80da000 rw-p b80d7000 00:00 0
b80dd000-b80e0000 rw-p b80dd000 00:00 0
b80e0000-b80e1000 r-xp b80e0000 00:00 0 [vdso]
b80e1000-b80fd000 r-xp 00000000 09:02 1496222 /lib/ld-2.9.so
b80fd000-b80fe000 r--p 0001b000 09:02 1496222 /lib/ld-2.9.so
b80fe000-b80ff000 rw-p 0001c000 09:02 1496222 /lib/ld-2.9.so
bfdea000-bfdff000 rw-p bffeb000 00:00 0 [stack]
Aborted

I got new source for Version 2.01 from the mpath_prio_hds_modular author.
Version 2.01
    Changes 2007-11-13:

      o Source code changes:

        § Delete #include <libdevmapper.h>

        § Delete char vendor[8]

        § Add char vendor[9]

Compiled it with:

 # gcc pp_hds_modular.c –o mpath_prio_hds_modular
 Copy the prioritizer:
 # cp mpath_prio_hds_modular /sbin

Now mpath_prio_hds_modular works correctly:

root@tie-interceptor:/# /sbin/mpath_prio_hds_modular -v /dev/sda
VENDOR: HITACHI
PRODUCT: DF600F
SERIAL: 0x
LDEV: 0x0007
CTRL: 2
PORT: A
CTRL EVEN, LDEV ODD, PRIO 0
0

However one part of the multipath package seems to be missing from the ubuntu package.
multipath normally requires /sbin/scsi_id to exist.

Looks like udev puts scsi_id in a strange place, and there is an existing bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481447 for that.

So I symlinked the /lib/udev/scsi_id to /sbin/scsi_id

However the version of scsi_id that is there does not support the -s flag and fails:

root@tie-interceptor:/sbin# multipath
/sbin/scsi_id: invalid option -- 's'
error calling out /sbin/scsi_id -g -u -s /block/sda
/sbin/scsi_id: invalid option -- 's'

It appears that the version of scsi_id that is supplied with ubuntu is a bit different than the version in RH, or SUSE.

root@tie-interceptor:/sbin# /lib/udev/scsi_id --version
141

ewr2san (mark-perino)
description: updated
Revision history for this message
ewr2san (mark-perino) wrote :

So Ive got it working now.

Here's what I did.

1. Compile pp_hds_modular.c 2.01 (attached)
# gcc pp_hds_modular.c –o mpath_prio_hds_modular
 Copy the prioritizer:
# cp mpath_prio_hds_modular /sbin

2. Copy multipath.conf into /etc (attached)

3. Edit /etc/multipath.conf
Change lines (2) that say:
                getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
To:
                getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"

Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

I was wondering if you were still having this problem.

Regards
chuck

Changed in multipath-tools (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
ewr2san (mark-perino) wrote : Re: [Bug 386619] [NEW] *** stack smashing detected ***: /sbin/mpath_prio_hds_modular terminated
Download full text (4.2 KiB)

I gave up. I got somethings working, but decided to wait and try
again when karmic comes out.

On 10/15/09, Chuck Short <email address hidden> wrote:
> Hi,
>
> I was wondering if you were still having this problem.
>
> Regards
> chuck
>
> ** Changed in: multipath-tools (Ubuntu)
> Importance: Undecided => Low
>
> ** Changed in: multipath-tools (Ubuntu)
> Status: New => Incomplete
>
> --
> *** stack smashing detected ***: /sbin/mpath_prio_hds_modular terminated
> https://bugs.launchpad.net/bugs/386619
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “multipath-tools” package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: multipath-tools
>
>
> Jaunty server 32-bit.
>
> Running mpath_prio_hds_modular against any device causes the *** stack
> smashing detected *** message to be displayed.
>
>
> root@tie-interceptor:~# /sbin/mpath_prio_hds_modular -v /dev/sda
> VENDOR: HITACHI
> PRODUCT: DF600F
> SERIAL: 0x
> LDEV: 0x0007
> CTRL: 2
> PORT: A
> CTRL EVEN, LDEV ODD, PRIO 0
> *** stack smashing detected ***: /sbin/mpath_prio_hds_modular terminated
> ======= Backtrace: =========
> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb8074da8]
> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb8074d60]
> /sbin/mpath_prio_hds_modular[0x8048b92]
> /sbin/mpath_prio_hds_modular[0x80486b3]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7f8d775]
> /sbin/mpath_prio_hds_modular[0x8048551]
> ======= Memory map: ========
> 08048000-08049000 r-xp 00000000 09:02 1537228
> /sbin/mpath_prio_hds_modular
> 08049000-0804a000 r--p 00001000 09:02 1537228
> /sbin/mpath_prio_hds_modular
> 0804a000-0804b000 rw-p 00002000 09:02 1537228
> /sbin/mpath_prio_hds_modular
> 09e2c000-09e4d000 rw-p 09e2c000 00:00 0 [heap]
> b7f63000-b7f70000 r-xp 00000000 09:02 1496221 /lib/libgcc_s.so.1
> b7f70000-b7f71000 r--p 0000c000 09:02 1496221 /lib/libgcc_s.so.1
> b7f71000-b7f72000 rw-p 0000d000 09:02 1496221 /lib/libgcc_s.so.1
> b7f76000-b7f77000 rw-p b7f76000 00:00 0
> b7f77000-b80d3000 r-xp 00000000 09:02 1496367
> /lib/tls/i686/cmov/libc-2.9.so
> b80d3000-b80d4000 ---p 0015c000 09:02 1496367
> /lib/tls/i686/cmov/libc-2.9.so
> b80d4000-b80d6000 r--p 0015c000 09:02 1496367
> /lib/tls/i686/cmov/libc-2.9.so
> b80d6000-b80d7000 rw-p 0015e000 09:02 1496367
> /lib/tls/i686/cmov/libc-2.9.so
> b80d7000-b80da000 rw-p b80d7000 00:00 0
> b80dd000-b80e0000 rw-p b80dd000 00:00 0
> b80e0000-b80e1000 r-xp b80e0000 00:00 0 [vdso]
> b80e1000-b80fd000 r-xp 00000000 09:02 1496222 /lib/ld-2.9.so
> b80fd000-b80fe000 r--p 0001b000 09:02 1496222 /lib/ld-2.9.so
> b80fe000-b80ff000 rw-p 0001c000 09:02 1496222 /lib/ld-2.9.so
> bfdea000-bfdff000 rw-p bffeb000 00:00 0 [stack]
> Aborted
>
>
>
> I got new source for Version 2.01 from the mpath_prio_hds_modular author.
> Version 2.01
> Changes 2007-11-13:
>
> o Source code changes:
>
> § Delete #include <libdevmapper.h>
>
> § Delete char vendor[8]
>
> § Add char vendor[9]
>
> Compiled it with:
>
> # gcc pp_hds_modular.c –o mpath_prio_hds_modular
> Copy the prioritizer...

Read more...

Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

Please re-open this bug if you are still having problems with karmic.

Regards
chuck

Changed in multipath-tools (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.