[Bug 1468897] Re: multipath creates binding for Removable(USB) drives

Mauricio Faria de Oliveira mauricfo at linux.vnet.ibm.com
Tue Sep 22 12:21:43 UTC 2015


Hi @mathieu-tl,

Marking as verification-failed since the version from -proposed hits a segfault in 'multipath -l'.
Here are some details/stack trace:

It segfaults:

	# multipath -l
	Segmentation fault

Trusty / 14.04.3:

	# lsb_release -d
	Description:	Ubuntu 14.04.3 LTS

	# uname -a
	Linux plzp17 3.19.0-29-generic #31~14.04.1-Ubuntu SMP Thu Sep 10 09:45:11 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

Using multipath-tools from trusty-proposed (0.4.9-3ubuntu7.5)

	# apt-cache policy multipath-tools
	multipath-tools:
	  Installed: 0.4.9-3ubuntu7.5
	  Candidate: 0.4.9-3ubuntu7.5
	  Version table:
	 *** 0.4.9-3ubuntu7.5 0
		500 http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed/main ppc64el Packages
		100 /var/lib/dpkg/status
	     0.4.9-3ubuntu7.4 0
		500 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main ppc64el Packages
	     0.4.9-3ubuntu7 0
		500 http://ports.ubuntu.com/ubuntu-ports/ trusty/main ppc64el Packages

	# dpkg -l | grep 'multipath\|kpartx'
	ii  kpartx                              0.4.9-3ubuntu7.5                 ppc64el      create device mappings for partitions
	ii  kpartx-boot                         0.4.9-3ubuntu7.5                 all          Provides kpartx during boot
	ii  multipath-tools                     0.4.9-3ubuntu7.5                 ppc64el      maintain multipath block device access
	ii  multipath-tools-boot                0.4.9-3ubuntu7.5                 all          Support booting from multipath devices


Problem contained in libmultipath, not any external library/component, in the initialization phase:

	# gdb multipath
	GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
	...
	(gdb) run -l
	Starting program: /sbin/multipath -l
	...
	Program received signal SIGSEGV, Segmentation fault.
	0x00003fffb7e3fd70 in vector_alloc_slot () from /lib/libmultipath.so.0
	(gdb) bt
	#0  0x00003fffb7e3fd70 in vector_alloc_slot () from /lib/libmultipath.so.0
	#1  0x00003fffb7e3e200 in keyword_alloc () from /lib/libmultipath.so.0
	#2  0x00003fffb7e3e2c4 in install_keyword_root () from /lib/libmultipath.so.0
	#3  0x00003fffb7e5ac34 in init_keywords () from /lib/libmultipath.so.0
	#4  0x00003fffb7e4a54c in load_config () from /lib/libmultipath.so.0
	#5  0x0000000010002bcc in ?? ()
	#6  0x00003fffb7c94d00 in generic_start_main (main=0x10002b10, argc=<optimized out>, 
	    argv=0x3ffffffffa28, auxvec=0x3ffffffffb30, init=<optimized out>, rtld_fini=<optimized out>, 
	    stack_end=<optimized out>, fini=<optimized out>) at ../csu/libc-start.c:287
	#7  0x00003fffb7c94ef8 in __libc_start_main (argc=<optimized out>, argv=<optimized out>, 
	    ev=<optimized out>, auxvec=<optimized out>, rtld_fini=<optimized out>, stinfo=<optimized out>, 
	    stack_on_entry=<optimized out>) at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:93
	#8  0x0000000000000000 in ?? ()
	(gdb)

Downgrading to version in trusty-updates (0.4.9-3ubuntu7.4):

	# apt-get install {multipath-tools,kpartx}{,-boot}=0.4.9-3ubuntu7.4
	...
	The following packages will be DOWNGRADED:
	  kpartx kpartx-boot multipath-tools multipath-tools-boot
	...
	Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main multipath-tools-boot all 0.4.9-3ubuntu7.4 [6,070 B]
	Get:2 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main multipath-tools ppc64el 0.4.9-3ubuntu7.4 [108 kB]
	Get:3 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main kpartx-boot all 0.4.9-3ubuntu7.4 [2,116 B]
	Get:4 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main kpartx ppc64el 0.4.9-3ubuntu7.4 [19.0 kB]
	...

