nautilus abnormal ressource usage reading some specific directory content

Bug #182669 reported by sahabia
256
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: nautilus

Running nautilus version "GNOME nautilus 2.20.0", nautilus RAM consumption grows and CPU usage is about 80 % reading this directory content:

# cd /srv/tmp/MU
# ls -l /srv/tmp/MU
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Angel Heart
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Apocalypto
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Cliff Martinez
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Collateral
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Come See The Paradise
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Corner Stone Cues - Requiem For A Tower.mp3
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Crash
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Dimitri Tiomkin
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Dumb & Dumber - Crash (by The Primitives).mp3
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Gustavo Santaolalla
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Hannibal - Vide Cor Meum (by Patrick Cassidy).mp3
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Hans Zimmer
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Heat
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Human Traffic - Kittens (by Underworld).mp3
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Inside Man - Chaiyya Chaiyya Bollywood Joint.mp3
drwxr-xr-x 2 root root 48 2008-01-13 18:40 John Murphy
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Leviathan
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Lord of War
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Steve Jablonsky
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Syriana.mp3
-rw-r--r-- 1 root root 0 2008-01-13 18:40 The Day After Tomorrow.mp3
-rw-r--r-- 1 root root 0 2008-01-13 18:40 The Flight Of The Phoenix - Heat Dream.mp3
drwxr-xr-x 2 root root 48 2008-01-13 18:40 The Last Of The Mohicans
drwxr-xr-x 2 root root 48 2008-01-13 18:40 The Wild Bunch
drwxr-xr-x 2 root root 48 2008-01-13 18:40 Traffic
-rw-r--r-- 1 root root 0 2008-01-13 18:40 Volver - Dos en la Furgoneta.mp3

$ nautilus /srv/tmp/MU &
Initializing gnome-mount extension
$ top -p $(pidof nautilus)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13283 xxxxx 25 0 458m 302m 11m R 84.1 60.1 6:06.32 nautilus

Moving some files or directories from within /srv/tmp/MU does not trigger the bug.

# mv Steve\ Jablonsky/ ..
$ top -p $(pidof nautilus)
..
13386 xxxxx 16 0 60996 23m 14m S 0.0 4.7 0:01.21 nautilus

