Red Hat Bugzilla – Bug 864504
smem falls over in the presence of unknown UIDs, which is a problem when using LXC.
Last modified: 2012-12-10 20:33:34 EST
Created attachment 624102 [details]
Allow smem to operate in the presence of unknown UIDs
Description of problem:
smem throws a KeyError exception if it encounters unknown user ids in the process table:
Traceback (most recent call last):
File "/bin/smem", line 656, in <module>
File "/bin/smem", line 396, in showusers
showtable(pt.keys(), fields, columns.split(), options.sort or 'pss')
File "/bin/smem", line 476, in showtable
r = [fields[c](n) for c in columns]
File "/bin/smem", line 375, in showuser
File "/bin/smem", line 63, in username
self._ucache[uid] = pwd.getpwuid(uid)
KeyError: 'getpwuid(): uid not found: 26'
While this is a rare situation on a legacy server, it is very common on a system using some sort of container-based virtualization such as LXC, where per-process namespaces mean that there's no guarantee that running processes are sharing the same source of user information.
Version-Release number of selected component (if applicable):
The attached patch addresses this problem by generating a name for unknown UIDs of the form "unknown_<uid>" (e.g., "unknown_26").
smem-1.2-1.fc18 has been submitted as an update for Fedora 18.
smem-1.2-1.fc17 has been submitted as an update for Fedora 17.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing smem-1.2-1.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
smem-1.2-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.