Bug 136317 - When copying rootfs to /mnt/sdc/, rsync accessed /proc/kcore and kernel crashed
When copying rootfs to /mnt/sdc/, rsync accessed /proc/kcore and kernel crashed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Dave Anderson
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-19 06:21 EDT by Ville Herva
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-18 09:28:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The kernel crash stack trace (30.00 KB, image/png)
2004-10-19 06:22 EDT, Ville Herva
no flags Details
Oops, sorry, should be image/png (30.00 KB, image/png)
2004-10-19 06:23 EDT, Ville Herva
no flags Details
Oops, sorry, should be image/png (30.00 KB, image/png)
2004-10-19 06:23 EDT, Ville Herva
no flags Details

  None (edit)
Description Ville Herva 2004-10-19 06:21:16 EDT
Description of problem:
I did 

     rsync -a --verbose / /mnt/sdc/

and forgot to specify --one-file-system. Rsync went on copying /proc,
and when it accessed /proc/kcore the kernel crashed.

> rsync ...
(...)
proc/irq/4/
proc/irq/4/smp_affinity
proc/irq/48/
proc/irq/48/smp_affinity
proc/irq/49/
proc/irq/49/smp_affinity
proc/irq/5/
proc/irq/5/smp_affinity
proc/irq/50/
proc/irq/50/smp_affinity
proc/irq/51/
proc/irq/51/smp_affinity
proc/irq/6/
proc/irq/6/smp_affinity
proc/irq/7/
proc/irq/7/smp_affinity
proc/irq/71/
proc/irq/71/smp_affinity
proc/irq/72/
proc/irq/72/smp_affinity
proc/irq/73/
proc/irq/73/smp_affinity
proc/irq/74/
proc/irq/74/smp_affinity
proc/irq/75/
proc/irq/75/smp_affinity
proc/irq/76/
proc/irq/76/smp_affinity
proc/irq/77/
proc/irq/77/smp_affinity
proc/irq/78/
proc/irq/78/smp_affinity
proc/irq/79/
proc/irq/79/smp_affinity
proc/irq/8/
proc/irq/8/smp_affinity
proc/irq/9/
proc/irq/9/smp_affinity
proc/irq/95/
proc/irq/95/smp_affinity
proc/irq/prof_cpu_mask
proc/kcore
   153354240  16%  116.60MB/s    0:00:06
<halted here>

and on the console I found the attached stack trace.

Kernel is 
Linux version 2.4.21-20.ELsmp (bhcompile@tweety.build.redhat.com) (gcc
version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)) #1 SMP Wed Aug 18
20:46:40 EDT 2004

(Newest RHEL3 update 3 kernel).

This is a dual Xeon 3GHz - four logical CPU's.

Version-Release number of selected component (if applicable):
kernel-2.4.21-20.EL (Linux version 2.4.21-20.ELsmp
(bhcompile@tweety.build.redhat.com) (gcc version 3.2.3 20030502 (Red
Hat Linux 3.2.3-42)) #1 SMP Wed Aug 18 20:46:40 EDT 2004)

How reproducible:
Didn't try

Steps to Reproduce:
1. rsync -a --verbose / /mnt/sdc/
2.
3.
    

Actual Results:  Kernel crash

Expected Results:  No kernel crash

Additional info:
Comment 1 Ville Herva 2004-10-19 06:22:15 EDT
Created attachment 105437 [details]
The kernel crash stack trace
Comment 2 Ville Herva 2004-10-19 06:23:20 EDT
Created attachment 105438 [details]
Oops, sorry, should be image/png
Comment 3 Ville Herva 2004-10-19 06:23:26 EDT
Created attachment 105439 [details]
Oops, sorry, should be image/png
Comment 4 Ville Herva 2004-10-19 06:49:40 EDT
Doesn't seem easily reproducible, but I did get some weird messages
from kernel when trying to do so.

The target fs happened to be ext2 when it crashed. 
Comment 5 Ville Herva 2004-10-19 06:50:47 EDT
I have 3GB RAM so the kcore is fairly big.
Comment 6 Ville Herva 2004-10-19 06:56:45 EDT
It is probably necessary to rsync the whole fs so that it'll run out
of memory while trying to copy kcore. I just tried to reproduce
rsyncin mere /proc.
Comment 7 Ernie Petrides 2004-10-19 16:47:42 EDT
Dave, this crash was in kmem_cache_alloc_batch() on behalf
of get_unused_buffer_head(), potentially due to slab corruption.

Closing as dup of bug 134988.  -ernie

*** This bug has been marked as a duplicate of 134988 ***
Comment 8 Ernie Petrides 2005-01-29 01:12:58 EST
A fix for this problem has just been committed to the RHEL3 U5
patch pool this evening (in kernel version 2.4.21-27.10.EL).
Comment 9 Tim Powers 2005-05-18 09:28:17 EDT
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/RHSA-2005-294.html

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