Opened 8 years ago

Closed 8 years ago

#14374 closed defect (wontfix)

recover from doctest timings cache corruption

Reported by: vbraun Owned by: roed
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: doctest framework Keywords:
Cc: roed Merged in:
Authors: Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14292 Stopgaps:

Description

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

Change History (10)

comment:1 Changed 8 years ago by jdemeyer

  • Dependencies set to #14292

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.

comment:2 follow-up: Changed 8 years ago by vbraun

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

comment:3 in reply to: ↑ 2 Changed 8 years ago by jdemeyer

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?

comment:4 Changed 8 years ago by roed

  • Component changed from doctest to doctest framework
  • Owner changed from mvngu to roed

comment:5 Changed 8 years ago by vbraun

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

comment:6 Changed 8 years ago by jdemeyer

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

comment:7 Changed 8 years ago by jdemeyer

I cannot reproduce the problem with #13278.

comment:8 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.9 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

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

comment:9 follow-up: Changed 8 years ago by vbraun

  • Authors set to Jeroen Demeyer
  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

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

comment:10 in reply to: ↑ 9 Changed 8 years ago by jdemeyer

  • Authors Jeroen Demeyer deleted
  • Resolution set to wontfix
  • Status changed from positive_review to closed

Replying to vbraun:

Somebody will fall into that trap

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

Note: See TracTickets for help on using tickets.