Description of problem: When the following is executed in a script and the password is manually typed there is no error. EF=encrypted_file LP=`losetup -f` losetup ${LP} /tmp/${EF} cryptsetup luksOpen ${LP} ${EF} cryptsetup luksClose ${EF} losetup -d ${LP} When the following is executed in a script and the password is piped to cryptsetup an error occurs when the loop device is deleted (ioctl: LOOP_CLR_FD: Device or resource busy). Each failure leaves the loop device busy and unusable. PW=TESTING123 EF=encrypted_file LP=`losetup -f` losetup ${LP} /tmp/${EF} echo ${PW} | cryptsetup luksOpen ${LP} ${EF} cryptsetup luksClose ${EF} losetup -d ${LP} Version-Release number of selected component (if applicable): cryptsetup 1.0.3 How reproducible: Test script in attachment always fails on FC6. Test script in attachment never fails on FC5. Steps to Reproduce: With test_script.sh from attachment. 1. ./test_script.sh setup 2. ./test_script.sh pass - No error is produced. 3. ./test_script.sh fail - Produces error. Actual results: ./test_script.sh fail ioctl:LOOP_CLR_FD: Device or resource busy Expected results: No losetup -d error when password is piped to cryptsetup Additional info: I think this is a timing or race condition involving dm-crypt, the device mapper, and luks-cryptsetup. Since this fails on a 32-bit AMD system and a 64-bit AMD system, I believe the problem can be created fairly easily on comparable hardware. In any case adding a sleep(1) at the beginning of main() in cryptsetup.c that causes the problem to go away tells me something very bogus is going on somewhere.
Created attachment 141320 [details] Testing details and a test script to produce problem.
Comment on attachment 141320 [details] Testing details and a test script to produce problem. >When the following is executed in a script and the password >is manually typed there is no error. > >EF=encrypted_file >LP=`losetup -f` >losetup ${LP} /tmp/${EF} >cryptsetup luksOpen ${LP} ${EF} >cryptsetup luksClose ${EF} >losetup -d ${LP} > >When the following is executed in a script and the password >is piped to cryptsetup an error occurs when the loop device >is deleted (ioctl: LOOP_CLR_FD: Device or resource busy). >Each failure leaves the loop device busy and unusable. > >PW=TESTING123 >EF=encrypted_file >LP=`losetup -f` >losetup ${LP} /tmp/${EF} >echo ${PW} | cryptsetup luksOpen ${LP} ${EF} >cryptsetup luksClose ${EF} >losetup -d ${LP} > >I do not have the problem with FC5. When I installed FC6, scripts I >use for making encrypted backups failed. In an attempt to isolate the >problem I wrote a test script. The script will produce a pass or fail >case that leads me to believe the problem involves timing. I have run >the script on three FC5 systems. I never get FC5 to fail. I have run >the script on two FC6 systems and can produce pass and fail cases at >will. The slower FC6 system requires a higher delay loop iteration >count in the test program created by the script than does the faster >FC6 system. > >The following are snipets from a diff of the strace output of a fail >and a pass run of the script. > >diff /tmp/fail /tmp/pass > >172c172 >< mknod("/dev/mapper/temporary-cryptsetup-10190", S_IFBLK|0660, makedev(253, 2)) = 0 >--- >> mknod("/dev/mapper/temporary-cryptsetup-10150", S_IFBLK|0660, makedev(253, 2)) = 0 > > >491c491 >< mknod("/dev/mapper/encrypted_file", S_IFBLK|0660, makedev(253, 3)) = 0 >--- >> mknod("/dev/mapper/encrypted_file", S_IFBLK|0660, makedev(253, 2)) = 0 > >Every failure case exhibits a makedev with the minor number one higher in >the second mknod as compared to the first. > >I downloaded the 1.0.3 and 1.0.4 sources for cryptsetup. Both versions >made from source fail just like the FC6 rpm version (1.0.3). > >I poked around and found a very strange thing. If a sleep(1) is inserted >at the beginning of main() in cryptsetup.c the problem goes away. I can >repeatly run the test script looking for a failure (./test_script.sh fail) >and with the sleep(1) there are no failures. > >I changed cryptsetup.c as follows: > >397a398,400 >> r=1; >> sleep(r); >> > >The above change results in no failures for the test. > >I changed cryptsetup.c as follows: > >397a398,400 >> r=1; >> sleep(--r); >> > >The above change results in all failures for the test. > >It appears that time or timing is at the heart of the problem. > >---------------------------------------------------------------------- >TEST USING SCRIPT > >root@opus ~]# ./test_script.sh setup >10000+0 records in >10000+0 records out >10240000 bytes (10 MB) copied, 0.0713457 seconds, 144 MB/s >Command successful. >key slot 0 unlocked. >Command successful. >mke2fs 1.39 (29-May-2006) >Filesystem label= >OS type: Linux >Block size=1024 (log=0) >Fragment size=1024 (log=0) >2384 inodes, 9484 blocks >474 blocks (5.00%) reserved for the super user >First data block=1 >Maximum filesystem blocks=9961472 >2 block groups >8192 blocks per group, 8192 fragments per group >1192 inodes per group >Superblock backups stored on blocks: > 8193 > >Writing inode tables: done >Creating journal (1024 blocks): done >Writing superblocks and filesystem accounting information: done > >This filesystem will be automatically checked every 22 mounts or >180 days, whichever comes first. Use tune2fs -c or -i to override. > >[root@opus ~]# ./test_script.sh pass >key slot 0 unlocked. >Command successful. >brw-rw---- 1 root disk 253, 0 Nov 15 13:01 /dev/mapper/encrypted_file >PASSED >/dev/loop0 > >[root@opus ~]# ./test_script.sh fail >key slot 0 unlocked. >Command successful. >brw-rw---- 1 root disk 253, 1 Nov 15 13:01 /dev/mapper/encrypted_file >ioctl: LOOP_CLR_FD: Device or resource busy >FAILED >/dev/loop1 > >--------------------------------------------------------------------- > >test_script.sh FOLLOWS: > > >#!/bin/sh >################### See Comments Below #################### >make_slow_down_the_pipe() >{ >#::#include <stdio.h> >#::int >#::main() >#::{ >#:: int c, cnt; >#:: >#:: while ((c=getc(stdin)) != EOF) { >#:: for(cnt=0;cnt<80000000;cnt++); >#:: putc(c,stdout); >#:: } >#::} > cat ${0} |grep "#::"|grep -v grep| cut -b4-72 > /tmp/slow_down_the_pipe.c > cc /tmp/slow_down_the_pipe.c -o /tmp/sdtp >} > >make_the_encrypted_stuff() >{ > PW=TESTING123 > dd if=/dev/zero of=/tmp/encrypted_file bs=1024 count=10000 > LD=`losetup -f` > losetup $LD /tmp/encrypted_file > echo $PW |/tmp/sdtp| cryptsetup luksFormat $LD > echo $PW |/tmp/sdtp| cryptsetup luksOpen $LD encrypted_file > mkfs.ext3 /dev/mapper/encrypted_file > mkdir /tmp/encrypted_test > mount /dev/mapper/encrypted_file /tmp/encrypted_test > umount /tmp/encrypted_test > cryptsetup luksClose encrypted_file > losetup -d $LD >} > >do_the_test() >{ > EF=encrypted_file > PW=TESTING123 > LP=`losetup -f` > losetup ${LP} /tmp/${EF} > if [ "$1" = "pass" ]; then > echo ${PW} |/tmp/sdtp| strace -o /tmp/pass /sbin/cryptsetup luksOpen ${LP} ${EF} > fi > if [ "$1" = "fail" ]; then > echo ${PW} | strace -o /tmp/fail /sbin/cryptsetup luksOpen ${LP} ${EF} > fi > ls -l /dev/mapper/${EF} > mount /dev/mapper/${EF} /tmp/encrypted_test > umount /tmp/encrypted_test > cryptsetup luksClose ${EF} > losetup -d ${LP} > if [ $? -eq 0 ]; then > echo "PASSED" > losetup -f > else > echo "FAILED" > losetup -f > fi >} > >clean_up() >{ > rm /tmp/sdtp > rm /tmp/slow_down_the_pipe.c > rm /tmp/encrypted_file > rm /tmp/pass > rm /tmp/fail > rmdir /tmp/encrypted_test >} > >if [ $1 = "setup" ]; then > make_slow_down_the_pipe > make_the_encrypted_stuff >fi > >if [ $1 = "ccsdtp" ]; then > make_slow_down_the_pipe >fi > >if [ $1 = "pass" ]; then > do_the_test $1 >fi > >if [ $1 = "fail" ]; then > do_the_test $1 >fi > >if [ $1 = "clean" ]; then > clean_up >fi > >#Comments ># 1. test_script.sh setup Creates the test environment. ># ># 2. test_script.sh pass Test with a delay. ># ># 3. test_script.sh fail Test with no delay. ># ># 4. test_script.sh ccsdtp Remake sdtp after adjusting loop delay. ># ># 5. test_script.sh clean Cleans up stuff on /tmp ># > >#END OF SCRIPT > > >----------------------------------------------------------------------- > >dmesg > > >Linux version 2.6.18-1.2849.fc6 (brewbuilder.redhat.com) (gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)) #1 SMP Fri Nov 10 12:45:28 EST 2006 >BIOS-provided physical RAM map: > BIOS-e820: 0000000000000000 - 000000000009c000 (usable) > BIOS-e820: 000000000009c000 - 00000000000a0000 (reserved) > BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) > BIOS-e820: 0000000000100000 - 000000001bef0000 (usable) > BIOS-e820: 000000001bef0000 - 000000001bef3000 (ACPI NVS) > BIOS-e820: 000000001bef3000 - 000000001bf00000 (ACPI data) > BIOS-e820: 000000001c000000 - 0000000020000000 (reserved) > BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved) > BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved) > BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved) > BIOS-e820: 00000000fefffc00 - 00000000ff000000 (reserved) > BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) >0MB HIGHMEM available. >446MB LOWMEM available. >found SMP MP-table at 000f3c30 >Using x86 segment limits to approximate NX protection >On node 0 totalpages: 114416 > DMA zone: 4096 pages, LIFO batch:0 > Normal zone: 110320 pages, LIFO batch:31 >DMI 2.2 present. >Using APIC driver default >IO/L-APIC allowed because system is MP or new enough >ACPI: RSDP (v000 Nvidia ) @ 0x000f7db0 >ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bef3040 >ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bef30c0 >ACPI: MCFG (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bef94c0 >ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bef9400 >ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000 >ACPI: PM-Timer IO Port: 0x1008 >ACPI: Local APIC address 0xfee00000 >ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) >Processor #0 15:12 APIC version 16 >ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) >ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) >IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23 >ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) >ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 14 high edge) >ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 15 high edge) >ACPI: IRQ9 used by override. >ACPI: IRQ14 used by override. >ACPI: IRQ15 used by override. >Enabling APIC mode: Flat. Using 1 I/O APICs >Using ACPI (MADT) for SMP configuration information >Allocating PCI resources starting at 30000000 (gap: 20000000:c0000000) >Detected 2121.071 MHz processor. >Built 1 zonelists. Total pages: 114416 >Kernel command line: ro root=LABEL=/ROOT-sda6 rhgb quiet vga=791 >mapped APIC to ffffd000 (fee00000) >mapped IOAPIC to ffffc000 (fec00000) >Enabling fast FPU save and restore... done. >Enabling unmasked SIMD FPU exception support... done. >Initializing CPU#0 >CPU 0 irqstacks, hard=c07af000 soft=c078f000 >PID hash table entries: 2048 (order: 11, 8192 bytes) >spurious 8259A interrupt: IRQ7. >Console: colour dummy device 80x25 >Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) >Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) >Memory: 447256k/457664k available (2139k kernel code, 9828k reserved, 866k data, 244k init, 0k highmem) >Checking if this processor honours the WP bit even in supervisor mode... Ok. >Calibrating delay using timer specific routine.. 4244.38 BogoMIPS (lpj=2122192) >Security Framework v1.0.0 initialized >SELinux: Initializing. >SELinux: Starting in permissive mode >selinux_register_security: Registering secondary module capability >Capability LSM initialized as secondary >Mount-cache hash table entries: 512 >CPU: After generic identify, caps: 078bfbff e3d3fbff 00000000 00000000 00000001 00000000 00000001 >CPU: After vendor identify, caps: 078bfbff e3d3fbff 00000000 00000000 00000001 00000000 00000001 >CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) >CPU: L2 Cache: 256K (64 bytes/line) >CPU: After all inits, caps: 078bf3ff e3d3fbff 00000000 00000410 00000001 00000000 00000001 >Intel machine check architecture supported. >Intel machine check reporting enabled on CPU#0. >Checking 'hlt' instruction... OK. >SMP alternatives: switching to UP code >Freeing SMP alternatives: 12k freed >ACPI: Core revision 20060707 >CPU0: AMD Sempron(tm) Processor 2800+ stepping 02 >Total of 1 processors activated (4244.38 BogoMIPS). >ENABLING IO-APIC IRQs >..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1 >Brought up 1 CPUs >sizeof(vma)=84 bytes >sizeof(page)=32 bytes >sizeof(inode)=424 bytes >sizeof(dentry)=148 bytes >sizeof(ext3inode)=600 bytes >sizeof(buffer_head)=52 bytes >sizeof(skbuff)=172 bytes >sizeof(task_struct)=1392 bytes >checking if image is initramfs... it is >Freeing initrd memory: 1476k freed >NET: Registered protocol family 16 >ACPI: bus type pci registered >PCI: Using MMCONFIG >PCI: No mmconfig possible on 0:18 >Setting up standard PCI resources >ACPI: Interpreter enabled >ACPI: Using IOAPIC for interrupt routing >ACPI: PCI Root Bridge [PCI0] (0000:00) >PCI: Probing PCI hardware (bus 00) >Boot video device is 0000:00:05.0 >PCI: Transparent bridge - 0000:00:10.0 >ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] >ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT] >ACPI: PCI Interrupt Link [LNK1] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK2] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK3] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK4] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK5] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK6] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LNK7] (IRQs 5 7 9 *10 11 14 15) >ACPI: PCI Interrupt Link [LNK8] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LUBA] (IRQs 5 7 9 10 *11 14 15) >ACPI: PCI Interrupt Link [LUBB] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LMAC] (IRQs 5 7 9 10 *11 14 15) >ACPI: PCI Interrupt Link [LACI] (IRQs *5 7 9 10 11 14 15) >ACPI: PCI Interrupt Link [LAZA] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LPMU] (IRQs 5 7 9 *10 11 14 15) >ACPI: PCI Interrupt Link [LMCI] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LSMB] (IRQs 5 7 9 *10 11 14 15) >ACPI: PCI Interrupt Link [LUB2] (IRQs *5 7 9 10 11 14 15) >ACPI: PCI Interrupt Link [LIDE] (IRQs 5 7 9 10 11 14 15) *0, disabled. >ACPI: PCI Interrupt Link [LSID] (IRQs 5 7 9 10 *11 14 15) >ACPI: PCI Interrupt Link [APC1] (IRQs 16) *0, disabled. >ACPI: PCI Interrupt Link [APC2] (IRQs 17) *0, disabled. >ACPI: PCI Interrupt Link [APC3] (IRQs 18) *0, disabled. >ACPI: PCI Interrupt Link [APC4] (IRQs 19) *0, disabled. >ACPI: PCI Interrupt Link [APC5] (IRQs 16) *0, disabled. >ACPI: PCI Interrupt Link [APC6] (IRQs 16) *0, disabled. >ACPI: PCI Interrupt Link [APC7] (IRQs 16) *0, disabled. >ACPI: PCI Interrupt Link [APC8] (IRQs 16) *0, disabled. >ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APMU] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [AAZA] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCS] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22 23) *0, disabled. >ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled. >Linux Plug and Play Support v0.97 (c) Adam Belay >pnp: PnP ACPI init >pnp: PnP ACPI: found 14 devices >usbcore: registered new driver usbfs >usbcore: registered new driver hub >PCI: Using ACPI for IRQ routing >PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report >NetLabel: Initializing >NetLabel: domain hash size = 128 >NetLabel: protocols = UNLABELED CIPSOv4 >NetLabel: unlabeled traffic allowed by default >pnp: 00:01: ioport range 0x1000-0x107f could not be reserved >pnp: 00:01: ioport range 0x1080-0x10ff has been reserved >pnp: 00:01: ioport range 0x1400-0x147f has been reserved >pnp: 00:01: ioport range 0x1480-0x14ff could not be reserved >pnp: 00:01: ioport range 0x1800-0x187f has been reserved >pnp: 00:01: ioport range 0x1880-0x18ff has been reserved >pnp: 00:01: ioport range 0x2000-0x207f has been reserved >pnp: 00:01: ioport range 0x2080-0x20ff has been reserved >PCI: Bridge: 0000:00:02.0 > IO window: a000-afff > MEM window: fd700000-fd7fffff > PREFETCH window: fde00000-fdefffff >PCI: Bridge: 0000:00:03.0 > IO window: 9000-9fff > MEM window: fdd00000-fddfffff > PREFETCH window: fdc00000-fdcfffff >PCI: Bridge: 0000:00:04.0 > IO window: b000-bfff > MEM window: fd900000-fd9fffff > PREFETCH window: fd800000-fd8fffff >PCI: Bridge: 0000:00:10.0 > IO window: c000-cfff > MEM window: fdb00000-fdbfffff > PREFETCH window: fda00000-fdafffff >PCI: Setting latency timer of device 0000:00:02.0 to 64 >PCI: Setting latency timer of device 0000:00:03.0 to 64 >PCI: Setting latency timer of device 0000:00:04.0 to 64 >PCI: Setting latency timer of device 0000:00:10.0 to 64 >NET: Registered protocol family 2 >IP route cache hash table entries: 4096 (order: 2, 16384 bytes) >TCP established hash table entries: 16384 (order: 6, 327680 bytes) >TCP bind hash table entries: 8192 (order: 5, 163840 bytes) >TCP: Hash tables configured (established 16384 bind 8192) >TCP reno registered >apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac) >apm: overridden by ACPI. >audit: initializing netlink socket (disabled) >audit(1163594051.643:1): initialized >Total HugeTLB memory allocated, 0 >VFS: Disk quotas dquot_6.5.1 >Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) >SELinux: Registering netfilter hooks >Initializing Cryptographic API >ksign: Installing public key data >Loading keyring >- Added public key CA06D81CB13FD94 >- User ID: Red Hat, Inc. (Kernel Module GPG key) >io scheduler noop registered >io scheduler anticipatory registered >io scheduler deadline registered >io scheduler cfq registered (default) >0000:00:0b.1 EHCI: BIOS handoff failed (BIOS bug ?) 01010001 >PCI: Setting latency timer of device 0000:00:02.0 to 64 >pcie_portdrv_probe->Dev[02fc:10de] has invalid IRQ. Check vendor BIOS >assign_interrupt_mode Found MSI capability >Allocate Port Service[0000:00:02.0:pcie00] >Allocate Port Service[0000:00:02.0:pcie03] >PCI: Setting latency timer of device 0000:00:03.0 to 64 >pcie_portdrv_probe->Dev[02fd:10de] has invalid IRQ. Check vendor BIOS >assign_interrupt_mode Found MSI capability >Allocate Port Service[0000:00:03.0:pcie00] >Allocate Port Service[0000:00:03.0:pcie03] >PCI: Setting latency timer of device 0000:00:04.0 to 64 >pcie_portdrv_probe->Dev[02fb:10de] has invalid IRQ. Check vendor BIOS >assign_interrupt_mode Found MSI capability >Allocate Port Service[0000:00:04.0:pcie00] >Allocate Port Service[0000:00:04.0:pcie03] >pci_hotplug: PCI Hot Plug PCI Core version: 0.5 >vesafb: framebuffer at 0xd0000000, mapped to 0xdc880000, using 3072k, total 65536k >vesafb: mode is 1024x768x16, linelength=2048, pages=1 >vesafb: protected mode interface info at c000:c2e0 >vesafb: pmi: set display start = c00cc316, set palette = c00cc380 >vesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da >vesafb: scrolling: redraw >vesafb: Truecolor: size=0:5:6:5, shift=0:11:5:0 >Console: switching to colour frame buffer device 128x48 >fb0: VESA VGA frame buffer device >ACPI: Fan [FAN] (on) >ACPI: Processor [CPU0] (supports 8 throttling states) >ACPI: Thermal Zone [THRM] (26 C) >isapnp: Scanning for PnP cards... >isapnp: No Plug & Play device found >Real Time Clock Driver v1.12ac >Non-volatile memory driver v1.2 >Linux agpgart interface v0.101 (c) Dave Jones >Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled >serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A >00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A >RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize >Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 >ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx >NFORCE-MCP51: IDE controller at PCI slot 0000:00:0d.0 >NFORCE-MCP51: chipset revision 161 >NFORCE-MCP51: not 100% native mode: will probe irqs later >NFORCE-MCP51: BIOS didn't set cable bits correctly. Enabling workaround. >NFORCE-MCP51: 0000:00:0d.0 (rev a1) UDMA133 controller > ide0: BM-DMA at 0xf400-0xf407, BIOS settings: hda:DMA, hdb:DMA > ide1: BM-DMA at 0xf408-0xf40f, BIOS settings: hdc:DMA, hdd:DMA >Probing IDE interface ide0... >hda: WDC WD800JB-00FMA0, ATA DISK drive >ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 >Probing IDE interface ide1... >hdc: WDC AC33100H, ATA DISK drive >hdd: CD-RW IDE5232, ATAPI CD/DVD-ROM drive >hdc: Disabling (U)DMA for WDC AC33100H (blacklisted) >ide1 at 0x170-0x177,0x376 on irq 15 >hda: max request size: 128KiB >hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100) >hda: cache flushes supported > hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 hda12 hda13 > >hdc: max request size: 128KiB >hdc: 6185088 sectors (3166 MB) w/128KiB Cache, CHS=6136/16/63 > hdc: hdc1 >ide-floppy driver 0.99.newide >usbcore: registered new driver libusual >usbcore: registered new driver hiddev >usbcore: registered new driver usbhid >drivers/usb/input/hid-core.c: v2.6:USB HID core driver >PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12 >serio: i8042 AUX port at 0x60,0x64 irq 12 >serio: i8042 KBD port at 0x60,0x64 irq 1 >mice: PS/2 mouse device common for all mice >md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27 >md: bitmap version 4.39 >TCP bic registered >Initializing IPsec netlink socket >NET: Registered protocol family 1 >NET: Registered protocol family 17 >powernow-k8: Power state transitions not supported >Using IPI No-Shortcut mode >ACPI: (supports S0 S1 S4 S5) >Freeing unused kernel memory: 244k freed >Write protecting the kernel read-only data: 386k >Time: tsc clocksource has been installed. >input: AT Translated Set 2 keyboard as /class/input/input0 >USB Universal Host Controller Interface driver v3.0 >ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI) >ACPI: PCI Interrupt Link [APCF] enabled at IRQ 23 >ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [APCF] -> GSI 23 (level, low) -> IRQ 209 >PCI: Setting latency timer of device 0000:00:0b.0 to 64 >ohci_hcd 0000:00:0b.0: OHCI Host Controller >ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 1 >ohci_hcd 0000:00:0b.0: irq 209, io mem 0xfe02f000 >usb usb1: configuration #1 chosen from 1 choice >hub 1-0:1.0: USB hub found >hub 1-0:1.0: 8 ports detected >ACPI: PCI Interrupt Link [APCL] enabled at IRQ 22 >ACPI: PCI Interrupt 0000:00:0b.1[B] -> Link [APCL] -> GSI 22 (level, low) -> IRQ 217 >PCI: Setting latency timer of device 0000:00:0b.1 to 64 >ehci_hcd 0000:00:0b.1: EHCI Host Controller >ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 2 >ehci_hcd 0000:00:0b.1: debug port 1 >PCI: cache line size of 64 is not supported by device 0000:00:0b.1 >ehci_hcd 0000:00:0b.1: irq 217, io mem 0xfe02e000 >ehci_hcd 0000:00:0b.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 >usb usb2: configuration #1 chosen from 1 choice >hub 2-0:1.0: USB hub found >hub 2-0:1.0: 8 ports detected >input: ImPS/2 Generic Wheel Mouse as /class/input/input1 >SCSI subsystem initialized >libata version 2.00 loaded. >sata_nv 0000:00:0e.0: version 2.0 >ACPI: PCI Interrupt Link [APSI] enabled at IRQ 21 >ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [APSI] -> GSI 21 (level, low) -> IRQ 225 >PCI: Setting latency timer of device 0000:00:0e.0 to 64 >ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma 0xE000 irq 225 >ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma 0xE008 irq 225 >scsi0 : sata_nv >usb 2-8: new high speed USB device using ehci_hcd and address 4 >usb 2-8: configuration #1 chosen from 1 choice >libusual: request for usb-storage succeeded, but module is not present >ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >ata1.00: ATA-6, max UDMA/100, 156250000 sectors: LBA >ata1.00: ata1: dev 0 multi count 16 >ata1.00: configured for UDMA/100 >scsi1 : sata_nv >usb 1-3: new full speed USB device using ohci_hcd and address 2 >ata2: SATA link down (SStatus 0 SControl 300) >ATA: abnormal status 0x7F on port 0x977 > Vendor: ATA Model: WDC WD800JD-75JN Rev: 05.0 > Type: Direct-Access ANSI SCSI revision: 05 >SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB) >sda: Write Protect is off >sda: Mode Sense: 00 3a 00 00 >SCSI device sda: drive cache: write back >SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB) >sda: Write Protect is off >sda: Mode Sense: 00 3a 00 00 >SCSI device sda: drive cache: write back > sda: sda1 sda2 sda3 sda4 < sda5 sda6<6>usb 1-3: configuration #1 chosen from 1 choice > sda7 sda8 > >sd 0:0:0:0: Attached scsi disk sda >usb 1-6: new full speed USB device using ohci_hcd and address 3 >usb 1-6: configuration #1 chosen from 1 choice >kjournald starting. Commit interval 5 seconds >EXT3-fs: mounted filesystem with ordered data mode. >audit(1163594062.278:2): enforcing=1 old_enforcing=0 auid=4294967295 >security: 3 users, 6 roles, 1564 types, 170 bools, 1 sens, 1024 cats >security: 59 classes, 48633 rules >SELinux: Completing initialization. >SELinux: Setting up existing superblocks. >SELinux: initialized (dev sda6, type ext3), uses xattr >SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts >SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs >SELinux: initialized (dev debugfs, type debugfs), uses genfs_contexts >SELinux: initialized (dev selinuxfs, type selinuxfs), uses genfs_contexts >SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs >SELinux: initialized (dev hugetlbfs, type hugetlbfs), uses genfs_contexts >SELinux: initialized (dev devpts, type devpts), uses transition SIDs >SELinux: initialized (dev eventpollfs, type eventpollfs), uses task SIDs >SELinux: initialized (dev inotifyfs, type inotifyfs), uses genfs_contexts >SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs >SELinux: initialized (dev futexfs, type futexfs), uses genfs_contexts >SELinux: initialized (dev pipefs, type pipefs), uses task SIDs >SELinux: initialized (dev sockfs, type sockfs), uses task SIDs >SELinux: initialized (dev cpuset, type cpuset), not configured for labeling >SELinux: initialized (dev proc, type proc), uses genfs_contexts >SELinux: initialized (dev bdev, type bdev), uses genfs_contexts >SELinux: initialized (dev rootfs, type rootfs), uses genfs_contexts >SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts >audit(1163594062.671:3): policy loaded auid=4294967295 >Initializing USB Mass Storage driver... >scsi2 : SCSI emulation for USB Mass Storage devices >usbcore: registered new driver usb-storage >USB Mass Storage support registered. >usb-storage: device found at 4 >usb-storage: waiting for device to settle before scanning >hdd: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache >Uniform CD-ROM driver Revision: 3.20 >drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04E8 pid 0x324C >usbcore: registered new driver usblp >drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver >EDAC MC: Ver: 2.0.1 Nov 10 2006 >EDAC MC0: Giving out device to k8_edac Athlon64/Opteron: DEV 0000:00:18.2 >i2c_adapter i2c-0: nForce2 SMBus adapter at 0x1c00 >i2c_adapter i2c-1: nForce2 SMBus adapter at 0x1c40 >forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.56. >ACPI: PCI Interrupt Link [APCH] enabled at IRQ 20 >ACPI: PCI Interrupt 0000:00:14.0[A] -> Link [APCH] -> GSI 20 (level, low) -> IRQ 233 >PCI: Setting latency timer of device 0000:00:14.0 to 64 >forcedeth: using HIGHDMA >sd 0:0:0:0: Attached scsi generic sg0 type 0 >input: PC Speaker as /class/input/input2 >eth0: forcedeth.c: subsystem: 01565:2501 bound to 0000:00:14.0 >ACPI: PCI Interrupt Link [APCJ] enabled at IRQ 23 >ACPI: PCI Interrupt 0000:00:10.2[C] -> Link [APCJ] -> GSI 23 (level, low) -> IRQ 209 >PCI: Setting latency timer of device 0000:00:10.2 to 64 >intel8x0_measure_ac97_clock: measured 51703 usecs >intel8x0: clocking to 46825 >FDC 0 is a post-1991 82077 >parport: PnPBIOS parport detected. >parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE] >lp0: using parport0 (interrupt-driven). >lp0: console ready >ACPI: Power Button (FF) [PWRF] >ACPI: Power Button (CM) [PWRB] >ACPI: Sleep Button (CM) [SLPB] >ibm_acpi: ec object not found >md: Autodetecting RAID arrays. >md: autorun ... >md: ... autorun DONE. >device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised: dm-devel >device-mapper: multipath: version 1.0.4 loaded > Vendor: Corsair Model: Flash Voyager Rev: 1100 > Type: Direct-Access ANSI SCSI revision: 00 >SCSI device sdb: 506880 512-byte hdwr sectors (260 MB) >sdb: Write Protect is off >sdb: Mode Sense: 43 00 00 00 >sdb: assuming drive cache: write through >SCSI device sdb: 506880 512-byte hdwr sectors (260 MB) >sdb: Write Protect is off >sdb: Mode Sense: 43 00 00 00 >sdb: assuming drive cache: write through > sdb: sdb1 >sd 2:0:0:0: Attached scsi removable disk sdb >sd 2:0:0:0: Attached scsi generic sg1 type 0 >usb-storage: device scan complete >EXT3 FS on sda6, internal journal >kjournald starting. Commit interval 5 seconds >EXT3 FS on sda1, internal journal >EXT3-fs: mounted filesystem with ordered data mode. >SELinux: initialized (dev sda1, type ext3), uses xattr >SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs >kjournald starting. Commit interval 5 seconds >EXT3 FS on sda5, internal journal >EXT3-fs: mounted filesystem with ordered data mode. >SELinux: initialized (dev sda5, type ext3), uses xattr >kjournald starting. Commit interval 5 seconds >EXT3 FS on sda3, internal journal >EXT3-fs: mounted filesystem with ordered data mode. >SELinux: initialized (dev sda3, type ext3), uses xattr >kjournald starting. Commit interval 5 seconds >EXT3 FS on sda8, internal journal >EXT3-fs: mounted filesystem with ordered data mode. >SELinux: initialized (dev sda8, type ext3), uses xattr >SELinux: initialized (dev ramfs, type ramfs), uses genfs_contexts >NET: Registered protocol family 10 >lo: Disabled Privacy Extensions >IPv6 over IPv4 tunneling driver >Adding 1052248k swap on /dev/sda2. Priority:-1 extents:1 across:1052248k >SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts > > >-------------------------------------------------------------------------- > >/proc/cpuinfo > >processor : 0 >vendor_id : AuthenticAMD >cpu family : 15 >model : 44 >model name : AMD Sempron(tm) Processor 2800+ >stepping : 2 >cpu MHz : 2121.071 >cache size : 256 KB >fdiv_bug : no >hlt_bug : no >f00f_bug : no >coma_bug : no >fpu : yes >fpu_exception : yes >cpuid level : 1 >wp : yes >flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni lahf_lm ts ttp tm stc >bogomips : 4244.38 >
Sorry about the messy comment. The script in the original attachment had the wrong path for cryptsetup. It had the path used when testing from the compiled sources. I should have done a diff.
On my centrino notebook with F7 and cryptsetup-luks 1.0.3-4 the following works fine: PW=TESTING123 EF=encrypted_file LP=`losetup -f` losetup ${LP} /tmp/${EF} echo ${PW} | cryptsetup luksOpen ${LP} ${EF} cryptsetup luksClose ${EF} losetup -d ${LP} Can you check, whether you still have this problem?
I tested on the original hardware. Both FC6 and FC7 work properly. I looks like the bug has been cleared.