Activity log for bug #512302

Date Who What changed Old value New value Message
2010-01-25 12:22:25 Andreas Hasenack bug added bug
2010-01-25 12:29:05 Andreas Hasenack visibility private public
2010-01-25 12:36:40 Andreas Hasenack affects landscape smart
2010-01-25 14:13:15 Anders F Björklund attachment added smart-deb-badsize.diff http://launchpadlibrarian.net/38363570/smart-deb-badsize.diff
2010-01-25 14:14:18 Anders F Björklund attachment added smart-deb-badsize.diff http://launchpadlibrarian.net/38363575/smart-deb-badsize.diff
2010-01-25 14:15:06 Anders F Björklund attachment removed smart-deb-badsize.diff http://launchpadlibrarian.net/38363570/smart-deb-badsize.diff
2010-01-25 14:58:41 Anders F Björklund attachment added smart-deb-badsize-test.diff http://launchpadlibrarian.net/38364542/smart-deb-badsize-test.diff
2010-01-25 15:00:24 Anders F Björklund summary Smart crashes on malformed "Size" package field Smart crashes on malformed "Installed-Size" deb package field
2010-02-28 09:13:25 Anders F Björklund smart: milestone 1.3.1
2010-03-05 11:41:17 Anders F Björklund smart: status New Fix Committed
2010-05-03 21:47:16 Anders F Björklund smart: status Fix Committed Fix Released
2011-05-25 02:14:15 Reed Loden bug added subscriber Reed Loden
2011-05-30 22:01:06 Andreas Hasenack attachment added debdiff-1.2-6-lucid.diff https://bugs.launchpad.net/smart/+bug/512302/+attachment/2148349/+files/debdiff-1.2-6-lucid.diff
2011-05-30 22:01:28 Andreas Hasenack attachment added debdiff-1.3-2-maverick.diff https://bugs.launchpad.net/smart/+bug/512302/+attachment/2148350/+files/debdiff-1.3-2-maverick.diff
2011-05-30 22:01:49 Andreas Hasenack attachment added debdiff-1.3-2-natty.diff https://bugs.launchpad.net/smart/+bug/512302/+attachment/2148351/+files/debdiff-1.3-2-natty.diff
2011-05-30 22:02:10 Andreas Hasenack attachment added debdiff-1.3-2-oneiric.diff https://bugs.launchpad.net/smart/+bug/512302/+attachment/2148352/+files/debdiff-1.3-2-oneiric.diff
2011-05-30 22:02:49 Andreas Hasenack bug task added smart (Ubuntu)
2011-05-30 22:03:07 Andreas Hasenack nominated for series Ubuntu Lucid
2011-05-30 22:03:07 Andreas Hasenack nominated for series Ubuntu Maverick
2011-05-30 22:03:07 Andreas Hasenack nominated for series Ubuntu Natty
2011-05-30 22:03:07 Andreas Hasenack nominated for series Ubuntu Oneiric
2011-05-30 22:17:37 Andreas Hasenack description Happened with a support customer: 2010-01-24 16:26:20,947 ERROR [MainThread] None Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 317, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 47, in <lambda> result.addCallback(lambda x: self.handle_tasks()) File "/usr/lib/python2.5/site-packages/landscape/package/taskhandler.py", line 37, in handle_tasks self._handle_next_task(None, deferred) File "/usr/lib/python2.5/site-packages/landscape/package/taskhandler.py", line 49, in _handle_next_task result = self.handle_task(task) File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 163, in handle_task return self._handle_package_ids(message) File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 191, in _handle_package_ids result = self._handle_unknown_packages(unknown_hashes) File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 234, in _handle_unknown_packages skeleton = self._facade.get_package_skeleton(package) File "/usr/lib/python2.5/site-packages/landscape/package/facade.py", line 127, in get_package_skeleton return build_skeleton(pkg, with_info) File "/usr/lib/python2.5/site-packages/landscape/package/skeleton.py", line 89, in build_skeleton skeleton.installed_size = info.getInstalledSize() File "/usr/lib/python2.5/site-packages/smart/backends/deb/loader.py", line 71, in getInstalledSize return long(size)*1024 ValueError: invalid literal for long() with base 10: '221M' I'm im touch with him to discover which package this is. Request for SRU =============== 1. Statement explaining the impact If you happen to have a package that has an incorrect installed-size field which is not all numeric, smart will crash. For Landscape users, since Landscape uses smart on the client side, it means the managed machine will stop reporting package information to the server and any package activity won't work. 2. How has the bug been addressed The bug was fixed by upstream in smart 1.3.1. For this SRU, that specific change has been used for a patch which applied cleanly. 3. Patch The patch is attached to this bug report as a debdiff for each nominated ubuntu release. It includes the fix for the deb backend, a similar fix for the rpm backend and a test. It was taken from smart trunk and applies cleanly. 4. How to reproduce a) With the affected version of smart installed, edit /var/lib/dpkg/status and change the installed size field of the first package you see in there to include the letter "k" after the number. For example: """ Package: xserver-xorg-input-vmmouse Status: install ok installed Priority: optional Section: x11 Installed-Size: 176 (...) """ Change it to: """ Installed-Size: 176k (...) """ b) Run "/usr/share/smart/smart info xserver-xorg-input-vmmouse" (or the package that you changed). You will get a backtrace c) Install the fixed version of python-smartpm d) Run the command from (c) again. No backtrace this time, and installed size will be reported as unknown. 5. Regression potential Minimal. The patch is very focused and has been in smart since 1.3.1. Upstream is now at 1.4.0. If suddenly many packages start reporting this field with a letter, smart, by ignoring it, would probably not be able to tell if there would be enough disk space after the installation, so users could be left with an out of disk error after installations. I don't know what apt does with that field. A quick test shows that installed-size is displayed when it has a letter, but I don't know if it's interpreted and taken into account in the disk free space calculations. Original bug description below ------------------------------- Happened with a support customer: 2010-01-24 16:26:20,947 ERROR [MainThread] None Traceback (most recent call last):   File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 317, in _runCallbacks     self.result = callback(self.result, *args, **kw)   File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 47, in <lambda>     result.addCallback(lambda x: self.handle_tasks())   File "/usr/lib/python2.5/site-packages/landscape/package/taskhandler.py", line 37, in handle_tasks     self._handle_next_task(None, deferred)   File "/usr/lib/python2.5/site-packages/landscape/package/taskhandler.py", line 49, in _handle_next_task     result = self.handle_task(task)   File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 163, in handle_task     return self._handle_package_ids(message)   File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 191, in _handle_package_ids     result = self._handle_unknown_packages(unknown_hashes)   File "/usr/lib/python2.5/site-packages/landscape/package/reporter.py", line 234, in _handle_unknown_packages     skeleton = self._facade.get_package_skeleton(package)   File "/usr/lib/python2.5/site-packages/landscape/package/facade.py", line 127, in get_package_skeleton     return build_skeleton(pkg, with_info)   File "/usr/lib/python2.5/site-packages/landscape/package/skeleton.py", line 89, in build_skeleton     skeleton.installed_size = info.getInstalledSize()   File "/usr/lib/python2.5/site-packages/smart/backends/deb/loader.py", line 71, in getInstalledSize     return long(size)*1024 ValueError: invalid literal for long() with base 10: '221M' I'm im touch with him to discover which package this is.
2011-05-30 22:17:51 Andreas Hasenack bug added subscriber Ubuntu Stable Release Updates Team
2011-05-31 13:40:20 Launchpad Janitor smart (Ubuntu): status New Fix Released
2011-06-01 16:10:44 Clint Byrum bug task added smart (Ubuntu Lucid)
2011-06-01 16:11:07 Clint Byrum bug task added smart (Ubuntu Maverick)
2011-06-01 16:11:27 Clint Byrum bug task added smart (Ubuntu Natty)
2011-06-01 16:11:53 Clint Byrum bug task added smart (Ubuntu Oneiric)
2011-06-01 16:14:09 Clint Byrum smart (Ubuntu Lucid): status New Fix Committed
2011-06-01 16:14:13 Clint Byrum bug added subscriber SRU Verification
2011-06-01 16:14:15 Clint Byrum tags verification-needed
2011-06-01 16:17:06 Clint Byrum smart (Ubuntu Maverick): status New Fix Committed
2011-06-01 16:18:58 Clint Byrum smart (Ubuntu Natty): status New Fix Committed
2011-06-05 13:56:54 Martin Pitt tags verification-needed verification-done
2011-06-08 18:38:23 Launchpad Janitor smart (Ubuntu Lucid): status Fix Committed Fix Released
2011-06-08 18:38:37 Launchpad Janitor smart (Ubuntu Maverick): status Fix Committed Fix Released
2011-06-08 18:39:10 Launchpad Janitor smart (Ubuntu Natty): status Fix Committed Fix Released