Bug 1032455 - [abrt] dnf-0.4.7-1.fc20: decoder.py:383:raw_decode:ValueError: No JSON object could be decoded
[abrt] dnf-0.4.7-1.fc20: decoder.py:383:raw_decode:ValueError: No JSON object...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:a9f727365f840bdf43162af4ce2...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 04:06 EST by Lukas Slebodnik
Modified: 2013-12-13 21:45 EST (History)
7 users (show)

See Also:
Fixed In Version: dnf-0.4.9-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 21:45:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.57 KB, text/plain)
2013-11-20 04:06 EST, Lukas Slebodnik
no flags Details
File: environ (72 bytes, text/plain)
2013-11-20 04:06 EST, Lukas Slebodnik
no flags Details

  None (edit)
Description Lukas Slebodnik 2013-11-20 04:06:13 EST
Version-Release number of selected component:
dnf-0.4.7-1.fc20

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /usr/bin/dnf -v makecache timer
dso_list:       python-libs-2.7.5-9.fc20.x86_64
executable:     /usr/bin/dnf
kernel:         3.11.8-300.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
decoder.py:383:raw_decode:ValueError: No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 277, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 112, in _main
    cli.configure(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1308, in configure
    self._configure_repos(opts)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1081, in _configure_repos
    for rid in self.base._persistor.get_expired_repos():
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 85, in get_expired_repos
    return self._get_expired_from_json()
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 69, in _get_expired_from_json
    data = json.load(f)
  File "/usr/lib64/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Local variables in innermost frame:
s: ''
self: <json.decoder.JSONDecoder object at 0x7fe0aa276090>
idx: 0
Comment 1 Lukas Slebodnik 2013-11-20 04:06:23 EST
Created attachment 826471 [details]
File: backtrace
Comment 2 Lukas Slebodnik 2013-11-20 04:06:27 EST
Created attachment 826472 [details]
File: environ
Comment 3 Zdeněk Pavlas 2013-11-20 04:47:12 EST
Could you confirm that /var/cache/dnf/$basearch/$release/expired_repos.json is an empty file? That should not happen.. A reproducer that creates it would be great.
Comment 4 Lukas Slebodnik 2013-11-20 06:02:52 EST
sh-4.2# ls -l /var/cache/dnf/x86_64/20/expired_repos.json
-rw-r--r--. 1 root root 2 Nov 20 11:23 /var/cache/dnf/x86_64/20/expired_repos.json

sh-4.2# hexdump -C /var/cache/dnf/x86_64/20/expired_repos.json
00000000  5b 5d                                             |[]|
00000002
Comment 5 Ales Kozumplik 2013-11-20 07:56:48 EST
Jan this seems related to your json storage patches. Will you please handle this?
Comment 6 Lukas Slebodnik 2013-11-20 08:30:24 EST
I forgot to write in the comment 4. I don't know how to reproduce it.
The problem occurred on 2013-11-20 09:23:29. I didn't use dnf at this time.
As you can see, file expired_repos.json was modified at "11:23"

I try dnf, but sometimes I use also yum. So it may be related.
Comment 7 Honza Silhan 2013-11-22 07:29:55 EST
Has it worked after "11:23"? Is in your dir "/var/cache/dnf/x86_64/20" file "expired_repos" (without json extention)? Had you interrupted dnf job sometime before the error occured?
Comment 8 Lukas Slebodnik 2013-11-22 08:13:42 EST
Yes, dnf works well. It occurred just a once and I am not sure how to reproduce.

At the moment:
sh-4.2# ls -l /var/cache/dnf/x86_64/20/expired_repos.json
-rw-r--r--. 1 root root 2 Nov 22 13:37 /var/cache/dnf/x86_64/20/expired_repos.json
sh-4.2# cat /var/cache/dnf/x86_64/20/expired_repos.json
[]
Comment 9 Honza Silhan 2013-11-22 12:18:03 EST
Although we don't know what caused that error, I've fixed it for the case that the file is empty as it's look like (still should never happen). It will now continue execution and print warning: "expired_repos.json is empty file". If you see this error message please report it again.
Comment 10 Fedora Update System 2013-12-03 11:40:02 EST
dnf-0.4.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.9-1.fc20
Comment 11 Fedora Update System 2013-12-03 13:20:44 EST
Package dnf-0.4.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.9-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22638/dnf-0.4.9-1.fc20
then log in and leave karma (feedback).
Comment 12 Fedora Update System 2013-12-13 21:45:21 EST
dnf-0.4.9-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.