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

recover from doctest timings cache corruption #14374

Closed
vbraun opened this issue Mar 28, 2013 · 13 comments
Closed

recover from doctest timings cache corruption #14374

vbraun opened this issue Mar 28, 2013 · 13 comments

Comments

@vbraun
Copy link
Member

vbraun commented Mar 28, 2013

Caches can be corrupted as you doctest stuff, you never know when things die. The new doctest framework does not recover gracefully:

[vbraun@volker-desktop hg]$ echo foobar > ~/.sage/timings_dt_test.json 
[vbraun@volker-desktop hg]$ sage -tp sage/doctest/
Running doctests with ID 2013-03-28-12-29-46-c1280e16.
Doctesting 9 files using 10 threads.
sage -t sage/doctest/reporting.py
**********************************************************************
File "sage/doctest/reporting.py", line 103, in sage.doctest.reporting.DocTestReporter.__init__
Failed example:
    DC = DocTestController(DocTestDefaults(),[filename])
Expected nothing
Got:
    Error loading stats from /home/vbraun/.sage/timings_dt_test.json
**********************************************************************
File "sage/doctest/reporting.py", line 130, in sage.doctest.reporting.DocTestReporter.report_head
Failed example:
    DC = DocTestController(DD, [filename])
Expected nothing
Got:
    Error loading stats from /home/vbraun/.sage/timings_dt_test.json

Depends on #14292

CC: @roed314

Component: doctest framework

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/14374

@vbraun vbraun added this to the sage-5.9 milestone Mar 28, 2013
@jdemeyer
Copy link

comment:1

Volker, #14292 (I have a patch but it's on sage.math which is currently offline) should ensure that the JSON file cannot be corrupted anymore. So, if we get an error loading the JSON file, it should be a genuine error and we want to get a doctest failure.

So we could close this one as duplicate of #14292.

@jdemeyer
Copy link

Dependencies: #14292

@vbraun
Copy link
Member Author

vbraun commented Mar 28, 2013

comment:2

There is also the issue of changing JSON fields (try pushing/popping #13278, this is the problem that I originally had).

@jdemeyer
Copy link

comment:3

Replying to @vbraun:

There is also the issue of changing JSON fields (try pushing/popping #13278, this is the problem that I originally had).

Does it cause the JSON stats to fail to load?

@vbraun
Copy link
Member Author

vbraun commented Mar 28, 2013

comment:5

Yes, all doctests failed for me after first pushing #13278

@jdemeyer
Copy link

comment:6

Strange, I haven't seen this error while working on #13278. But I'll test it now.

@jdemeyer
Copy link

comment:7

I cannot reproduce the problem with #13278.

@jdemeyer
Copy link

comment:8

Do we agree that this is fixed by #14292 and that it can be closed?

@jdemeyer jdemeyer removed this from the sage-5.9 milestone Apr 11, 2013
@vbraun
Copy link
Member Author

vbraun commented Apr 11, 2013

Author: Jeroen Demeyer

@vbraun
Copy link
Member Author

vbraun commented Apr 11, 2013

Reviewer: Volker Braun

@vbraun
Copy link
Member Author

vbraun commented Apr 11, 2013

comment:9

I guess its good enough. Somebody will fall into that trap but at least I'll know how to fix it on my machine.

@jdemeyer
Copy link

comment:10

Replying to @vbraun:

Somebody will fall into that trap

If they do, they might have found a genuine error in Sage.

@jdemeyer
Copy link

Changed author from Jeroen Demeyer to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants