** Description changed:

+ [ Impact ]
+ 
+ If the jobs-status.json file somehow got corrupted on a pro attached
+ machine, the ua-timer.service would crash when trying to read it. This
+ is not a critical state file, so the fix is to catch the error and
+ delete the file if it is corrupted.
+ 
+ [ Test Plan ]
+ 
+ On a lxd container
+ 
+ systemctl start ua-timer.service
+ # check contents of /var/lib/ubuntu-advantage/jobs-status.json
+ cat /var/lib/ubuntu-advantage/jobs-status.json
+ # corrupt the file
+ tail /dev/random >> /var/lib/ubuntu-advantage/jobs-status.json
+ systemctl start ua-timer.service
+ 
+ On an affected system, the service will crash. With the fix installed,
+ it will not crash.
+ 
+ [ Where problems could occur ]
+ 
+ Because this fix doesn't fix whatever was actually causing the invalid
+ utf-8 in the file, it may cover up the underlying bug indefinitely. If
+ it is a recurring problem a system, that system may re-run some pro
+ timer jobs more frequently than necessary. Note that the timer is only
+ enabled on attached systems.
+ 
+ [ Other Info ]
+ 
+ We could not reproduce the error, except by inserting invalid characters
+ in the file intentionally. The fair solution to this is to capture
+ errors when trying to read this file and erase it if it is corrupt. The
+ next execution of the timer jobs will recreate it.
+ 
+ [ Original Description ]
+ 
  The Ubuntu Error Tracker has been receiving reports about a problem regarding 
ubuntu-advantage-tools.  This problem was most recently seen with package 
version 33.2~24.04.1, the problem page at 
https://errors.ubuntu.com/problem/ec1a626cb75b23a9228a49f84ecc3447a048ce92 
contains more details, including versions of packages affected, stacktrace or 
traceback, and individual crash reports.
  If you do not have access to the Ubuntu Error Tracker and are a software 
developer, you can request it at http://forms.canonical.com/reports/.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2078737

Title:
  /usr/lib/ubuntu-advantage/timer.py:UnicodeDecodeError:/usr/lib/ubuntu-
  advantage/timer.py@209:run_jobs:read:read:load_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2078737/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to