[Buildd-tools-devel] Bug#471545: schroot: Access out of device boundaries in lvm snapshots

Stephan A Suerken absurd at debian.org
Tue Mar 18 21:02:41 UTC 2008


Package: schroot
Version: 1.1.6-1
Severity: normal

Hi,

using schroot in sid (or etch), it is easy to create a configuration
that writes out of device boundaries (while I guess the real problem is
in device mapper); on a 2.6.24 system, it freezed the whole system (no
logs available ;), on other kernels (my also depend on lvm setup;) it
"only" corrupts the fs.

Well; let's say you have this schroot setup w/ snapshot sizes set to 2G:
---
[etch-test]
type=lvm-snapshot
(...)
lvm-snapshot-options=--size 2G
(...)
---

etch-test is an existing lv (size 4G). The vg it's on is big way big
enough (100G).

Now create a etch-test snapshot and bomb it with data, i.e., s.th. like

# schroot -c etch-test
# dd if=/dev/zero of=/DATA bs=1M count=3000

Monitoring the snapshot device, it, first of all, shows a size of 4G not
2G.

Secondly, as soon as the fs size is somewhat >2.3 G (I guess fs cache
delays actual writing), dd fails, fs goes down (see kern.log below).

Configuring the snaphsot size >=4G solves/worksaround the problem.

Please burn me with knowledge if this is a known problem ;).

Thanks,

Stephan

Kernel log:
---
Mar 18 21:32:39 orlok kernel: device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Mar 18 21:32:39 orlok kernel: printk: 20 messages suppressed.
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695393
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695394
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695381
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695382
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695383
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695384
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695385
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695386
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695387
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:39 orlok kernel: Buffer I/O error on device dm-2, logical block 695388
Mar 18 21:32:39 orlok kernel: lost page write due to I/O error on dm-2
Mar 18 21:32:40 orlok kernel: EXT3-fs error (device dm-2): read_block_bitmap: Cannot read block bitmap - block_group = 22, block_bitmap = 720896
Mar 18 21:32:40 orlok kernel: EXT3-fs error (device dm-2): read_block_bitmap: Cannot read block bitmap - block_group = 22, block_bitmap = 720896
Mar 18 21:32:40 orlok kernel: EXT3-fs error (device dm-2): ext3_find_entry: reading directory #237569 offset 0
Mar 18 21:32:40 orlok kernel: EXT3-fs error (device dm-2): read_inode_bitmap: Cannot read inode bitmap - block_group = 29, inode_bitmap = 950273
Mar 18 21:32:40 orlok kernel: EXT3-fs error (device dm-2) in ext3_new_inode: IO failure

Message from syslogd at orlok at Tue Mar 18 21:32:42 2008 ...
orlok kernel: journal commit I/O error
Mar 18 21:32:42 orlok kernel: Aborting journal on device dm-2.
Mar 18 21:32:42 orlok kernel: journal commit I/O error
----

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

Kernel: Linux 2.6.22-4-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages schroot depends on:
ii  libboost-program-options1.34. 1.34.1-7   program options library for C++
ii  libboost-regex1.34.1          1.34.1-7   regular expression library for C++
ii  libc6                         2.7-9      GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.0-1  GCC support library
ii  liblockdev1                   1.0.3-1.2  Run-time shared library for lockin
ii  libpam0g                      0.99.7.1-6 Pluggable Authentication Modules l
ii  libstdc++6                    4.3.0-1    The GNU Standard C++ Library v3
ii  libuuid1                      1.40.8-2   universally unique id library
ii  schroot-common                1.1.6-1    common files for schroot

schroot recommends no packages.

-- no debconf information





More information about the Buildd-tools-devel mailing list