Bug 6183 - (int146891/int-165787) lsof reports incorrect inode for replaced mmaped files
(int146891/int-165787)
: lsof reports incorrect inode for replaced mmaped files
Status: RESOLVED FIXED
Product: Core
general
: 5.0/(3.2010.02-8)
: All Maemo
: Low normal with 1 vote (vote)
: Harmattan
Assigned To: unassigned
: core-general-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2009-11-15 12:27 UTC by Lucas Maneos
Modified: 2010-06-21 10:44 UTC (History)
1 user (show)

See Also:


Attachments


Note

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


Description Lucas Maneos (reporter) 2009-11-15 12:27:53 UTC
SOFTWARE VERSION:
1.2009.42-11

STEPS TO REPRODUCE THE PROBLEM:
1. gtk-update-icon-cache -f /usr/share/icons/hicolor/
2. lsof | grep icon-theme.cache
3. grep icon-theme.cache /proc/[1-9]*/maps

See also bug 5450.  The above steps may not be valid after that one is fixed.

EXPECTED OUTCOME:
The inode numbers reported in steps 2 & 3 should match.

ACTUAL OUTCOME:
lsof reports the inode number of the current incarnation of the file instead of
the one that is actually mmaped.  Example:

Nokia-N900-42-11:~# lsof | grep icon-theme.cache
systemui   938       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
hildon-st 1038       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
hildon-ho 1044       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
hildon-de 1045       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
osso-aboo 1315       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
osso-xter 1608       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
browser   1620       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
osso-addr 1639       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
rtcom-cal 1644       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
rtcom-mes 1649       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
browserd  1653       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
modest    1669       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
image-vie 1696       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
worldcloc 1704       user  mem    REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache

Nokia-N900-42-11:~# grep icon-theme.cache /proc/[1-9]*/maps
/proc/1038/maps:43556000-44919000 r--p 00000000 fe:01 34055     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1044/maps:43543000-44906000 r--p 00000000 fe:01 34055     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1045/maps:43585000-44948000 r--p 00000000 fe:01 34055     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1315/maps:43543000-44906000 r--p 00000000 fe:01 34055     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1608/maps:43543000-44906000 r--p 00000000 fe:01 34132     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1620/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1639/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1644/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1649/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1653/maps:46500000-478c3000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1669/maps:43585000-44948000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1696/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/1704/maps:43543000-44906000 r--p 00000000 fe:01 34135     
/usr/share/icons/hicolor/icon-theme.cache
/proc/938/maps:43585000-44948000 r--p 00000000 fe:01 34055     
/usr/share/icons/hicolor/icon-theme.cache

Nokia-N900-42-11:~# ls -i /usr/share/icons/hicolor/icon-theme.cache
  34135 /usr/share/icons/hicolor/icon-theme.cache

REPRODUCIBILITY:
Always.

OTHER COMMENTS:
This is fixed upstream.  I can't tell from the changelog exactly when, but
version 4.78 outputs correct inodes:

Nokia-N900-42-11:~# ./lsof | grep icon-theme.cache
systemui   938       user  mem       REG      254,1               34055
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
hildon-st 1038       user  mem       REG      254,1               34055
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
hildon-ho 1044       user  mem       REG      254,1               34055
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
hildon-de 1045       user  mem       REG      254,1               34055
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
osso-aboo 1315       user  mem       REG      254,1               34055
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
osso-xter 1608       user  mem       REG      254,1               34132
/usr/share/icons/hicolor/icon-theme.cache (path inode=34135)
browser   1620       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
osso-addr 1639       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
rtcom-cal 1644       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
rtcom-mes 1649       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
browserd  1653       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
modest    1669       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
image-vie 1696       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
worldcloc 1704       user  mem       REG      254,1 20719432      34135
/usr/share/icons/hicolor/icon-theme.cache
Comment 1 Andre Klapper maemo.org 2009-11-16 21:22:07 UTC
Still valid in 2.2009.46-16.

STEPS TO REPRODUCE THE PROBLEM:
1. start Terminal
2. become root
3. gtk-update-icon-cache -f /usr/share/icons/hicolor/
4. lsof | grep icon-theme.cache
5. grep icon-theme.cache /proc/[1-9]*/maps
Comment 2 Andre Klapper maemo.org 2010-02-25 18:32:44 UTC
This is a WONTFIX for Maemo5. Keeping it opened for Maemo6 or whatever it will
be called...
Comment 3 Andre Klapper maemo.org 2010-06-21 10:44:21 UTC
Fixed for Harmattan (and internally verified).