[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#645240: race-condition: background tasks run from postinst scripts cause lb_chroot_devpts to fail

Package: live-build
Version: 2.0.12-2
Severity: normal
Tags: squeeze

Hi live team,

I'm building quite large live systems which I employ in daily production use,
so they are BIG (around 4GB). Recently I added the package dwww, which causes
the build to fail occasionally. I was able to track down the issue to the
dwww.postinst script, which does some index creation - in background (squeeze's
dwww.postinst:67-71 to be exact).

Depending on the load situation on my system (CPU vs. I/O), the build fails, if
the index creation is still running, when "lb_chroot_devpts remove" is invoked
by live-build: since the index creation has some open file handles in
[...]/chroot/dev/pts, the umount command fails.

I think this is a conceptual issue, so I didn't file this bug against dwww but

Currently, I'm circumventing this issue by invoking a "debug shell" just prior
to the umount invocation in lb_chroot_devpts in order to manually assert dwww
really has finished and the umount would succeed.

Like I said: I'm using live-build for production systems, so I only tried this
with live-build 2, not 3. Did anything change at that place or would this issue
persist in 3? ...just hoping this bug report is justified :-)

I'd be glad to provide additional information if needed.

Thx, cheers

-- Package-specific info:

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-dhr-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/dash

Versions of packages live-build depends on:
ii  cdebootstrap             0.5.7           Bootstrap a Debian system
ii  debootstrap              1.0.26+squeeze1 Bootstrap a basic Debian system

Versions of packages live-build recommends:
ii  cpio                          2.11-4     GNU cpio -- a program to manage ar
ii  gnu-fdisk                     1.2.4-3+b1 Linux fdisk replacement based on l

Versions of packages live-build suggests:
ii  dosfstools           3.0.9-1             utilities for making and checking 
ii  fakeroot             1.14.4-1            Gives a fake root environment
ii  genisoimage          9:1.1.11-1          Creates ISO-9660 CD-ROM filesystem
ii  grub                 0.97-64             GRand Unified Bootloader (dummy pa
ii  memtest86+           4.10-1.1            thorough real-mode memory tester
ii  mtools               4.0.12-1            Tools for manipulating MSDOS files
ii  parted               2.3-5               The GNU Parted disk partition resi
ii  squashfs-tools       1:4.0-8             Tool to create and append to squas
ii  sudo                 1.7.4p4-2.squeeze.2 Provide limited super user privile
ii  syslinux             2:4.03+dfsg-12      collection of boot loaders
ii  uuid-runtime         2.17.2-9            runtime components for the Univers
pn  win32-loader         <none>              (no description available)

-- no debconf information

Reply to: