Debian Bug report logs - #234451
/sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel

Package: kernel-patch-device-mapper; Maintainer for kernel-patch-device-mapper is (unknown);

Reported by: Holger Dietze <holger.dietze@advis.de>

Date: Mon, 23 Feb 2004 23:03:04 UTC

Severity: important

Done: Holger Dietze <holger.dietze@advis.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Patrick Caulfield <patrick@debian.org>:
Bug#234451; Package lvm-common. Full text and rfc822 format available.

Acknowledgement sent to Holger Dietze <holger.dietze@advis.de>:
New Bug report received and forwarded. Copy sent to Patrick Caulfield <patrick@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Mon, 23 Feb 2004 23:57:07 +0100
Package: lvm-common
Version: 1.5.11
Severity: important
File: /sbin/lvmiopversion

When trying to activate a volume group created under a 32bit-kernel
using the i386 binary under a 64bit-kernel I get the following error:

poochy:~# vgchange -a y /dev/vg1
  device-mapper ioctl cmd 0 failed: Invalid argument
  Incompatible libdevmapper 1.00.07-ioctl (2003-11-21)(compat) and
kernel driver 
  0 logical volume(s) in volume group "vg1" now active


There are 7 LVs in that volume group, lvscan shows them:

poochy:~# vgscan 
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
poochy:~# lvscan 
  device-mapper ioctl cmd 0 failed: Invalid argument
  Incompatible libdevmapper 1.00.07-ioctl (2003-11-21)(compat) and
kernel driver 
  inactive          '/dev/vg1/swap0' [1.97 GB] next free (default)
[...]


This problem makes LVM unusable for me under a 64bit-enabled kernel,
hence severity 'important'.

Solutions I can think of:
- in the next days I will try with a x86_64 binary of the LVM-tools; 
- provide the programs in an additional package with a wrapper script to
maintain its usability on 32bit kernels.

Greetings

Holger
-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux poochy 2.6.3 #3 SMP Mon Feb 23 21:15:50 UTC 2004 x86_64
Locale: LANG=C, LC_CTYPE=C

Versions of packages lvm-common depends on:
ii  binutils                   2.14.90.0.7-5 The GNU assembler, linker and bina
ii  libc6                      2.3.2.ds1-11  GNU C Library: Shared libraries an
ii  modutils                   2.4.26-1      Linux module utilities

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Patrick Caulfield <patrick@debian.org>:
Bug#234451; Package lvm-common. Full text and rfc822 format available.

Acknowledgement sent to Holger Dietze <holger.dietze@advis.de>:
Extra info received and forwarded to list. Copy sent to Patrick Caulfield <patrick@debian.org>. Full text and rfc822 format available.

Message #10 received at 234451@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: 234451@bugs.debian.org
Subject: Re: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Tue, 24 Feb 2004 00:31:12 +0100
related lines in the syslog:

ioctl32(vgchange:790): Unknown cmd fd(5) cmd(c134fd00){01} arg(080b0870)
on /dev/mapper/control
ioctl32(vgchange:790): Unknown cmd fd(5) cmd(c134fd00){01} arg(080b0870)
on /dev/mapper/control




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package lvm-common. Full text and rfc822 format available.

Acknowledgement sent to Patrick Caulfield <patrick@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #15 received at submit@bugs.debian.org (full text, mbox):

From: Patrick Caulfield <patrick@debian.org>
To: Holger Dietze <holger.dietze@advis.de>, 234451@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#234451: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Tue, 24 Feb 2004 08:24:56 +0000
On Mon, Feb 23, 2004 at 11:57:07PM +0100, Holger Dietze wrote:
> Package: lvm-common
> Version: 1.5.11
> Severity: important
> File: /sbin/lvmiopversion
> 
> When trying to activate a volume group created under a 32bit-kernel
> using the i386 binary under a 64bit-kernel I get the following error:
> 
> poochy:~# vgchange -a y /dev/vg1
>   device-mapper ioctl cmd 0 failed: Invalid argument
>   Incompatible libdevmapper 1.00.07-ioctl (2003-11-21)(compat) and
> kernel driver 
>   0 logical volume(s) in volume group "vg1" now active
> 
> 
> There are 7 LVs in that volume group, lvscan shows them:
> 
> poochy:~# vgscan 
>   Reading all physical volumes.  This may take a while...
>   Found volume group "vg1" using metadata type lvm2
> poochy:~# lvscan 
>   device-mapper ioctl cmd 0 failed: Invalid argument
>   Incompatible libdevmapper 1.00.07-ioctl (2003-11-21)(compat) and
> kernel driver 
>   inactive          '/dev/vg1/swap0' [1.97 GB] next free (default)
> [...]
> 

This is a kernel bug. If you are using 32 bit ioctls on a 64 bit system, those
ioctls need to be translated (or marked as compatible).

Actually, the best way is to use 64 bit binaries. LVM & device mapper should
build and run correctly on 64 bit systems (they certainly work on my sparc64 &
alpha).

I'll reassign this bug to the kernel patch package "kernel-patch-device-mapper"
but I strongly recommend you try the 64 bit tools if they are available.
-- 

patrick




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package lvm-common. Full text and rfc822 format available.

Acknowledgement sent to Patrick Caulfield <patrick@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Bug reassigned from package `lvm-common' to `kernel-patch-device-mapper'. Request was from Patrick Caulfield <patrick@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Andres Salomon <dilinger@voxel.net>:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Holger Dietze <holger.dietze@advis.de>:
Extra info received and forwarded to list. Copy sent to Andres Salomon <dilinger@voxel.net>. Full text and rfc822 format available.

Message #27 received at 234451@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: 234451@bugs.debian.org
Subject: Re: Bug#234451: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Tue, 24 Feb 2004 18:20:10 +0100
[Message part 1 (text/plain, inline)]
On Tue, Feb 24, 2004 at 08:24:56AM +0000, Patrick Caulfield wrote:
> This is a kernel bug. If you are using 32 bit ioctls on a 64 bit system, those
> ioctls need to be translated (or marked as compatible).
Agreed.

> Actually, the best way is to use 64 bit binaries. LVM & device mapper should
> build and run correctly on 64 bit systems (they certainly work on my sparc64 &
> alpha).
Yes, I am using LVM on alpha without problems.

> I'll reassign this bug to the kernel patch package "kernel-patch-device-mapper"
I did use a stock 2.6.3 kernel, after peeking into that package there
seems to be no patch of that version anyway.

> but I strongly recommend you try the 64 bit tools if they are available.
Time for me to use the compiler on the devmapper source, as I did not
find them on debian-amd64.alioth.debian.org .


Holger

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Andres Salomon <dilinger@voxel.net>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #32 received at 234451@bugs.debian.org (full text, mbox):

From: Andres Salomon <dilinger@voxel.net>
To: Holger Dietze <holger.dietze@advis.de>, 234451@bugs.debian.org
Subject: Re: Bug#234451: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Thu, 26 Feb 2004 03:27:30 -0500
[Message part 1 (text/plain, inline)]
On Tue, 2004-02-24 at 12:20, Holger Dietze wrote:
> On Tue, Feb 24, 2004 at 08:24:56AM +0000, Patrick Caulfield wrote:
> > This is a kernel bug. If you are using 32 bit ioctls on a 64 bit system, those
> > ioctls need to be translated (or marked as compatible).
> Agreed.
> 
> > Actually, the best way is to use 64 bit binaries. LVM & device mapper should
> > build and run correctly on 64 bit systems (they certainly work on my sparc64 &
> > alpha).
> Yes, I am using LVM on alpha without problems.
> 
> > I'll reassign this bug to the kernel patch package "kernel-patch-device-mapper"
> I did use a stock 2.6.3 kernel, after peeking into that package there
> seems to be no patch of that version anyway.
> 
> > but I strongly recommend you try the 64 bit tools if they are available.
> Time for me to use the compiler on the devmapper source, as I did not
> find them on debian-amd64.alioth.debian.org .
> 
> 
> Holger
> 

I'm not familiar w/ x86_64, but I remember running into a similar
problem testing lvm2 on sparc64.  The solution was to fix up the 32-bit
ioctl conversion stuff, so that 32 and 64 bit applications could call DM
ioctls w/out problems.  Can the same thing be done w/ amd64 ioctls?


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andres Salomon <dilinger@voxel.net>:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Holger Dietze <holger.dietze@advis.de>:
Extra info received and forwarded to list. Copy sent to Andres Salomon <dilinger@voxel.net>. Full text and rfc822 format available.

Message #37 received at 234451@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: 234451@bugs.debian.org
Subject: Re: Bug#234451: /sbin/lvmiopversion: i386 binaries incompatible with amd64 kernel
Date: Mon, 1 Mar 2004 00:19:00 +0100
[Message part 1 (text/plain, inline)]
On Thu, Feb 26, 2004 at 03:27:30AM -0500, Andres Salomon wrote:
> I'm not familiar w/ x86_64, but I remember running into a similar
> problem testing lvm2 on sparc64.  The solution was to fix up the 32-bit
> ioctl conversion stuff, so that 32 and 64 bit applications could call DM
> ioctls w/out problems.  Can the same thing be done w/ amd64 ioctls?

I tried the obvious solution which was in the sparc 32bit emulation,
copying the device-mapper related lines from
arch/sparc64/kernel/ioctl32.c into arch/x86_64/ia32/ia32_ioctl.c , but
this did not help.

Holger
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andres Salomon <dilinger@voxel.net>:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Mickael Marchand <marchand@kde.org>:
Extra info received and forwarded to list. Copy sent to Andres Salomon <dilinger@voxel.net>. Full text and rfc822 format available.

Message #42 received at 234451@bugs.debian.org (full text, mbox):

From: Mickael Marchand <marchand@kde.org>
To: 234451@bugs.debian.org, 234451-submitter@bugs.debian.org
Subject: patch to fix ioctl 32<->64 conversions
Date: Sat, 27 Mar 2004 17:34:27 +0100
Hi,

I have discussed this issue on linux-kernel , there is now a patch which 
apparently works on my system.
The problem is that it breaks old 32 bits binaries so you need to recompile 
the tools to get them working.
but recompiling these tools seems quite obvious because they have old kernel 
includes inside the pkg, so i guess we have to wait a bit for new 
releases ...

however dmsetup now is working (i needed to recompile it by hand iirc)
iirc, I was not able to recompile lvm tools (because of includes) 

patches are at :
http://people.sistina.com/~thornber/dm/

I think more testing for this would be appreciated by the author :)

Cheers,
Mik



Message sent on to Holger Dietze <holger.dietze@advis.de>:
Bug#234451. Full text and rfc822 format available.

Information stored:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Holger Dietze <holger.dietze@advis.de>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #50 received at 234451-quiet@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: Mickael Marchand <marchand@kde.org>, 234451-quiet@bugs.debian.org
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Mon, 29 Mar 2004 23:23:20 +0200
Hi,

On Sat, Mar 27, 2004 at 05:34:27PM +0100, Mickael Marchand wrote:
> patches are at :
> http://people.sistina.com/~thornber/dm/
Thanks for the URL.

I applied the 2.6.5-rc1-udm1 from that site on top of 2.6.5-rc1 and
dmsetup seems to work, even without recompilation.

For reference, the dmsetup and libdevmapper1.00 version I am using at
the moment is 1.00.07-4.

The LVM tools still don't work (segfault, but no kernel message),
probably due to the header issue. vgscan gets in a very long loop during
device scan as a result of some bad interaction with devfs(d?) in the
/dev/discs directory. Entries for non-present discs get created which
point back to .. causing some deep recursion.

Holger




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Andres Salomon <dilinger@voxel.net>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #55 received at 234451@bugs.debian.org (full text, mbox):

From: Andres Salomon <dilinger@voxel.net>
To: 234451@bugs.debian.org
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Thu, 08 Apr 2004 22:16:11 -0400
[Message part 1 (text/plain, inline)]
Note that you're not the only one to report lvm2 tools segfaulting while
infinitely recursing a /dev w/ devfs mounted in 2.6.  I'm going to try
reproducing it..


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Andres Salomon <dilinger@voxel.net>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #60 received at 234451@bugs.debian.org (full text, mbox):

From: Andres Salomon <dilinger@voxel.net>
To: 234451@bugs.debian.org, Holger Dietze <holger.dietze@advis.de>
Cc: Mickael Marchand <marchand@kde.org>
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Mon, 10 May 2004 02:02:58 -0400
[Message part 1 (text/plain, inline)]
Hi,

The infinite loop/crash in /dev should be fixed in the latest lvm2
packages (uploaded today; 2.00.15-2).  Please give it a try, and let me
know whether it works or not.

As far as the kernel patch needed for working 32/64 bit ioctl
conversions on amd64; Mickael, can you please point out the patch (or
l-k thread) that fixes the issue?  I'd like to be able to track it, so I
can close this bug when Linus accepts it for 2.6 inclusion.


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andres Salomon <dilinger@voxel.net>:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Mickael Marchand <mickael.marchand@ujf-grenoble.fr>:
Extra info received and forwarded to list. Copy sent to Andres Salomon <dilinger@voxel.net>. Full text and rfc822 format available.

Message #65 received at 234451@bugs.debian.org (full text, mbox):

From: Mickael Marchand <mickael.marchand@ujf-grenoble.fr>
To: Andres Salomon <dilinger@voxel.net>
Cc: 234451@bugs.debian.org, Holger Dietze <holger.dietze@advis.de>
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Mon, 10 May 2004 09:02:57 +0200
Hi,

as of 2.6.6-rc2 :

<akpm@osdl.org>
	[PATCH] dm: Fix 64/32 bit ioctl problems.
	
	From: Kevin Corry <kevcorry@us.ibm.com>
	
	Fix 64/32 bit ioctl problems.

is the fix for it, but I have not tested it yet (waiting for 2.6.6), IIRC it 
was discussed on lkml that it should not break binary compatibility of 
userland tools so I believe the tools in debian are correct, we just need to 
wait for 2.6.6 hopefully.

Cheers,
Mik

Le lundi 10 Mai 2004 08:02, Andres Salomon a écrit :
> Hi,
>
> The infinite loop/crash in /dev should be fixed in the latest lvm2
> packages (uploaded today; 2.00.15-2).  Please give it a try, and let me
> know whether it works or not.
>
> As far as the kernel patch needed for working 32/64 bit ioctl
> conversions on amd64; Mickael, can you please point out the patch (or
> l-k thread) that fixes the issue?  I'd like to be able to track it, so I
> can close this bug when Linus accepts it for 2.6 inclusion.

-- 
Mickael Marchand,
Ingenieur de recherche CNRS
Service Informatique, Institut Fourier - UFR Maths
Tel : 0476635655 Fax : 0476514478



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#234451; Package kernel-patch-device-mapper. Full text and rfc822 format available.

Acknowledgement sent to Andres Salomon <dilinger@voxel.net>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #70 received at 234451@bugs.debian.org (full text, mbox):

From: Andres Salomon <dilinger@voxel.net>
To: Mickael Marchand <mickael.marchand@ujf-grenoble.fr>
Cc: 234451@bugs.debian.org, Holger Dietze <holger.dietze@advis.de>
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Mon, 10 May 2004 03:08:12 -0400
[Message part 1 (text/plain, inline)]
On Mon, 2004-05-10 at 03:02, Mickael Marchand wrote:
> Hi,
> 
> as of 2.6.6-rc2 :
> 
> <akpm@osdl.org>
> 	[PATCH] dm: Fix 64/32 bit ioctl problems.
> 	
> 	From: Kevin Corry <kevcorry@us.ibm.com>
> 	
> 	Fix 64/32 bit ioctl problems.
> 
> is the fix for it, but I have not tested it yet (waiting for 2.6.6), IIRC it 
> was discussed on lkml that it should not break binary compatibility of 
> userland tools so I believe the tools in debian are correct, we just need to 
> wait for 2.6.6 hopefully.

Sweet.  And 2.6.6 was released minutes ago..


> 
> Cheers,
> Mik
> 
> Le lundi 10 Mai 2004 08:02, Andres Salomon a écrit :
> > Hi,
> >
> > The infinite loop/crash in /dev should be fixed in the latest lvm2
> > packages (uploaded today; 2.00.15-2).  Please give it a try, and let me
> > know whether it works or not.
> >
> > As far as the kernel patch needed for working 32/64 bit ioctl
> > conversions on amd64; Mickael, can you please point out the patch (or
> > l-k thread) that fixes the issue?  I'd like to be able to track it, so I
> > can close this bug when Linus accepts it for 2.6 inclusion.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Holger Dietze <holger.dietze@advis.de>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Holger Dietze <holger.dietze@advis.de>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #75 received at 234451-done@bugs.debian.org (full text, mbox):

From: Holger Dietze <holger.dietze@advis.de>
To: Andres Salomon <dilinger@voxel.net>
Cc: Mickael Marchand <mickael.marchand@ujf-grenoble.fr>, 234451-done@bugs.debian.org, Holger Dietze <holger.dietze@advis.de>
Subject: Re: Bug#234451: patch to fix ioctl 32<->64 conversions
Date: Mon, 10 May 2004 21:38:06 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Mon, May 10, 2004 at 03:08:12AM -0400, Andres Salomon wrote:
> On Mon, 2004-05-10 at 03:02, Mickael Marchand wrote:
> > Hi,
> > 
> > as of 2.6.6-rc2 :
> > 
> > <akpm@osdl.org>
> > 	[PATCH] dm: Fix 64/32 bit ioctl problems.
> > 	
> > 	From: Kevin Corry <kevcorry@us.ibm.com>
> > 	
> > 	Fix 64/32 bit ioctl problems.
> > 
> > is the fix for it, but I have not tested it yet (waiting for 2.6.6), IIRC it 
> > was discussed on lkml that it should not break binary compatibility of 
> > userland tools so I believe the tools in debian are correct, we just need to 
> > wait for 2.6.6 hopefully.
> 
> Sweet.  And 2.6.6 was released minutes ago..
> 

And the Athlon64 ist fast at kernel compilation :-)

> 
> > 
> > Cheers,
> > Mik
> > 
> > Le lundi 10 Mai 2004 08:02, Andres Salomon a ?crit :
> > > Hi,
> > >
> > > The infinite loop/crash in /dev should be fixed in the latest lvm2
> > > packages (uploaded today; 2.00.15-2).  Please give it a try, and let me
> > > know whether it works or not.
> > >

Using kernel 2.6.6, lvm2 2.00.15-2 and libdevmapper1.00 1.00.17-1 I
could successfully create a PV, VG and LV, initialize that LV and mount
it, data transfer seems to work, too.

Therefore I will close this bug.


Thank you

Holger

[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 08:35:04 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.