MozillaSecurity / MozillaSecurity/FuzzManager

Crash in crashmanager.cron.bug_update_status

Open
#994 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug bugzilla crashmanager
Dominant language
Python
Stars
208
Forks
48
Avg merge
23h 5m
Merged PRs (30d)
2

Description

Found in logs on server while testing:

Traceback (most recent call last):
  File "/home/worker/.local/lib/python3.10/site-packages/requests/models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/worker/.local/lib/python3.10/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
  File "/src/server/crashmanager/cron.py", line 69, in bug_update_status
    call_command("bug_update_status")
  File "/home/worker/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 194, in call_command
    return command.execute(*args, **defaults)
  File "/home/worker/.local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/src/server/crashmanager/management/commands/bug_update_status.py", line 33, in handle
    bugStatus = providerInstance.getBugStatus(bugIds, username, password)
  File "/src/server/crashmanager/Bugtracker/BugzillaProvider.py", line 61, in getBugStatus
    bugs = bz.getBugStatus(bugIds)
  File "/src/server/crashmanager/Bugtracker/BugzillaREST.py", line 77, in getBugStatus
    return self.getBugs(
  File "/src/server/crashmanager/Bugtracker/BugzillaREST.py", line 110, in getBugs
    json = response.json()
  File "/home/worker/.local/lib/python3.10/site-packages/requests/models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with crashmanager/cron.py:69 and crashmanager/management/commands/bug_update_status.py:33, then trace BugzillaProvider.py:61 into BugzillaREST.py:77 and :110. Reproduce the bug_update_status path and determine the expected behavior when the Bugzilla response is not JSON; done means that behavior is verified without the cron task crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.