Renaming mp3 files does it too.
(# mv ../Steve* .)
# rename 's,mp3,mp3.jkl,g' *mp3
$ top -p $(pidof nautilus)
..
13437 xxxxx 15 0 57052 27m 14m S 0.0 5.4 0:01.26 nautilus

cpu model name : AMD Athlon(tm) XP 2000+
DISTRIB_CODENAME=gutsy

This looks like a memory leak on mp3 directory content reading. I suppose that this bug may happen on some other directory content.
This bug can be considered as a dos security issue since this directory content may be downloaded from any peer to peer network package file.

Note:

# strace nautilus /srv/tmp/MU |tee -a /home/ludovic/nautilus.bug.strace
[...]
socket(PF_FILE, SOCK_STREAM, 0) = 3
[...]
write(3, "\2\n\4\0]\1\340\0\2\0\0\0\377\377\377\0\f\0\7\0]\1\340"..., 16376) = 16376
write(3, "\2\n\4\0]\1\340\0\2\0\0\0\377\377\377\0\2\0\4\0\257\0\340"..., 16380) = 16380
write(3, "\f\n\7\0\\\1\340\0\17\0\0\0\0\0\0\0|\0\0\0\217\2\0\0\0"..., 16376) = 16376
write(3, "\2\n\4\0\257\0\340\0\2\0\0\0\347\353\357\0\2\0\4\0]\1\340"..., 16364) = 16364
write(3, "\f\n\7\0]\1\340\0\17\0\0\0\0\0\0\0\0\0\0\0\220\2\0\0\21"..., 16376) = 16376
write(3, "\2\n\4\0]\1\340\0\2\0\0\0\377\377\377\0\f\0\7\0]\1\340"..., 16376) = 16376
write(3, "\2\n\4\0]\1\340\0\2\0\0\0\377\377\377\0\2\0\4\0\257\0\340"..., 16380) = 16380
write(3, "\f\n\7\0\\\1\340\0\17\0\0\0\0\0\0\0|\0\0\0\217\2\0\0\0"..., 16376) = 16376
[...]
read(3, "\26\17\304$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\236\2\21"..., 32) = 32
read(3, "\26\17\307$\\\1\340\0\\\1\340\0W\1\340\0\0\0|\0\217\2\0"..., 32) = 32
read(3, "\26\17\312$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\220\2\21"..., 32) = 32
read(3, "\26\17\314$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\217\2\0\2"..., 32) = 32
read(3, "\26\17\317$\\\1\340\0\\\1\340\0W\1\340\0\0\0|\0\236\2\0"..., 32) = 32
read(3, "\26\17\323$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\236\2\0\2"..., 32) = 32
read(3, "\26\17\325$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\236\2\21"..., 32) = 32
read(3, "\26\17\330$\\\1\340\0\\\1\340\0W\1\340\0\0\0|\0\217\2\0"..., 32) = 32
read(3, "\26\17\333$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\220\2\21"..., 32) = 32
read(3, "\26\17\335$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\217\2\0\2"..., 32) = 32
read(3, "\26\17\340$\\\1\340\0\\\1\340\0W\1\340\0\0\0|\0\236\2\0"..., 32) = 32
read(3, "\26\17\344$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\236\2\0\2"..., 32) = 32

[indefinite socket reading ..]

# rename 's,mp3,mp3.jkl,g' *mp3
# strace nautilus /srv/tmp/MU |tee -a /home/ludovic/nautilus.strace
[no indefinite socket reading ..]

Sahabia.

Revision history for this message
sahabia (sahabia) wrote :
Revision history for this message
sahabia (sahabia) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Hardy Heron. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Changed in nautilus:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!.

Changed in nautilus:
status: Incomplete → Invalid
Revision history for this message
Sam Davies (seivadmas) wrote :

I get a similar bug to this, I will test it with the live cd. I know which directory/content causes it, what debugging options/tools do I need to use?

Revision history for this message
sahabia (sahabia) wrote :

I tried to catch that bug with hardy heron live CD Beta . This bug seems to not be present in the next release (ouch ..). This needs to be confirmed.

Changed in nautilus:
status: Invalid → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

closing this report as per reporter comments, thanks.

Changed in nautilus:
status: Incomplete → Fix Released
Revision history for this message
sahabia (sahabia) wrote :

Sam,

Could you give it a try? I'm not so confident in my test procedure (gnome-applets not loaded on live CD startup).
Thanks to keep us informed.

You just need to type below commands with root privilege in a terminal, and report if the last command always echoes this line:
"read(3, "\26\17\344$]\1\340\0]\1\340\0\0\0\0\0\0\0\0\0\236\2\0\2"..., 32) = 32"

mkdir -p "/srv/tmp/MU/Angel Heart"
mkdir "/srv/tmp/MU/Apocalypto"
mkdir "/srv/tmp/MU/Cliff Martinez"
mkdir "/srv/tmp/MU/Collateral"
mkdir "/srv/tmp/MU/Come See The Paradise"
mkdir "/srv/tmp/MU/Crash"
mkdir "/srv/tmp/MU/Dimitri Tiomkin"
mkdir "/srv/tmp/MU/Gustavo Santaolalla"
mkdir "/srv/tmp/MU/Hans Zimmer"
mkdir "/srv/tmp/MU/Heat"
mkdir "/srv/tmp/MU/John Murphy"
mkdir "/srv/tmp/MU/Leviathan"
mkdir "/srv/tmp/MU/Lord of War"
mkdir "/srv/tmp/MU/Steve Jablonsky"
mkdir "/srv/tmp/MU/The Last Of The Mohicans"
mkdir "/srv/tmp/MU/The Wild Bunch"
mkdir "/srv/tmp/MU/Traffic"
touch "/srv/tmp/MU/Corner Stone Cues - Requiem For A Tower.mp3"
touch "/srv/tmp/MU/Dumb & Dumber - Crash (by The Primitives).mp3"
touch "/srv/tmp/MU/Hannibal - Vide Cor Meum (by Patrick Cassidy).mp3"
touch "/srv/tmp/MU/Human Traffic - Kittens (by Underworld).mp3"
touch "/srv/tmp/MU/Inside Man - Chaiyya Chaiyya Bollywood Joint.mp3"
touch "/srv/tmp/MU/Syriana.mp3"
touch "/srv/tmp/MU/The Day After Tomorrow.mp3"
touch "/srv/tmp/MU/The Flight Of The Phoenix.mp3"
touch "/srv/tmp/MU/Volver - Dos en la Furgoneta.mp3"

last command:
cd /srv/tmp/MU; strace nautilus /srv/tmp/MU

Thanks.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.