bugGNU Core Utilities - Bugs: bug #23023, cp -r use a lot of memory, ...


You are not allowed to post comments on this tracker with your current authentification level.

bug #23023: cp -r use a lot of memory, feature or memory leak?

Submitted by:  Matteo Boccafoli <matteo>
Submitted on:  Tue Apr 22 20:13:06 2008  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

Fri May 2 07:34:58 2008, comment #2:

See discussion on this thread:

Jim Meyering <meyering>
Project Administrator
Thu May 1 16:02:22 2008, comment #1:

As suggest from Jim Meyering, I attach valgrind output using
$ ./valgrind --tool=massif /bin/cp -r /dev/shm/1/ /dev/shm/c

$ cp --version
cp (GNU coreutils) 5.97

(file #15577, file #15578, file #15579, file #15580)

Matteo Boccafoli <matteo>
Tue Apr 22 20:13:06 2008, original submission:

# 21000 dir in 1.tar.bz2
$ cd /dev/shm
/dev/shm$ time tar -xjf 1.tar.bz2

real 0m8.403s
user 0m3.188s
sys 0m5.196s

/dev/shm$ time ./busybox cp -r /dev/shm/1/ /dev/shm/b
real 0m54.421s
user 0m0.832s
sys 0m51.751s
# [time t_1,t_2 : t_1<t_2 and cp.memory(t_1)==cp.memory(t_2)]

/dev/shm$ time /bin/cp -r /dev/shm/1/ /dev/shm/c
real 0m55.696s
user 0m2.680s
sys 0m50.447s
#[time t_1,t_2 : t_1<t_2 and cp.memory(t_1)<cp.memory(t_2)]
# using a lot of memory (max 54 MB of RAM)

Is it a feature or memory leak?

Matteo Boccafoli <matteo>


Attached Files
file #15578:  ms_print.txt.gz added by matteo (46kB - application/x-gzip)
file #15579:  massif.4613.txt added by matteo (2kB - text/plain)
file #15580:  massif.4613.ps added by matteo (54kB - application/postscript)
file #15577:  massif.out.15750.gz added by matteo (27kB - application/x-gzip)
file #15507:  1.tar.bz2 added by matteo (174kB - application/bzip2 - 21000 dir)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by meyering (Updated the item)
  • -unavailable- added by matteo (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri May 2 07:34:58 2008meyeringStatusNone=>Confirmed
    Fri May 2 06:40:14 2008meyeringPrivacyPrivate=>Public
    Thu May 1 16:02:22 2008matteoAttached File-=>Added massif.out.15750.gz, #15577
      Attached File-=>Added ms_print.txt.gz, #15578
      Attached File-=>Added massif.4613.txt, #15579
      Attached File-=>Added massif.4613.ps, #15580
    Tue Apr 22 20:13:06 2008matteoAttached File-=>Added 1.tar.bz2, #15507

    Back to the top

    Powered by Savane 3.1-cleanup1