Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in task_action_timers load on restart? #2702

Closed
hjoliver opened this issue Jun 24, 2018 · 7 comments · Fixed by #2703
Closed

Bug in task_action_timers load on restart? #2702

hjoliver opened this issue Jun 24, 2018 · 7 comments · Fixed by #2703
Assignees
Labels
bug Something is wrong :(
Milestone

Comments

@hjoliver
Copy link
Member

On current master, after restarting a simple test suite:

Traceback (most recent call last):
  File "/home/vagrant/cylc.git/lib/cylc/task_pool.py", line 430, in load_db_task_action_timers
    ctx_key = json.loads(str(ctx_key_raw))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
@hjoliver hjoliver added the bug? Not sure if this is a bug or not label Jun 24, 2018
@hjoliver hjoliver added this to the next maintenance release milestone Jun 24, 2018
@matthewrmshin
Copy link
Contributor

What was the Cylc version used to run the original suite before running the restart? (Need to figure out how best to reproduce.)

See also #2678.

@hjoliver
Copy link
Member Author

Both on current master.

@hjoliver
Copy link
Member Author

hjoliver commented Jun 25, 2018

line 430 in task_pool.py is:

     ctx_key = json.loads(str(ctx_key_raw))  

When the error occurs, the value of ctx_key_raw is "poll_timer".
I guess a plain string is not valid json? (I didn't think it was, but it's odd that you're not seeing the problem)

Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> json.loads("poll_timer")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

@hjoliver
Copy link
Member Author

For the record, my simple test suite (but I suspect any suite will do):

[scheduling]
    initial cycle point = 1
    cycling mode = integer
    [[dependencies]]
        [[[P1]]]
          graph = foo => bar
[runtime]
    [[foo]]
        script = sleep 10

@matthewrmshin matthewrmshin added bug Something is wrong :( and removed bug? Not sure if this is a bug or not labels Jun 25, 2018
@matthewrmshin matthewrmshin self-assigned this Jun 25, 2018
@matthewrmshin
Copy link
Contributor

Bug repeated. On the case to fix it now.

@matthewrmshin
Copy link
Contributor

(We don't notice this because it prints out a skip message + the traceback, so restart does not fail.)

@matthewrmshin
Copy link
Contributor

(The bug looks nasty, but is also relatively harmless.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants