Debian Bug report logs -
#409875
libdevmapper should provide more helpful error messages
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to Johannes Schlumberger <paso.asso@uni.de>:
New Bug report received and forwarded. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: cryptsetup
Version: 2:1.0.4+svn26-1
Severity: important
Hi,
when trying to create a mapping for /dev/md0 cryptsetup fails to do so.
[04:11:35][root@asso:/home/spjsschl]# cryptsetup -c aes -s 256 -d /dev/stdin
create root /dev/md0 < /key
Command failed: device-mapper: reload ioctl failed: Invalid argument
[04:12:57][root@asso:/home/spjsschl]# dmesg | tail -n 3
device-mapper: table: 253:2: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
device-mapper: ioctl: device doesn't appear to be in the dev hash table.
creating a mapping on a loop-device or my swap-partitions works just fine, as it
always did.
[04:12:58][root@asso:/home/spjsschl]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdd5[0] hdc1[1]
19542976 blocks [2/2] [UU]
unused devices: <none>
I have attached my kernelconfig, if you need any other piece of information,
please let me know!
best regards,
Johannes
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19.2-asso-50
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Versions of packages cryptsetup depends on:
ii dmsetup 2:1.02.12-1 The Linux Kernel Device Mapper use
ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries
ii libdevma 2:1.02.12-1 The Linux Kernel Device Mapper use
ii libgcryp 1.2.3-2 LGPL Crypto library - runtime libr
ii libgpg-e 1.4-2 library for common error values an
ii libpopt0 1.10-3 lib for parsing cmdline parameters
ii libuuid1 1.39+1.40-WIP-2006.11.14+dfsg-1 universally unique id library
cryptsetup recommends no packages.
-- no debconf information
[config-2.6.19.2-asso-50 (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #10 received at 409875@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
after catching a little sleep I made a stacktrace of the cryptsetup call in my
initial mail. It is attached.
I think the Problem is in line 105 of the trace, since I do not have much
knowledge about devicemapper internas I am not able to see what is going wrong
exactly.
regards,
Johannes
[trace (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #15 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
and thanks for the trace, the problem is indeed here:
>ioctl(3, DM_TABLE_LOAD, 0x80a2040) = -1 EINVAL (Invalid argument)
that means that "crypt" is not a valid device-mapper target.
That in turn means that dm-crypt was not loaded and could not be
dynamically loaded by the kernel.
Could you please verify this by trying to run "modprobe dm-crypt"
and make sure that the dm-crypt module is loaded (check with "lsmod").
--
David Härdeman
Message sent on to Johannes Schlumberger <paso.asso@uni.de>:
Bug#409875.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #23 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> and thanks for the trace, the problem is indeed here:
> >ioctl(3, DM_TABLE_LOAD, 0x80a2040) = -1 EINVAL (Invalid argument)
>
> that means that "crypt" is not a valid device-mapper target.
>
> That in turn means that dm-crypt was not loaded and could not be
> dynamically loaded by the kernel.
As you should be able to observe from my sent kernel config i have built
dm_crypt into the kernel, therefore it cannot (and has not to) be loaded
as a module.
regards,
Johannes
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message sent on to Johannes Schlumberger <paso.asso@uni.de>:
Bug#409875.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #36 received at 409875@bugs.debian.org (full text, mbox, reply):
On Tue, Feb 06, 2007 at 11:02:21PM +0100, Johannes Schlumberger wrote:
>Hi,
>
>> and thanks for the trace, the problem is indeed here:
>> >ioctl(3, DM_TABLE_LOAD, 0x80a2040) = -1 EINVAL (Invalid argument)
>>
>> that means that "crypt" is not a valid device-mapper target.
>>
>> That in turn means that dm-crypt was not loaded and could not be
>> dynamically loaded by the kernel.
>
>As you should be able to observe from my sent kernel config i have built
>dm_crypt into the kernel, therefore it cannot (and has not to) be loaded
>as a module.
Sorry, I missed the attached kernel config.
Unfortunately I am not able to reproduce this. Using a qemu machine with
two virtual disks in a RAID set, the crypt mapping is setup correctly.
If I do make sure that the dm-crypt.ko module is not available, the
error messages and strace exactly match yours.
What output do you get from "dmsetup targets"?
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #41 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Unfortunately I am not able to reproduce this. Using a qemu machine with
> two virtual disks in a RAID set, the crypt mapping is setup correctly.
>
> If I do make sure that the dm-crypt.ko module is not available, the
> error messages and strace exactly match yours.
>
> What output do you get from "dmsetup targets"?
[00:50:29][root@asso:/home/spjsschl]# dmsetup targets
crypt v1.3.0
striped v1.0.2
linear v1.0.2
error v1.0.1
regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #46 received at 409875@bugs.debian.org (full text, mbox, reply):
On Wed, Feb 07, 2007 at 12:51:52AM +0100, Johannes Schlumberger wrote:
>Hi,
>
>> Unfortunately I am not able to reproduce this. Using a qemu machine with
>> two virtual disks in a RAID set, the crypt mapping is setup correctly.
>>
>> If I do make sure that the dm-crypt.ko module is not available, the
>> error messages and strace exactly match yours.
>>
>> What output do you get from "dmsetup targets"?
>
>[00:50:29][root@asso:/home/spjsschl]# dmsetup targets
>crypt v1.3.0
>striped v1.0.2
>linear v1.0.2
>error v1.0.1
Ok, could you create a file called e.g. "map" containing the following line:
0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0 /dev/md0 0
then run "dmsetup create root map" and see if that fails?
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #51 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Ok, could you create a file called e.g. "map" containing the following line:
> 0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0
> /dev/md0 0
shure.
[22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
[22:28:46][root@asso:/tmp]# dmsetup create root map
device-mapper: reload ioctl failed: Invalid argument
Command failed
the dmesg output differs though, its missing one line.
[22:28:57][root@asso:/tmp]# dmesg | tail -n 3
agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
device-mapper: table: 253:2: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #56 received at 409875@bugs.debian.org (full text, mbox, reply):
On Wed, Feb 07, 2007 at 10:31:27PM +0100, Johannes Schlumberger wrote:
>Hi,
>> Ok, could you create a file called e.g. "map" containing the following line:
>> 0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0
>> /dev/md0 0
>
>shure.
>[22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
>0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
>[22:28:46][root@asso:/tmp]# dmsetup create root map
>device-mapper: reload ioctl failed: Invalid argument
>Command failed
This would suggest that the problem is not with cryptsetup at least.
Something seems wonky with device-mapper in general.
I've updated the testing machine I was using so that it has the same
package versions as your machine and it still works for me.
Just to make sure, do you think you could install the Debian packaged
kernel, boot it and try to setup the mapping with that kernel? (but do
the things mentioned below first)
>the dmesg output differs though, its missing one line.
>
>[22:28:57][root@asso:/tmp]# dmesg | tail -n 3
>agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
>device-mapper: table: 253:2: crypt: Device lookup failed
>device-mapper: ioctl: error adding target to table
If it tries to setup 253:2, that suggests that there are two other
device-mapper devices already setup...what is the output of "ls -al
/dev/mapper", "dmsetup table" and "cat /proc/mounts"? Also, are you
using udev?
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #61 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> This would suggest that the problem is not with cryptsetup at least.
> Something seems wonky with device-mapper in general.
Whom should I be talking to about this?
> Just to make sure, do you think you could install the Debian packaged
> kernel, boot it and try to setup the mapping with that kernel?
I still get an error.
[23:18:42][root@asso:~]# uname -r
2.6.18-4-486
[23:18:47][root@asso:~]# apt-cache policy linux-image-2.6.18-4-486
linux-image-2.6.18-4-486:
Installed: 2.6.18.dfsg.1-10
Candidate: 2.6.18.dfsg.1-10
Version table:
*** 2.6.18.dfsg.1-10 0
500 http://debian.informatik.uni-erlangen.de sid/main Packages
100 /var/lib/dpkg/status
[23:19:02][root@asso:~]# modprobe dm-crypt
[23:19:14][root@asso:~]# lsmod | grep !$
lsmod | grep dm-crypt
[23:19:19][root@asso:~]# lsmod | grep dm_crypt
dm_crypt 10888 1
dm_mod 48952 7 dm_crypt,dm_snapshot,dm_mirror
[23:19:29][root@asso:~]# cryptsetup -c aes -s 256 -d /dev/stdin create root /dev/md0 </key
Command failed: device-mapper: reload ioctl failed: Invalid argument
[23:19:36][root@asso:~]# dmesg | tail -n 3
device-mapper: table: 253:2: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
device-mapper: ioctl: device doesn't appear to be in the dev hash table.
[23:19:42][root@asso:~]#
> If it tries to setup 253:2, that suggests that there are two other
> device-mapper devices already setup...what is the output of "ls -al
> /dev/mapper", "dmsetup table" and "cat /proc/mounts"? Also, are you
> using udev?
That is right, my two encrypted swappartitions.
[23:21:59][spjsschl@asso:~]$ ls -al /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 2007-02-07 23:21 .
drwxr-xr-x 14 root root 4520 2007-02-07 23:21 ..
crw-rw---- 1 root root 10, 63 2007-02-08 00:21 control
brw-rw---- 1 root disk 253, 0 2007-02-07 23:21 swap1
brw-rw---- 1 root disk 253, 1 2007-02-07 23:21 swap2
[23:23:52][spjsschl@asso:~]$ su
Password:
[23:24:04][root@asso:/home/spjsschl]# dmsetup table
swap2: 0 995967 crypt aes-cbc-plain
8fd07cf5cecac858cdd2c0ce673449b4c1734cecbe8a24e5be629d542c975cf1 0 22:5 0
swap1: 0 6458067 crypt aes-cbc-plain
dde5fec1ee7146100bc83af997171ce196c2d1c453134d21e574f85ccc296588 0 22:65 0
[23:24:11][root@asso:/home/spjsschl]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
/dev/root /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /dev tmpfs rw 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
/dev/hdc6 /home/spjsschl/data-scratch xfs rw 0 0
/dev/hdc3 /home/spjsschl/c vfat
rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1 0 0
/dev/hdc2 /home/spjsschl/winspace ext3 rw,data=ordered 0 0
none /tmp tmpfs rw 0 0
none /var/tmp tmpfs rw 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
I am using udev.
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #66 received at 409875@bugs.debian.org (full text, mbox, reply):
On Wed, Feb 07, 2007 at 11:26:16PM +0100, Johannes Schlumberger wrote:
>Hi,
>> This would suggest that the problem is not with cryptsetup at least.
>> Something seems wonky with device-mapper in general.
>
>Whom should I be talking to about this?
That would be the dmsetup package maintainer, but lets keep at it for a
while before we call him in
>> If it tries to setup 253:2, that suggests that there are two other
>> device-mapper devices already setup...what is the output of "ls -al
>> /dev/mapper", "dmsetup table" and "cat /proc/mounts"? Also, are you
>> using udev?
>
>That is right, my two encrypted swappartitions.
>...
>[23:24:04][root@asso:/home/spjsschl]# dmsetup table
>swap2: 0 995967 crypt aes-cbc-plain
>8fd07cf5cecac858cdd2c0ce673449b4c1734cecbe8a24e5be629d542c975cf1 0 22:5 0
>swap1: 0 6458067 crypt aes-cbc-plain
>dde5fec1ee7146100bc83af997171ce196c2d1c453134d21e574f85ccc296588 0 22:65 0
Which devices are 22:5 and 22:65? I'm guessing /dev/hdc5 and /dev/hdd2?
Could you provide me with the output from "ls -al /dev/hd*" and "fdisk -l
/dev/hd?"
(BTW, the above keys are random keys, right?)
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #71 received at 409875@bugs.debian.org (full text, mbox, reply):
On Wed, Feb 07, 2007 at 11:26:16PM +0100, Johannes Schlumberger wrote:
>[23:24:11][root@asso:/home/spjsschl]# cat /proc/mounts
>rootfs / rootfs rw 0 0
>/dev/root / ext3 rw,data=ordered 0 0
Also...which device is / on? I.e. /dev/root is an alias of
/dev/hd<what>?
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #76 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> >[23:24:04][root@asso:/home/spjsschl]# dmsetup table
> >swap2: 0 995967 crypt aes-cbc-plain
> >8fd07cf5cecac858cdd2c0ce673449b4c1734cecbe8a24e5be629d542c975cf1 0 22:5 0
> >swap1: 0 6458067 crypt aes-cbc-plain
> >dde5fec1ee7146100bc83af997171ce196c2d1c453134d21e574f85ccc296588 0 22:65 0
> Which devices are 22:5 and 22:65? I'm guessing /dev/hdc5 and /dev/hdd2?
hdc5 and hdd1.
> Could you provide me with the output from "ls -al /dev/hd*" and "fdisk -l
> /dev/hd?"
[00:18:00][root@asso:/home/spjsschl]# ls -al /dev/hd*
brw-rw---- 1 root cdrom 3, 0 2007-02-08 00:21 /dev/hda
brw-rw---- 1 root cdrom 3, 64 2007-02-08 00:21 /dev/hdb
brw-rw---- 1 root disk 22, 0 2007-02-08 00:21 /dev/hdc
brw-rw---- 1 root disk 22, 1 2007-02-08 00:21 /dev/hdc1
brw-rw---- 1 root disk 22, 2 2007-02-07 23:21 /dev/hdc2
brw-rw---- 1 root disk 22, 3 2007-02-08 00:21 /dev/hdc3
brw-rw---- 1 root disk 22, 4 2007-02-08 00:21 /dev/hdc4
brw-rw---- 1 root disk 22, 5 2007-02-08 00:21 /dev/hdc5
brw-rw---- 1 root disk 22, 6 2007-02-08 00:21 /dev/hdc6
brw-rw---- 1 root disk 22, 64 2007-02-08 00:21 /dev/hdd
brw-rw---- 1 root disk 22, 65 2007-02-08 00:21 /dev/hdd1
brw-rw---- 1 root disk 22, 66 2007-02-08 00:21 /dev/hdd2
brw-rw---- 1 root disk 22, 69 2007-02-08 00:21 /dev/hdd5
brw-rw---- 1 root disk 22, 70 2007-02-08 00:21 /dev/hdd6
[00:18:25][root@asso:/home/spjsschl]# fdisk -l /dev/hd?
Disk /dev/hdc: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 1 2433 19543041 fd Linux raid autodetect
/dev/hdc2 2434 3650 9775552+ 83 Linux
/dev/hdc3 * 3651 4867 9775552+ c W95 FAT32 (LBA)
/dev/hdc4 4868 19929 120985515 5 Extended
/dev/hdc5 4868 4929 497983+ 82 Linux swap / Solaris
/dev/hdc6 4930 19929 120487468+ 83 Linux
Disk /dev/hdd: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 * 1 402 3229033+ 82 Linux swap / Solaris
/dev/hdd2 403 14593 113989207+ f W95 Ext'd (LBA)
/dev/hdd5 * 403 2952 20482843+ fd Linux raid autodetect
/dev/hdd6 2953 14592 93498268+ 83 Linux
> (BTW, the above keys are random keys, right?)
Hehe, of course :-)
regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #81 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Also...which device is / on? I.e. /dev/root is an alias of
> /dev/hd<what>?
It is hdd6 at the moment, i am going to copy it back to md0 once i got the
cryptlayer on it working.
regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #86 received at 409875@bugs.debian.org (full text, mbox, reply):
Ok, one more test...could you deallocate both swap mappings and then try
to setup your root mapping?
That is, run something like
"swapoff -a && cryptsetup remove swap1 && cryptsetup remove swap2"
and then try the "cryptsetup create..." invocation
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #91 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Ok, one more test...could you deallocate both swap mappings and then try
> to setup your root mapping?
[01:49:28][root@asso:/home/spjsschl]# swapoff -a && cryptsetup remove swap1 &&
cryptsetup remove swap2 && cryptsetup -c aes -s 256 -d /dev/stdin create root
/dev/md0 </key
Command failed: device-mapper: reload ioctl failed: Invalid argument
[01:49:42][root@asso:/home/spjsschl]# dmesg | tail -n 3
device-mapper: table: 253:0: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
device-mapper: ioctl: device doesn't appear to be in the dev hash table.
[01:49:49][root@asso:/home/spjsschl]# cat /proc/swaps
[01:49:56][root@asso:/home/spjsschl]# ls -al /dev/mapper/
total 0
drwxr-xr-x 2 root root 60 2007-02-08 01:49 .
drwxr-xr-x 14 root root 4480 2007-02-08 01:49 ..
crw-rw---- 1 root root 10, 63 2007-02-08 00:21 control
regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #96 received at 409875@bugs.debian.org (full text, mbox, reply):
On Thu, Feb 08, 2007 at 01:49:35AM +0100, David Härdeman wrote:
>Ok, one more test...could you deallocate both swap mappings and then try
>to setup your root mapping?
>
>That is, run something like
>"swapoff -a && cryptsetup remove swap1 && cryptsetup remove swap2"
>
>and then try the "cryptsetup create..." invocation
And while we're at it, "cat /proc/partitions" to make sure that the
kernel and fdisk agree on partition sizes.
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #101 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> And while we're at it, "cat /proc/partitions" to make sure that the
> kernel and fdisk agree on partition sizes.
[01:53:38][root@asso:/home/spjsschl]# cat /proc/partitions
major minor #blocks name
22 0 160086528 hdc
22 1 19543041 hdc1
22 2 9775552 hdc2
22 3 9775552 hdc3
22 4 1 hdc4
22 5 497983 hdc5
22 6 120487468 hdc6
22 64 117220824 hdd
22 65 3229033 hdd1
22 66 1 hdd2
22 69 20482843 hdd5
22 70 93498268 hdd6
9 0 19542976 md0
253 0 3229033 dm-0
253 1 497983 dm-1
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #106 received at 409875@bugs.debian.org (full text, mbox, reply):
On Wed, February 7, 2007 22:31, Johannes Schlumberger said:
> Hi,
>> Ok, could you create a file called e.g. "map" containing the following
>> line:
>> 0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0
>> /dev/md0 0
>
> shure.
> [22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
> 0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
> [22:28:46][root@asso:/tmp]# dmsetup create root map
> device-mapper: reload ioctl failed: Invalid argument
> Command failed
Could you try this again with a couple of "-v" arguments added to the
dmsetup command -> "dmsetup -v -v -v -v -v -v -v -v -v -v create root map"
and see if you get some additional output?
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #111 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> > [22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
> > 0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
> > [22:28:46][root@asso:/tmp]# dmsetup create root map
> > device-mapper: reload ioctl failed: Invalid argument
> > Command failed
>
> Could you try this again with a couple of "-v" arguments added to the
> dmsetup command -> "dmsetup -v -v -v -v -v -v -v -v -v -v create root map"
> and see if you get some additional output?
[19:51:19][root@asso:/tmp]# dmsetup -v -v -v -v -v -v -v -v -v -v create root \
map
dm version OF [16384]
dm create root OF [16384]
dm reload root OF [16384]
device-mapper: reload ioctl failed: Invalid argument
dm remove root OF [16384]
Command failed
[19:51:22][root@asso:/tmp]# cat map
0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0 /dev/md0 0
Sorry for the delay, I was stuck at university and my PC at home was not
running.
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #116 received at 409875@bugs.debian.org (full text, mbox, reply):
On Thu, Feb 08, 2007 at 07:52:53PM +0100, Johannes Schlumberger wrote:
>Hi,
>> > [22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
>> > 0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
>> > [22:28:46][root@asso:/tmp]# dmsetup create root map
>> > device-mapper: reload ioctl failed: Invalid argument
>> > Command failed
>>
>> Could you try this again with a couple of "-v" arguments added to the
>> dmsetup command -> "dmsetup -v -v -v -v -v -v -v -v -v -v create root map"
>> and see if you get some additional output?
>
>[19:51:19][root@asso:/tmp]# dmsetup -v -v -v -v -v -v -v -v -v -v create root \
>map
>dm version OF [16384]
>dm create root OF [16384]
>dm reload root OF [16384]
>device-mapper: reload ioctl failed: Invalid argument
>dm remove root OF [16384]
>Command failed
>[19:51:22][root@asso:/tmp]# cat map
>0 10000 crypt aes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0 /dev/md0 0
Hmm...do you know how to build debian packages from source?
It would be great if you could download the devmapper source package
("apt-get source libdevmapper1.02"), edit the file
devmapper-1.02.12/lib/ioctl/libdm-iface.c and add the line:
"fwrite(dmi, dmi->data_size, 1, stderr);"
at line 1553 (just before the "log_debug" statement).
Then build it ("dpkg-buildpackage -us -uc -rfakeroot"), install the
generated debs and try to run dmsetup again (without the -v flags).
Capture stderr to a file and mail it to me (it will contain the
passphrase you used, but for this test that would just be the dummy pass
from the map file).
The command to execute would be:
"dmsetup create root map 2> /tmp/dmsetup.stderr"
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #121 received at 409875@bugs.debian.org (full text, mbox, reply):
On Thu, Feb 08, 2007 at 10:51:50PM +0100, Johannes Schlumberger wrote:
>I built the packages and installed them.
>The attached file contains the generated stderr stream (which looks a bit
>strange to me). Just to make shure, here is also the output generated from the
>command without the redirection.
The stderr stream is fine. When you run it without redirection, bash
will helpfully mask the null characters that are printed (which is not
done when they are redirected to a file).
However, everything looks ok after studying that file, the first two
ioctl's are executed (i.e. the device-mapper version is checked and the
"root" mapping name is reserved).
Then when it is time to pass the actual parameters for the mapping using
the "reload" ioctl, everything goes south. I'm quickly running out of
ideas what might cause this or what the best way to debug it would be.
So I'm CC:ing this mail to some different people with the hope that
someone other than me can spot the error.
Quoting from previous mails:
> [04:11:35][root@asso:/home/spjsschl]# cryptsetup -c aes -s 256 -d /dev/stdin
> create root /dev/md0 < /key
> Command failed: device-mapper: reload ioctl failed: Invalid argument
>
> [04:12:57][root@asso:/home/spjsschl]# dmesg | tail -n 3
> device-mapper: table: 253:2: crypt: Device lookup failed
> device-mapper: ioctl: error adding target to table
> device-mapper: ioctl: device doesn't appear to be in the dev hash table.
>
> [22:28:31][root@asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
> 0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
> [22:28:46][root@asso:/tmp]# dmsetup create root map
> device-mapper: reload ioctl failed: Invalid argument Command failed
Executive summary:
dmsetup / cryptsetup both fail to create a mapping on top of a raid
device (/dev/md0 in this case).
For much more details, see the bug report, any help appreciated:
http://bugs.debian.org/409875
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #126 received at 409875@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
I built the packages and installed them.
The attached file contains the generated stderr stream (which looks a bit
strange to me). Just to make shure, here is also the output generated from the
command without the redirection.
[22:48:05][root@asso:/tmp]# dmsetup create root map
@4@4root@4root'lcryptaes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0
/dev/md0 0device-mapper: reload ioctl failed: Invalid argument
@4root'lcryptaes-cbc-essiv:sha256 0123456789abcdef0123456789abcdef 0 /dev/md0
0Command failed
regards,
Johannes
[stderr.out (application/octet-stream, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #131 received at 409875@bugs.debian.org (full text, mbox, reply):
Executive summary:
dmsetup / cryptsetup both fail to create a mapping on top of a raid
device (/dev/md0 in this case).
For much more details, see the bug report, any help appreciated as I'm out
of ideas on how to diagnose the error:
http://bugs.debian.org/409875
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to Loïc Minier <lool+alioth@via.ecp.fr>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #136 received at 409875@bugs.debian.org (full text, mbox, reply):
On Thu, Feb 08, 2007, David Härdeman wrote:
> dmsetup / cryptsetup both fail to create a mapping on top of a raid
> device (/dev/md0 in this case).
I don't know where the error lies, but I created two loop devices loop0
and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
the resulting md0 successfully.
bee:~# dmsetup ls
...
crypt0 (253, 6)
bee:~# dmsetup table crypt0
0 65408 crypt aes-cbc-plain
42cfa211018ea492fdee45ac637b7972a0ad687380f9a6d0484900ad8cca2d8f 0 9:0
0
bee:~# mdadm --detail /dev/md0
...
Number Major Minor RaidDevice State
0 7 0 0 active sync /dev/loop0
1 7 1 1 active sync /dev/loop1
--
Loïc Minier <lool@dooz.org>
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #141 received at 409875@bugs.debian.org (full text, mbox, reply):
On Fri, February 9, 2007 11:45, Loic Minier said:
> On Thu, Feb 08, 2007, David Härdeman wrote:
>> dmsetup / cryptsetup both fail to create a mapping on top of a raid
>> device (/dev/md0 in this case).
>
> I don't know where the error lies, but I created two loop devices loop0
> and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
> the resulting md0 successfully.
Ditto. I've succesfully setup a crypto mapping on a raid1 device under
qemu, which leads me to believe that it is something specific to Johannes
setup.
So I'm hoping that someone will come up with some suggestions on how to
troubleshoot it further on his machine.
(This is my last cross-post on this subject, I promise, please keep
further discussions to the bug report address only -
409875@bugs.debian.org)
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #146 received at 409875@bugs.debian.org (full text, mbox, reply):
On Thu, February 8, 2007 22:51, Johannes Schlumberger said:
> I built the packages and installed them.
> The attached file contains the generated stderr stream (which looks a bit
> strange to me). Just to make shure, here is also the output generated from
> the command without the redirection.
Could you build a new kernel which includes the patch attached to bug
report #304507 and try again?
http://bugs.debian.org/cgi-bin/bugreport.cgi/2.6-bd-claim.patch?bug=304507;msg=5;att=1
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #151 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> > I don't know where the error lies, but I created two loop devices loop0
> > and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
> > the resulting md0 successfully.
>
> Ditto. I've succesfully setup a crypto mapping on a raid1 device under
> qemu, which leads me to believe that it is something specific to Johannes
> setup.
I have tried and I can successfully run cryptsetup on another raiddevice (md1)
made from loopdevices without any problems.
best regars,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #156 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Could you build a new kernel which includes the patch attached to bug
> report #304507 and try again?
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi/2.6-bd-claim.patch?bug=304507;msg=5;att=1
It sems the same to me. This is kernel -asso-50 (I attached the config to the
inital bugreport mail) with the above patch applied.
[14:36:53][root@asso:/home/spjsschl]# cryptsetup -c aes -s 256 -d /dev/stdin
create root /dev/md0 </key
Command failed: device-mapper: reload ioctl failed: Invalid argument
[14:37:06][root@asso:/home/spjsschl]# dmesg | tail -n 3
device-mapper: table: 253:2: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
device-mapper: ioctl: device doesn't appear to be in the dev hash table.
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #161 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
I just want to point out, so far after each test I brought the system back
into the beginning state (kernel, dmsetup-package, etc).
regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to Henrique de Moraes Holschuh <hmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #166 received at 409875@bugs.debian.org (full text, mbox, reply):
On Fri, 09 Feb 2007, David Härdeman wrote:
> > On Thu, Feb 08, 2007, David Härdeman wrote:
> >> dmsetup / cryptsetup both fail to create a mapping on top of a raid
> >> device (/dev/md0 in this case).
> >
> > I don't know where the error lies, but I created two loop devices loop0
> > and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
> > the resulting md0 successfully.
>
> Ditto. I've succesfully setup a crypto mapping on a raid1 device under
> qemu, which leads me to believe that it is something specific to Johannes
> setup.
Warning: It is not safe on all kernels out there, due to kernel bugs. See
recent flow of patches from the md maintainer in LKML. I don't know if they
all landed on 2.6.16.y and 2.6.19.y and 2.6.20 yet.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #171 received at 409875@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
> > I just want to point out, so far after each test I brought the system back
> > into the beginning state (kernel, dmsetup-package, etc).
>
> Yes, that's good.
I just wanted to make shure, we are stil talking about the same setup :)
> Could you please try a new compile, this time, skip the previously
> mentioned patch and instead do the following changes:
>
> In fs/block_dev.c, add the following at the end of the function bd_claim()
> (just before the return):
>
> printk("claim: %d:%d %p -> %d\n",
> MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev), holder, res);
>
> In the same file, add to the end of the function bd_release():
>
> printk("release: %d:%d\n",
> MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev));
>
> Recompile, install, reboot, try cryptsetup, and then send me the entire
> dmesg output
It is attached; the way I see it, 9:0 is claimed during the setup of the
md-device but never released.
regarrds,
Johannes
[dmesg (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #176 received at 409875@bugs.debian.org (full text, mbox, reply):
On Fri, February 9, 2007 14:42, Johannes Schlumberger said:
> Hi,
> I just want to point out, so far after each test I brought the system back
> into the beginning state (kernel, dmsetup-package, etc).
Yes, that's good.
Could you please try a new compile, this time, skip the previously
mentioned patch and instead do the following changes:
In fs/block_dev.c, add the following at the end of the function bd_claim()
(just before the return):
printk("claim: %d:%d %p -> %d\n",
MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev), holder, res);
In the same file, add to the end of the function bd_release():
printk("release: %d:%d\n",
MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev));
Recompile, install, reboot, try cryptsetup, and then send me the entire
dmesg output
--
David Härdeman
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #181 received at 409875@bugs.debian.org (full text, mbox, reply):
On Fri, February 9, 2007 16:58, Johannes Schlumberger said:
>> Could you please try a new compile, this time, skip the previously
>> mentioned patch and instead do the following changes:
>>
>> In fs/block_dev.c, add the following at the end of the function
>> bd_claim()
>> (just before the return):
>>
>> printk("claim: %d:%d %p -> %d\n",
>> MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev), holder, res);
>>
>> In the same file, add to the end of the function bd_release():
>>
>> printk("release: %d:%d\n",
>> MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev));
>>
>> Recompile, install, reboot, try cryptsetup, and then send me the entire
>> dmesg output
>
> It is attached; the way I see it, 9:0 is claimed during the setup of the
> md-device but never released.
Yes, that indeed seems to be the problem (which is why we tried this
debugging output)...and later device-mapper tries to claim md0 again as it
tries to setup the crypto mapping. Which fails. What bothers me though is
that the previous patch that we tried should have allowed such situations,
I might have to take another look at it.
Meanwhile, could you add the following to the above mentioned debugging
output:
printk("dumping stack for %s:\n", current->comm);
dump_stack();
(right after the above printk in bd_claim())
And then send another dmesg this way...this should tell us which
process/kernel thread it is that locks md0...
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #186 received at 409875@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
> Meanwhile, could you add the following to the above mentioned debugging
> output:
>
> printk("dumping stack for %s:\n", current->comm);
> dump_stack();
>
> (right after the above printk in bd_claim())
>
> And then send another dmesg this way...this should tell us which
> process/kernel thread it is that locks md0...
As it turns out, dmesg is to small, so i have attached the relevant part of my
syslog file.
regards,
Johannes
[syslog (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #191 received at 409875@bugs.debian.org (full text, mbox, reply):
On Fri, Feb 09, 2007 at 07:35:46PM +0100, Johannes Schlumberger wrote:
>Hi,
>
>> Meanwhile, could you add the following to the above mentioned debugging
>> output:
>>
>> printk("dumping stack for %s:\n", current->comm);
>> dump_stack();
>>
>> (right after the above printk in bd_claim())
>>
>> And then send another dmesg this way...this should tell us which
>> process/kernel thread it is that locks md0...
>
>As it turns out, dmesg is to small, so i have attached the relevant part of my
>syslog file.
Thanks, this looks mighty suspicious...it looks like /dev/md0 is mounted
as your root partition by the initramfs? Please provide me with "ls -al
/dev/root" and "cat /proc/cmdline" as well as the contents of your grub
or lilo config file.
--
David Härdeman
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to asso@doriath.informatik.uni-erlangen.de (Johannes Schlumberger):
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #196 received at 409875@bugs.debian.org (full text, mbox, reply):
Hi,
> Thanks, this looks mighty suspicious...it looks like /dev/md0 is mounted
> as your root partition by the initramfs? Please provide me with "ls -al
> /dev/root" and "cat /proc/cmdline" as well as the contents of your grub
> or lilo config file.
I am so sorry for stealing yours and other persons time like this. I had
root=/dev/md0 in my menu.lst and / as /dev/hdd6 in my fstab. I have to say I am
strongly embarassed.
Thank you a lot for figuring this out and all your patience.
best regards,
Johannes
Information forwarded to debian-bugs-dist@lists.debian.org, Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>:
Bug#409875; Package cryptsetup.
(full text, mbox, link).
Acknowledgement sent to David Härdeman <david@hardeman.nu>:
Extra info received and forwarded to list. Copy sent to Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>.
(full text, mbox, link).
Message #201 received at 409875@bugs.debian.org (full text, mbox, reply):
reassign 409875 libdevmapper1.02
retitle 409875 libdevmapper should provide more helpful error messages
severity 409875 minor
thanks
On Fri, Feb 09, 2007 at 09:44:32PM +0100, Johannes Schlumberger wrote:
>> Thanks, this looks mighty suspicious...it looks like /dev/md0 is mounted
>> as your root partition by the initramfs? Please provide me with "ls -al
>> /dev/root" and "cat /proc/cmdline" as well as the contents of your grub
>> or lilo config file.
>
>I am so sorry for stealing yours and other persons time like this. I had
>root=/dev/md0 in my menu.lst and / as /dev/hdd6 in my fstab. I have to say I am
>strongly embarassed.
No problem, it happends to all of us. There still is a bug here
though...the error messages from libdevmapper are obtuse to say the
least.
libdevmapper explained that /dev/md0 is in use with the message:
"Command failed: device-mapper: reload ioctl failed: Invalid argument"
That is a bug in my book.
I'll reassign this bug to libdevmapper (and retitle it accordingly).
I'll also CC all people that I've bugged earlier so that they know that
this issue is no more.
>Thank you a lot for figuring this out and all your patience.
That's ok, you just owe me a beer.
--
David Härdeman
Changed Bug title.
Request was from David Härdeman <david@hardeman.nu>
to control@bugs.debian.org.
(full text, mbox, link).
Severity set to `minor' from `important'
Request was from David Härdeman <david@hardeman.nu>
to control@bugs.debian.org.
(full text, mbox, link).
Bug reassigned from package 'src:devmapper' to 'src:lvm2'.
Request was from Andreas Beckmann <anbe@debian.org>
to control@bugs.debian.org.
(Tue, 30 Jun 2015 05:13:01 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Aug 20 18:09:36 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.