Closed Bug 1640357 Opened 4 years ago Closed 4 years ago

Intermittent Reftest printing/<anything> print printing/<anything>-ref.html | Couldn't parse C:\Users\<path>.pdf, exception: InvalidPDFException: Invalid PDF structure.

Categories

(Core :: Printing: Output, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox-esr68 --- disabled
firefox-esr78 --- fixed
firefox76 --- disabled
firefox77 --- disabled
firefox78 --- wontfix
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: hiro)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Filed by: apavel [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=303429851&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/XwPKAziBSXaMhJU-EUHLZQ/runs/0/artifacts/public/logs/live_backing.log
Reftest URL: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/XwPKAziBSXaMhJU-EUHLZQ/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1


[task 2020-05-22T23:49:23.358Z] 23:49:23 INFO - REFTEST TEST-START | layout/reftests/printing/test-async-print.html print layout/reftests/printing/test-text-ref.html
[task 2020-05-22T23:49:23.358Z] 23:49:23 INFO - REFTEST TEST-LOAD | file:///Z:/task_1590188968/build/tests/reftest/tests/layout/reftests/printing/test-async-print.html | 7 / 10 (70%)
[task 2020-05-22T23:49:23.438Z] 23:49:23 WARNING - REFTEST WARNING | [CONTENT] MozInvalidateEvent didn't invalidate
[task 2020-05-22T23:49:23.623Z] 23:49:23 INFO - REFTEST TEST-LOAD | file:///Z:/task_1590188968/build/tests/reftest/tests/layout/reftests/printing/test-text-ref.html | 7 / 10 (70%)
[task 2020-05-22T23:49:25.752Z] 23:49:25 INFO - console.log: "Warning: Indexing all PDF objects"
[task 2020-05-22T23:49:25.771Z] 23:49:25 INFO - REFTEST TEST-UNEXPECTED-FAIL | layout/reftests/printing/test-async-print.html print layout/reftests/printing/test-text-ref.html | Couldn't parse C:\Users\task_1590188968\AppData\Local\Temp\reftest-print-1590191364138-a272e553.pdf, exception: InvalidPDFException: Invalid PDF structure.
[task 2020-05-22T23:49:25.771Z] 23:49:25 INFO - REFTEST TEST-END | layout/reftests/printing/test-async-print.html print layout/reftests/printing/test-text-ref.html
[task 2020-05-22T23:49:25.772Z] 23:49:25 INFO - REFTEST TEST-END | layout/reftests/printing/test-async-print.html print layout/reftests/printing/test-text-ref.html

Summary: Intermittent printing/test-async-print.html print printing/test-text-ref.html | Couldn't parse C:\Users\task_1590188968\AppData\Local\Temp\reftest-print-1590191364138-a272e553.pdf, exception: InvalidPDFException: Invalid PDF structure. → Intermittent Reftest printing/<anything> print printing/<anything>-ref.html | Couldn't parse C:\Users\<path>.pdf, exception: InvalidPDFException: Invalid PDF structure.

All of the failures that I have checked have this line in the log just before the failure:
console.log: "Warning: Indexing all PDF objects"

which comes from [1]
The error is thrown from indexObjects, which make me wonder if in the other cases it uses readXRef.
I can't quite see where recoveryMode gets originally passed in.

[1] https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/browser/extensions/pdfjs/content/build/pdf.worker.js#4679

Bug 1638364 updated pdf.js and also modified this file. The issue affects only Windows for which we already have known issues with temporary files (e.g. with XPCshell).

Flags: needinfo?(ryanvm)
Regressed by: 1638364

If I'm not mistaken, this first started happening 2 days after that pdf.js update landed? Have we for sure bisected this to be the root cause of the failure?

Flags: needinfo?(ryanvm)
Has Regression Range: --- → yes
Keywords: regression

(In reply to Bob Owen (:bobowen) from comment #4)
...

I can't quite see where recoveryMode gets originally passed in.

Dug a bit further, this comes ultimately from the loadDocumnt call [1].
With it looks like loadDocument(true) being called if the first one fails.

[1] https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/browser/extensions/pdfjs/content/build/pdf.worker.js#434

Looks like this stopped right around the time bug 1641733 landed.

Try push of bug 1641733 grafted to ESR78:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=750edb9d2e3f87b6fc95620b52477f2d392e3ecf

Failures definitely look gone in comparison to the baseline rate shown on ESR78. I'm calling this fixed by bug 1641733.

Assignee: nobody → hikezoe.birchill
Status: NEW → RESOLVED
Closed: 4 years ago
Depends on: 1641733
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.