Bug 174834 - kernel dm: memory issues cause "failures" when creating many snapshots
kernel dm: memory issues cause "failures" when creating many snapshots
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
All Linux
high Severity high
: ---
: ---
Assigned To: Milan Broz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-02 11:35 EST by Corey Marthaler
Modified: 2013-02-28 23:04 EST (History)
7 users (show)

See Also:
Fixed In Version: RHBA-2007-0791
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 11:13:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2005-12-02 11:35:42 EST
Description of problem:
After creating 31 snapshots, any other snapshot attempts "fails" due to memory
problems while trying to be activated. They due however show up in an lvscan,
however not as snapshot volumes until all the other previous snapshots are deleted.

output from lvcreate cmds:
  Logical volume "lvol31" created
  Rounding up size to full physical extent 52.00 MB
  device-mapper ioctl cmd 9 failed: Cannot allocate memory
  Failed to suspend origin lvol0
  Rounding up size to full physical extent 52.00 MB
  device-mapper ioctl cmd 9 failed: Cannot allocate memory
  Failed to suspend origin lvol0

messages:
device-mapper: Could not create kcopyd client
device-mapper: error adding target to table
device-mapper: Could not create kcopyd client
device-mapper: error adding target to table

[root@morph-01 ~]# lvscan
  ACTIVE   Original '/dev/snapper/lvol0' [400.00 GB] inherit
  ACTIVE            '/dev/snapper/lvol32' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol33' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol34' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol35' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol36' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol37' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol38' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol39' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol40' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol1' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol2' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol3' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol4' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol5' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol6' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol7' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol8' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol9' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol10' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol11' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol12' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol13' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol14' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol15' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol16' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol17' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol18' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol19' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol20' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol21' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol22' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol23' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol24' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol25' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol26' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol27' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol28' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol29' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol30' [52.00 MB] inherit
  ACTIVE   Snapshot '/dev/snapper/lvol31' [52.00 MB] inherit

[root@morph-01 ~]# lvremove -f /dev/snapper/lvol*
  Can't remove logical volume "lvol0" under snapshot
  Logical volume "lvol1" successfully removed
  Logical volume "lvol2" successfully removed
  Logical volume "lvol3" successfully removed
  Logical volume "lvol4" successfully removed
  Logical volume "lvol5" successfully removed
  Logical volume "lvol6" successfully removed
  Logical volume "lvol7" successfully removed
  Logical volume "lvol8" successfully removed
  Logical volume "lvol9" successfully removed
  Logical volume "lvol10" successfully removed
  Logical volume "lvol11" successfully removed
  Logical volume "lvol12" successfully removed
  Logical volume "lvol13" successfully removed
  Logical volume "lvol14" successfully removed
  Logical volume "lvol15" successfully removed
  Logical volume "lvol16" successfully removed
  Logical volume "lvol17" successfully removed
  Logical volume "lvol18" successfully removed
  Logical volume "lvol19" successfully removed
  Logical volume "lvol20" successfully removed
  Logical volume "lvol21" successfully removed
  Logical volume "lvol22" successfully removed
  Logical volume "lvol23" successfully removed
  Logical volume "lvol24" successfully removed
  Logical volume "lvol25" successfully removed
  Logical volume "lvol26" successfully removed
  Logical volume "lvol27" successfully removed
  Logical volume "lvol28" successfully removed
[root@morph-01 ~]# lvscan
  ACTIVE            '/dev/snapper/lvol0' [400.00 GB] inherit
  ACTIVE            '/dev/snapper/lvol32' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol33' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol34' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol35' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol36' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol37' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol38' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol39' [52.00 MB] inherit
  ACTIVE            '/dev/snapper/lvol40' [52.00 MB] inherit

Version-Release number of selected component (if applicable):
Kernel 2.6.9-22.0.1.ELhugemem on an i686
lvm2-2.02.01-1.0.RHEL4
device-mapper-1.02.01-1.0.RHEL4

How reproducible:
everytime
Comment 1 Corey Marthaler 2005-12-05 14:07:48 EST
This appears to always happen at the 32nd (or greater) snap attempt.
Comment 2 Alasdair Kergon 2005-12-09 12:39:03 EST
Ought to add recovery code that deletes the snapshot if its creation failed.
Comment 3 Corey Marthaler 2006-01-18 17:12:22 EST
FWIW: I'm still seeing this and now only after 14 snapshots.
Comment 4 Alasdair Kergon 2006-03-15 13:43:33 EST
Need to try to improve or parameterise kcopyd memory usage.
Comment 13 Jason Baron 2007-07-03 18:30:29 EDT
committed in stream U6 build 55.16. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/
Comment 16 errata-xmlrpc 2007-11-15 11:13:18 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0791.html

Note You need to log in before you can comment on or make changes to this bug.