Bug 1032455 - [abrt] dnf-0.4.7-1.fc20: decoder.py:383:raw_decode:ValueError: No JSON object could be decoded
Summary: [abrt] dnf-0.4.7-1.fc20: decoder.py:383:raw_decode:ValueError: No JSON object...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a9f727365f840bdf43162af4ce2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-20 09:06 UTC by Lukas Slebodnik
Modified: 2013-12-14 02:45 UTC (History)
7 users (show)

Fixed In Version: dnf-0.4.9-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-14 02:45:21 UTC
Type: ---
Embargoed:


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

Description Lukas Slebodnik 2013-11-20 09:06:13 UTC
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 09:06:23 UTC
Created attachment 826471 [details]
File: backtrace

Comment 2 Lukas Slebodnik 2013-11-20 09:06:27 UTC
Created attachment 826472 [details]
File: environ

Comment 3 Zdeněk Pavlas 2013-11-20 09:47:12 UTC
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 11:02:52 UTC
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 12:56:48 UTC
Jan this seems related to your json storage patches. Will you please handle this?

Comment 6 Lukas Slebodnik 2013-11-20 13:30:24 UTC
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 12:29:55 UTC
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 13:13:42 UTC
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 17:18:03 UTC
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 16:40:02 UTC
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 18:20:44 UTC
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-14 02:45:21 UTC
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.