[Bug 752631] New: osc should verify the XML response from OBS api server before paring it
https://bugzilla.novell.com/show_bug.cgi?id=752631 https://bugzilla.novell.com/show_bug.cgi?id=752631#c0 Summary: osc should verify the XML response from OBS api server before paring it Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jfding@gmail.com QAContact: adrian@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.54 Safari/535.19 Sometime, osc will be encounter empty XML string when querying OBS api, and osc will abort with the following backtrace: Traceback (most recent call last): File "/usr/bin/osc", line 22, in r = babysitter.run(osccli) File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 53, in run return prg.main() File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 310, in main return self.cmd(args) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 333, in cmd retval = self.onecmd(argv) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 449, in onecmd return self._dispatch_cmd(handler, argv) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1179, in _dispatch_cmd return handler(argv[0], opts, *args) File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 3597, in do_checkout prj_dir = prj_dir, service_files = opts.source_service_files, server_service_files = opts.server_side_source_service_files, progress_obj=self.download_progress, size_limit=opts.limit_size, meta=opts.meta) File "/usr/lib/python2.7/site-packages/osc/core.py", line 4158, in checkout_package p.update(revision, server_service_files, size_limit) File "/usr/lib/python2.7/site-packages/osc/core.py", line 1942, in update fm = self.get_files_meta(revision=rev) File "/usr/lib/python2.7/site-packages/osc/core.py", line 1411, in get_files_meta root = ET.fromstring(fm) File "", line 107, in XML cElementTree.ParseError: no element found: line 1, column 0 Whether the root cause is from server side or from osc, osc should verify the XML string before parsing it, and retry or just quit decently with meaningful message when encountered this problem. see the pull request in github: https://github.com/openSUSE/osc/pull/3 thanks Reproducible: Sometimes Steps to Reproduce: 1. try to use osc to checkout a big project with many packages 2. 3. Actual Results: Traceback (most recent call last): File "/usr/bin/osc", line 22, in r = babysitter.run(osccli) File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 53, in run return prg.main() File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 310, in main return self.cmd(args) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 333, in cmd retval = self.onecmd(argv) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 449, in onecmd return self._dispatch_cmd(handler, argv) File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1179, in _dispatch_cmd return handler(argv[0], opts, *args) File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 3597, in do_checkout prj_dir = prj_dir, service_files = opts.source_service_files, server_service_files = opts.server_side_source_service_files, progress_obj=self.download_progress, size_limit=opts.limit_size, meta=opts.meta) File "/usr/lib/python2.7/site-packages/osc/core.py", line 4158, in checkout_package p.update(revision, server_service_files, size_limit) File "/usr/lib/python2.7/site-packages/osc/core.py", line 1942, in update fm = self.get_files_meta(revision=rev) File "/usr/lib/python2.7/site-packages/osc/core.py", line 1411, in get_files_meta root = ET.fromstring(fm) File "", line 107, in XML cElementTree.ParseError: no element found: line 1, column 0 Expected Results: avoid abort with backtrace -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=752631 https://bugzilla.novell.com/show_bug.cgi?id=752631#c kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@novell.com AssignedTo|bnc-team-screening@forge.pr |adrian@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com