[pkg-cryptsetup-devel] Bug#498964: udevsettle wait for timeout when cryptsetup called from udev rule

Olivier Guerrier olivier.bts at guerrier.com
Sun Sep 14 21:11:56 UTC 2008


Package: cryptsetup
Version: 2:1.0.6-6
Severity: normal


I have some udev rules to automount some usb device and run cryptsetup,
it used to works seemlessly. (I've switched from etch a few weeks ago).

Now this rule take a loooooong time to complete. Litlle investigation showed
that cryptsetup call "udevsettle" which waits the udev queue to be empty...

Obviously this a not the case until udevsettle timeouts (180s later)...

Don't know exactly how to correct this the right way, this small patch do the
trick here at no cost, but is probably wrong in others use.

--- cryptsetup-1.0.6/lib/libdevmapper.c 2007-10-25 09:11:19.000000000 +0200
+++ cryptsetup-1.0.6/lib/libdevmapper.c 2008-09-14 22:55:15.208203556 +0200
@@ -18,7 +18,7 @@

 #define        CRYPT_TARGET    "crypt"

-#define UDEVSETTLE     "/sbin/udevsettle"
+#define UDEVSETTLE     "/sbin/udevadm settle --timeout=5"

 static void run_udevsettle(void)
 {

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cryptsetup depends on:
ii  dmsetup                      2:1.02.27-3 The Linux Kernel Device Mapper use
ii  libc6                        2.7-13      GNU C Library: Shared libraries
ii  libdevmapper1.02.1           2:1.02.27-3 The Linux Kernel Device Mapper use
ii  libpopt0                     1.14-4      lib for parsing cmdline parameters
ii  libuuid1                     1.41.0-3    universally unique id library

cryptsetup recommends no packages.

Versions of packages cryptsetup suggests:
pn  dosfstools                    <none>     (no description available)
ii  initramfs-tools [linux-initra 0.92g      tools for generating an initramfs
ii  udev                          0.125-6    /dev/ and hotplug management daemo

-- no debconf information





More information about the pkg-cryptsetup-devel mailing list