Now it works fine:

	# multipath -l
	36005076303ffd2a40000000000000345 dm-2 AIX,VDASD
	size=50G features='1 queue_if_no_path' hwhandler='0' wp=rw
	`-+- policy='round-robin 0' prio=-1 status=active
	  |- 0:0:4:0 sdd 8:48  active undef running
	  `- 1:0:4:0 sdh 8:112 active undef running
	36005076303ffd2a40000000000000344 dm-1 AIX,VDASD
	size=50G features='1 queue_if_no_path' hwhandler='0' wp=rw
	`-+- policy='round-robin 0' prio=-1 status=active
	  |- 0:0:3:0 sdc 8:32  active undef running
	  `- 1:0:3:0 sdg 8:96  active undef running
	36005076303ffd2a40000000000000343 dm-0 AIX,VDASD
	size=50G features='1 queue_if_no_path' hwhandler='0' wp=rw
	`-+- policy='round-robin 0' prio=-1 status=active
	  |- 0:0:2:0 sdb 8:16  active undef running
	  `- 1:0:2:0 sdf 8:80  active undef running

	# echo $?
	0


** Tags removed: verification-done
** Tags added: verification-failed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1468897

Title:
  multipath creates binding for Removable(USB) drives

Status in multipath-tools package in Ubuntu:
  Fix Released
Status in multipath-tools source package in Trusty:
  Fix Committed

Bug description:
  [Impact]
  Users installing with a USB key attached to the installing system, or adding a USB key on an installed system with multipath enabled will see the USB devices picked up by multipath. This is confusing because it changes the paths required to be used to access/mount/format the USB drives to paths under /dev/mapper, with mpath names.

  [Test Case]
  1) Attach a USB key on a system with multipath enabled; either from the installer (booting the installer with USB attached), or on an installed system.
  2) See that the device is picked up by multipath-tools and shows up in the output of 'multipath -ll' and under /dev/mapper with the same name as provided by multipath -ll.

  [Regression Potential]
  Some USB 3.0 devices *can* support multipath; users of such custom configurations will see USB devices not being considered as multipath devices. Other devices which should be considered as multipathed may not be picked up anymore.

  ----

  On a system with a multipath configuration, multipath bindings are
  being created for removable(USB) drives rendering them inaccessible as
  normal removable drives.

  in this case, the usb drive is detected as /dev/sdi:

  # lsblk|grep -A2 sdi
  sdi                        8:128  1  14.7G  0 disk
  ├─sdi1                     8:129  1  14.7G  0 part
  └─mpath4 (dm-9)          252:9    0  14.7G  0 mpath
    └─mpath4-part1 (dm-10) 252:10   0  14.7G  0 part

  # cat /etc/multipath/bindings
  # This file was created by curtin while installing the system.
  mpath0 1IBM     IPR-0   5EC2590000000080
  # End of content generated by curtin.
  # Everything below is maintained by multipath subsystem.
  mpath1 1IBM     IPR-0   5EC2590000000060
  mpath2 1IBM     IPR-0   5EC2590000000040
  mpath3 1IBM     IPR-0   5EC2590000000020
  mpath4 1ADATA   USB Flash Drive

  Upon trying to format /dev/sdi1:

  # mkfs.ext4 /dev/sdi1
  mke2fs 1.42.9 (4-Feb-2014)
  /dev/sdi1 is apparently in use by the system; will not make a filesystem here!

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: multipath-tools 0.4.9-3ubuntu7.2
  ProcVersionSignature: User Name 3.16.0-41.55~14.04.1-generic 3.16.7-ckt11
  Uname: Linux 3.16.0-41-generic ppc64le
  ApportVersion: 2.14.1-0ubuntu3.10
  Architecture: ppc64el
  Date: Thu Jun 25 20:44:13 2015
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: multipath-tools
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1468897/+subscriptions



More information about the foundations-bugs mailing list