Closed Bug 1009988 Opened 5 years ago Closed 5 years ago

Intermittent test_ocsp_caching.js | test failed (with xpcshell return code: 0) | head_psm.js | 2153389954 == 0

Categories

(Core :: Security: PSM, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla32
Tracking Status
firefox30 --- unaffected
firefox31 --- fixed
firefox32 --- fixed
firefox-esr24 --- unaffected

People

(Reporter: KWierso, Assigned: keeler)

References

Details

(Keywords: intermittent-failure)

Attachments

(2 files, 1 obsolete file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=39605218&tree=Mozilla-Inbound
b2g_emulator_vm mozilla-inbound debug test xpcshell on 2014-05-13 14:40:30 PDT for push 2880b8c11499

slave: tst-linux64-spot-644



15:44:49     INFO -  TEST-INFO | /builds/slave/test/build/tests/xpcshell/tests/security/manager/ssl/tests/unit/test_ocsp_caching.js | running test ...
15:45:16  WARNING -  TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/tests/security/manager/ssl/tests/unit/test_ocsp_caching.js | test failed (with xpcshell return code: 0), see following log:
15:45:16     INFO -  >>>>>>>
15:45:16     INFO -  xpcw: cd /data/local/tests/xpcshell/security/manager/ssl/tests/unit
15:45:16     INFO -  xpcw: xpcshell -r /data/local/tests/xpcshell/c/httpd.manifest -m -s -e const _HTTPD_JS_PATH = "/data/local/tests/xpcshell/c/httpd.js"; -e const _HEAD_JS_PATH = "/data/local/tests/xpcshell/head.js"; -e const _TESTING_MODULES_DIR = "/data/local/tests/xpcshell/m"; -f /data/local/tests/xpcshell/head.js -e const _SERVER_ADDR = "localhost" -e const _HEAD_FILES = ["/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js"]; -e const _TAIL_FILES = []; -e const _TEST_FILE = ["test_ocsp_caching.js"]; -e _execute_test(); quit(0);
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file ../../../gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2158
15:45:16     INFO -  [6855] WARNING: NS_ENSURE_TRUE(lowMemFd != -1) failed: file ../../../gecko/widget/gonk/GonkMemoryPressureMonitoring.cpp, line 132
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test MAIN run_test pending (1)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 0 pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test MAIN run_test finished (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | running event loop
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [_getBinaryUtil : 327] true == true
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [_setupTLSServerTest : 369] true == true
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 0 finished (2)
15:45:16     INFO -  sending 'GET / HTTP/1.0
15:45:16     INFO -  '
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (2)
15:45:16     INFO -  HTTP/1.0 200 OK
15:45:16     INFO -  content-type: text/plain
15:45:16     INFO -  connection: close
15:45:16     INFO -  server: httpd.js
15:45:16     INFO -  date: Tue, 13 May 2014 22:45:01 GMT
15:45:16     INFO -  content-length: 3
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 1 pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 2 pending (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 1 finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 2 finished (2)
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-unknown.example.com'
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-unknown.example.com'
15:45:16     INFO -  PR_Recv failed: SSL_ERROR_BAD_CERT_ALERT
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [add_connection_test/</< : 296] 2153389954 == 2153389954
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 3 pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-PASS | test_ocsp_caching.js | [add_tests_in_mode/< : 65] 0 == 0
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 4 pending (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 3 finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 4 finished (2)
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-none.example.com'
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-none.example.com'
15:45:16     INFO -  System JS : ERROR (null):0 - uncaught exception: 2147500037
15:45:16     INFO -  System JS : ERROR (null):0 - uncaught exception: 2147500037
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "gFetchCount: 1"
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "returning 500 Internal Server Error"
15:45:16     INFO -  PR_Recv failed: SSL_ERROR_BAD_CERT_ALERT
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [add_connection_test/</< : 296] 2153389954 == 2153389954
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 5 pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-PASS | test_ocsp_caching.js | [add_tests_in_mode/< : 72] 1 == 1
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 6 pending (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (3)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 5 finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "Sleeping for 1200ms"
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 6 finished (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 7 pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test finished (2)
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | Starting
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test pending (2)
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 7 finished (2)
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-none.example.com'
15:45:16     INFO -  found pre-defined host 'ocsp-stapling-none.example.com'
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "gFetchCount: 2"
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "returning 200 OK"
15:45:16     INFO -  TEST-INFO | test_ocsp_caching.js | "Generating ocsp response for 'localhostAndExampleCom'"
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [_getBinaryUtil : 327] true == true
15:45:16     INFO -  TEST-INFO | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | "arg_array =sql:tlsserver,good,localhostAndExampleCom,unused,/data/local/tests/xpcshell/security/manager/ssl/tests/unit/0.ocsp"
15:45:16     INFO -  TEST-PASS | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | [generateOCSPResponses : 404] 0 == 0
15:45:16     INFO -  PR_Recv failed: SSL_ERROR_BAD_CERT_ALERT
15:45:16  WARNING -  TEST-UNEXPECTED-FAIL | /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js | 2153389954 == 0 - See following stack:
15:45:16     INFO -  JS frame :: /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js :: add_connection_test/</< :: line 296
15:45:16     INFO -  JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: Handler.prototype.process :: line 863
15:45:16     INFO -  JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: this.PromiseWalker.walkerLoop :: line 742
15:45:16     INFO -  JS frame :: /data/local/tests/xpcshell/head.js :: _do_main :: line 176
15:45:16     INFO -  JS frame :: /data/local/tests/xpcshell/head.js :: _execute_test :: line 389
15:45:16     INFO -  JS frame :: -e :: <TOP_LEVEL> :: line 1
15:45:16     INFO -  native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
15:45:16     INFO -  TEST-INFO | (xpcshell/head.js) | exiting test
15:45:16     INFO -  !!! error running onStopped callback: TypeError: callback is not a function
15:45:16     INFO -  ************************************************************
15:45:16     INFO -  * Call to xpconnect wrapped JSObject produced this error:  *
15:45:16     INFO -  [Exception... "[JavaScript Error: "_log_message_with_stack is not a function" {file: "/data/local/tests/xpcshell/head.js" line: 359}]'[JavaScript Error: "_log_message_with_stack is not a function" {file: "/data/local/tests/xpcshell/head.js" line: 359}]' when calling method: [nsIObserver::observe]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: yes]
15:45:16     INFO -  ************************************************************
15:45:16     INFO -  [6855] WARNING: Leaking the RDF Service.: file ../../../gecko/rdf/build/nsRDFModule.cpp, line 165
15:45:16     INFO -  [6855] WARNING: '!compMgr', file ../../../gecko/xpcom/glue/nsComponentManagerUtils.cpp, line 59
15:45:16     INFO -  [6855] WARNING: OOPDeinit() without successful OOPInit(): file ../../../gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2588
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  [6855] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file ../../../gecko/xpcom/base/nsTraceRefcnt.cpp, line 143
15:45:16     INFO -  nsStringStats
15:45:16     INFO -   => mAllocCount:           6156
15:45:16     INFO -   => mReallocCount:          525
15:45:16     INFO -   => mFreeCount:            6156
15:45:16     INFO -   => mShareCount:          10060
15:45:16     INFO -   => mAdoptCount:            302
15:45:16     INFO -   => mAdoptFreeCount:        302
15:45:16     INFO -   => Process ID: 6855, Thread ID: 1074467976
15:45:16     INFO -  <<<<<<<
15:45:17     INFO -  TEST-INFO | /builds/slave/test/build/tests/xpcshell/tests/security/manager/ssl/tests/unit/test_ocsp_required.js | running test ...
Retriggers on this seem to be pointing to bug 1005355 as introducing this.
Depends on: 1005355
Flags: needinfo?(dkeeler)
Bug 1005355 enabled this test on B2G, so something must have already been broken. I'll look into this.
Assignee: nobody → dkeeler
Flags: needinfo?(dkeeler)
Component: Security → Security: PSM
David, this is high up on OrangeFactor - do you know when you might be able to take a look?
Flags: needinfo?(dkeeler)
I've made a little progress (I was able to reproduce this in a local build), but it's slow going. I'll keep at it, though.
Flags: needinfo?(dkeeler)
(In reply to David Keeler (:keeler) [use needinfo?] from comment #84)
> I've made a little progress (I was able to reproduce this in a local build),
> but it's slow going. I'll keep at it, though.

Thank you :-)
I think I know what's going on here. I managed to get a logcat of a failure:

05-30 20:46:00.354 I/PRLog   (  530): 66256[43f58c00]: Top of MozillaPKIXVerifyCert
05-30 20:46:00.354 I/PRLog   (  530): 66256[43f58c00]: NSSCertDBTrustDomain: Top of IsChainValid mCheckCallback=450ffb94
05-30 20:46:00.354 I/PRLog   (  530): 66256[43f58c00]: verifycert: Inside the Callback 
05-30 20:46:00.354 I/PRLog   (  530): 66256[43f58c00]: BuiltInRoot? subject=CN=Test CA token=Software Security Device
05-30 20:46:00.364 I/PRLog   (  530): 66256[43f58c00]: NSSCertDBTrustDomain: Top of CheckRevocation
05-30 20:46:00.364 I/PRLog   (  530): 66256[43f58c00]: NSSCertDBTrustDomain: no stapled OCSP response
05-30 20:46:00.364 I/PRLog   (  530): 66256[43f58c00]: OCSPCache::Get(Test End-entity, Test CA) in cache
05-30 20:46:00.364 I/PRLog   (  530): 66256[43f58c00]: NSSCertDBTrustDomain: cached OCSP response: error -8066 valid until 1401482764000000
05-30 20:46:00.554 I/Gecko   (   44): -*- Webapps.jsm : Adding header: X-MOZ-B2G-DEVICE: Full Android on Emulator
05-30 20:46:00.554 I/Gecko   (   44): -*- Webapps.jsm : adding manifest etag:"ed2e516580c8fb5317a1d1378f02592dc64c69f0c822b52a1dc17601fdfbd2a7"
05-30 20:46:00.594 I/Gecko   (   44): -*- Webapps.jsm : Checking manifest at https://marketplace.firefox.com/packaged.webapp
05-30 20:46:00.903 I/Gecko   (   44): -*- Webapps.jsm : Checking manifest at http://inapp-pay-test.paas.allizom.org/manifest.webapp
05-30 20:46:00.913 I/Gecko   (  530): 
05-30 20:46:00.913 I/Gecko   (  530): {"source_file":"test_ocsp_caching.js","diagnostic":"\"gFetchCount: 2\"","action":"test_info","_time":1401482760918}
05-30 20:46:00.953 I/Gecko   (  530): 
05-30 20:46:00.953 I/Gecko   (  530): {"source_file":"test_ocsp_caching.js","diagnostic":"\"returning 200 OK\"","action":"test_info","_time":1401482760955}
05-30 20:46:00.953 I/Gecko   (  530): 
05-30 20:46:00.953 I/Gecko   (  530): {"source_file":"test_ocsp_caching.js","diagnostic":"\"Generating ocsp response for 'localhostAndExampleCom'\"","action":"test_info","_time":1401482760958}
05-30 20:46:01.003 I/Gecko   (  530): 
05-30 20:46:01.003 I/Gecko   (  530): {"source_file":"/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js","test_name":"_getBinaryUtil","line_number":328,"diagnostic":"[_getBinaryUtil : 328] true == true\n","action":"test_pass","_time":1401482761005}
05-30 20:46:01.053 I/Gecko   (  530): 
05-30 20:46:01.053 I/Gecko   (  530): {"source_file":"/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js","diagnostic":"\"arg_array =sql:tlsserver,good,localhostAndExampleCom,unused,/data/local/tests/xpcshell/security/manager/ssl/tests/unit/0.ocsp\"","action":"test_info","_time":1401482761023}
05-30 20:46:01.063 I/Gecko   (   44): -*- Webapps.jsm : Checking manifest at https://marketplace.allizom.org/manifest.webapp
05-30 20:46:01.214 I/Gecko   (   44): -*- Webapps.jsm : Checking manifest at http://mochi.test:8888/manifest.webapp
05-30 20:46:02.013 I/Gecko   (  530): 
05-30 20:46:02.013 I/Gecko   (  530): {"source_file":"/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js","test_name":"generateOCSPResponses","line_number":405,"diagnostic":"[generateOCSPResponses : 405] 0 == 0\n","action":"test_pass","_time":1401482762017}
05-30 20:46:02.043 I/Gecko   (  530): 
05-30 20:46:02.043 I/Gecko   (  530): {"source_file":"/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js","diagnostic":"\"readFile returning 327 bytes\"","action":"test_info","_time":1401482762047}
05-30 20:46:02.414 I/Gecko   (  530): [530] WARNING: OCSP TIMEOUT!: file /home/keeler/B2G/gecko/security/manager/ssl/src/nsNSSCallbacks.cpp, line 461
05-30 20:46:02.414 I/PRLog   (  530): 66256[43f58c00]: OCSPCache::Put(Test End-entity, Test CA) already in cache - not replacing with less important status
05-30 20:46:02.414 I/PRLog   (  530): 66256[43f58c00]: aErrorCode: -8071, mEntries[index]->mErrorCode: -8066
05-30 20:46:02.414 I/PRLog   (  530): 66256[43f58c00]: NSSCertDBTrustDomain: returning SECFailure from cached response after OCSP request failure
05-30 20:46:02.963 I/Gecko   (  530): 
05-30 20:46:02.963 I/Gecko   (  530): {"diagnostic":"2153389954 == 0 - See following stack:","source_file":"/data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js","stack":"JS frame :: /data/local/tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js :: add_connection_test/</< :: line 297\nJS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: Handler.prototype.process :: line 863\nJS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: this.PromiseWalker.walkerLoop :: line 742\nJS frame :: /data/local/tests/xpcshell/head.js :: _do_main :: line 176\nJS frame :: /data/local/tests/xpcshell/head.js :: _execute_test :: line 389\nJS frame :: -e :: <TOP_LEVEL> :: line 1\nnative frame :: <unknown filename> :: <TOP_LEVEL> :: line 0\n","action":"test_unexpected_fail","_time":1401482762971}

There's a lot of unrelated spew here, but the important parts are that around 05-30 20:46:00.364, the code makes an OCSP request. At 05-30 20:46:02.043, the response has been prepared and is ready to be returned. However, at 05-30 20:46:02.414, the requesting code times out and returns with a server failure. Since we actually do want OCSP requests to time out after 2 seconds for DV certificates, we have to make OCSP response generation faster or pre-generate the responses.
Attached patch patch (obsolete) — Splinter Review
Attachment #8431938 - Flags: review?(cviecco)
Comment on attachment 8431938 [details] [diff] [review]
patch

Review of attachment 8431938 [details] [diff] [review]:
-----------------------------------------------------------------

The code is simple, only setting the r- because it is not clear to me why this fixes the issue.

::: security/manager/ssl/tests/unit/test_ocsp_caching.js
@@ +86,5 @@
>    });
> +  add_test(function() {
> +    gGoodOCSPResponse = generateGoodOCSPResponse();
> +    run_next_test();
> +  });

1. If this is a global const, why not initialize it in 'run_test'?
2. Why would this fix the issue? 
3. Do we have to do this change for all our tests?
Attachment #8431938 - Flags: review?(cviecco) → review-
1. It's not a global const - it should always be newer than the stapled response in the connection that gave the "unknown" status.
2. The issue is that we were generating the response in the OCSP responder callback. If that took more than 2 seconds, the test would fail. This way, we generate the response before the request is even made, so that the responder can immediately use it and (hopefully) never take more than 2 seconds.
3. I had a look, but as far as I can tell, no other test generates a response in a callback, so nothing else needs to be fixed. We do need to be aware of this going forward, however.
Oh, no, I lied - looks like startOCSPResponder does this too. Hmmm. This will take some more effort.
Attached patch patch v2Splinter Review
Attachment #8431938 - Attachment is obsolete: true
Attachment #8432675 - Flags: review?(cviecco)
Attachment #8432675 - Flags: review?(cviecco) → review+
Try looked good. Inbound is closed and seems to be taking a while, so marking checkin-needed.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e79c9dba2792
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
David, I'd like to get this fix onto Aurora as well, but head_psm.js has a bit a conflict that I'm not sure how to resolve (though I suspect it's trivial). Can you please take a look? :)
Flags: needinfo?(dkeeler)
Attached patch patch for auroraSplinter Review
Sure thing - this should do it.
Attachment #8434310 - Flags: review+
Flags: needinfo?(dkeeler)
Comment 124 is a new issue. I've filed bug 1059883 for it.
You need to log in before you can comment on or make changes to this bug.