[LU-206] Memory corruption due to MMP (1.8.5) Created: 10/Apr/11  Updated: 20/Apr/11  Resolved: 20/Apr/11

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 1.8.6
Fix Version/s: Lustre 2.1.0, Lustre 1.8.6

Type: Bug Priority: Blocker
Reporter: Johann Lombardi (Inactive) Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 5072

 Description   

I have been chasing a weird bug with MMP on 2.6.39-rc1 (i want to push MMP upstream) and it turns out to be an horrible memory corruption which can impact any kernels.

+       mmpd_data = kmalloc(sizeof(struct mmpd_data *), GFP_KERNEL);
                                   ^^^^^^^^^^^^^^^^^^^
                                OUCH!!! should be sizeof(struct mmpd_data)
+       if (!mmpd_data) {
+               ext3_warning(sb, KERN_ERR, "not enough memory for mmpd_data");
+               goto failed;
+       }   
+       mmpd_data->sb = sb; 
+       mmpd_data->bh = bh; 

The memory corruption was introduced by bugzilla ticket 22117 in 1.8.5.
This issue can cause all sorts of oops everywhere in the kernel.



 Comments   
Comment by Johann Lombardi (Inactive) [ 10/Apr/11 ]

BTW, 2.1 is impacted too.

Comment by Alex Zhuravlev [ 10/Apr/11 ]

On Mon, Apr 11, 2011 at 8:15 AM, Johann Lombardi (JIRA)

struct mmpd_data {
struct buffer_head bh; / bh from initial read_mmp_block() */
struct super_block sb; / super block of the fs */
};

so it's 16 bytes on 64bit arch ? iirc, the minimal allocation is 32 bytes in
slab/slub due to cpu cacheline.

Comment by Zhenyu Xu [ 11/Apr/11 ]

patch at http://review.whamcloud.com/420

Comment by Brian Murrell (Inactive) [ 11/Apr/11 ]

Is this serious enough that we need to consider a 1.8.5.1 (and/or 2.0.0.x) release?

Comment by Johann Lombardi (Inactive) [ 11/Apr/11 ]

I use x86_64 with SLUB. In slabinfo, i have kmalloc-8/16/32/../8192 slabs, so it seems that we can have allocations smaller than 16 bytes.

I have just checked on RHEL5 and the smallest kmalloc slab is indeed size-32.

Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master-centos5 #200
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » client,ubuntu-x86_64 #28
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » client,el6-i686 #28
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » client,el5-i686 #29
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » server,el5-x86_64 #29
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » client,el6-x86_64 #29
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Comment by Build Master (Inactive) [ 18/Apr/11 ]

Integrated in lustre-master » server,el5-i686 #29
LU-206 Memory corruption due to MMP (1.8.5)

Oleg Drokin : 19de0afd629a3ffe714486cc75264ea14cea7346
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel6.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,client,ubuntu1004,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,client,el5,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » i686,client,el6,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Zhenyu Xu [ 20/Apr/11 ]

landed on b1_8 and master.

Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,client,el6,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,server,el5,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,client,el5,ofa #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » i686,client,el5,ofa #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » x86_64,server,el5,ofa #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » i686,server,el5,ofa #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » i686,client,el5,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
Comment by Build Master (Inactive) [ 20/Apr/11 ]

Integrated in lustre-b1_8 » i686,server,el5,inkernel #17
LU-206 Memory corruption due to MMP (1.8.5)

Johann Lombardi : bb1e78ac1673eb95bfe91d7dbbd729dc6cd48c32
Files :

  • ldiskfs/kernel_patches/patches/ext4-mmp-rhel5.patch
  • ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
  • ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
Generated at Sat Feb 10 01:04:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.