All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: multipathd segfault
Date: Fri, 27 Mar 2009 08:50:30 +0100	[thread overview]
Message-ID: <49CC8546.9080500@suse.de> (raw)
In-Reply-To: <448b15030903261725x1fc4c02dx594c6df7b8daa11e@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]

David Strand wrote:
> I am getting a multipathd segfault when I have more than 26 devices,
> and the device names become 4 characters. (i.e. /dev/sdz is consumed
> and the next device is /dev/sdaa).
> 
> I was trying to hook gdb to a core dump, but it keeps complaining that
> it needs device-mapper-libs-debuginfo, which I can not find. Can
> anyone point me to this?
> 
> I built multipathd with -g turned on and did not strip it. Here is the
> last few lines of output when I run it as multipathd -v9 -d:
> 
> Jul 04 05:01:26 | alpa-0x000080: discover
> Jul 04 05:01:26 | libdevmapper: ioctl/libdm-iface.c(1606): dm table
> alpa-0x000080  NF   [16384]
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = 65:160, len = 6
> Jul 04 05:01:26 | *word = 1000, len = 4
> Jul 04 05:01:26 | libdevmapper: ioctl/libdm-iface.c(1606): dm status
> alpa-0x000080  NF   [16384]
> Jul 04 05:01:26 | *word = 2, len = 1
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = E, len = 1
> Jul 04 05:01:26 | *word = 1, len = 1
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | *word = A, len = 1
> Jul 04 05:01:26 | *word = 0, len = 1
> Jul 04 05:01:26 | alpa-0x000080: rr_weight = 1 (internal default)
> Jul 04 05:01:26 | alpa-0x000080: pgfailback = -2 (config file default)
> Jul 04 05:01:26 | alpa-0x000080: no_path_retry = 3 (config file default)
> Jul 04 05:01:26 | libdevmapper: ioctl/libdm-iface.c(1606): dm message
> alpa-0x000080  NF  queue_if_no_path
>  [16384]
> Jul 04 05:01:26 | pg_timeout = NONE (internal default)
> Jul 04 05:01:26 | alpa-0x000080: event checker started
> Jul 04 05:01:26 | sdaa path added to devmap alpa-0x000080
> Jul 04 05:01:26 | discard event on /block/sdaa/sdaa1
> Segmentation fault
> 
Oh, that one.

Fixed by the attached path.

Christophe, care to apply?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

[-- Attachment #2: multipath-tools-uev-discard-segfault --]
[-- Type: text/plain, Size: 761 bytes --]

commit 223885b66311bbb47e439557eced066b3324ad8e
Author: Hannes Reinecke <hare@suse.de>
Date:   Tue Mar 10 08:57:18 2009 +0100

    Stack overflow in uev_trigger()
    
    uev_discard uses sscanf to write a 10 byte string into an array,
    but I forgot to take the trailing NULL byte into account.
    
    References: bnc#476540
    
    Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/multipathd/main.c b/multipathd/main.c
index 7c995b6..1d8ff5a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -652,7 +652,7 @@ uxsock_trigger (char * str, char ** reply, int * len, void * trigger_data)
 static int
 uev_discard(char * devpath)
 {
-	char a[10], b[10], *c;
+	char a[11], b[11], *c;
 
 	/*
 	 * keep only block devices, discard partitions

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2009-03-27  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27  0:25 multipathd segfault David Strand
2009-03-27  7:50 ` Hannes Reinecke [this message]
2009-03-27 17:08   ` David Strand
2009-03-27 22:53   ` christophe.varoqui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CC8546.9080500@suse.de \
    --to=hare@suse.de \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.