WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
175851
Introduce ServerWorkerRegistration task queues
https://bugs.webkit.org/show_bug.cgi?id=175851
Summary
Introduce ServerWorkerRegistration task queues
Brady Eidson
Reported
2017-08-22 14:21:49 PDT
Introduced ServerWorkerRegistration task queues This adds a job queue per-ServiceWorkerRegistration in the storage process. All it's used for ATM is still failing out the "register()" call's promise.
Attachments
Patch
(68.33 KB, patch)
2017-08-22 14:26 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1.58 MB, application/zip)
2017-08-22 15:42 PDT
,
Build Bot
no flags
Details
Patch
(69.24 KB, patch)
2017-08-22 15:57 PDT
,
Brady Eidson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(2.27 MB, application/zip)
2017-08-22 17:09 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(10.12 MB, application/zip)
2017-08-22 17:32 PDT
,
Build Bot
no flags
Details
With some logging even EWS should give me.
(63.31 KB, patch)
2017-08-23 14:22 PDT
,
Brady Eidson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(1.83 MB, application/zip)
2017-08-23 15:16 PDT
,
Build Bot
no flags
Details
Trying again, flushing stdout this time
(63.33 KB, patch)
2017-08-23 15:41 PDT
,
Brady Eidson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(1.47 MB, application/zip)
2017-08-23 17:00 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews124 for ios-simulator-wk2
(10.10 MB, application/zip)
2017-08-23 17:27 PDT
,
Build Bot
no flags
Details
For EWS (With test!)
(66.58 KB, patch)
2017-08-24 17:11 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
For EWS (With test!)
(64.08 KB, patch)
2017-08-24 17:14 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(73.75 KB, patch)
2017-08-24 19:09 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(73.69 KB, patch)
2017-08-25 10:35 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(12)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2017-08-22 14:26:18 PDT
Comment hidden (obsolete)
Created
attachment 318799
[details]
Patch
Build Bot
Comment 2
2017-08-22 15:42:38 PDT
Comment hidden (obsolete)
Comment on
attachment 318799
[details]
Patch
Attachment 318799
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4363865
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 3
2017-08-22 15:42:40 PDT
Comment hidden (obsolete)
Created
attachment 318813
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Brady Eidson
Comment 4
2017-08-22 15:45:47 PDT
(In reply to Build Bot from
comment #2
)
> Comment on
attachment 318799
[details]
> Patch > >
Attachment 318799
[details]
did not pass mac-wk2-ews (mac-wk2): > Output:
http://webkit-queues.webkit.org/results/4363865
> > New failing tests: > http/tests/workers/service/basic-register.html
Well, considering this passes 100% locally, this will be fun to figure out.
Brady Eidson
Comment 5
2017-08-22 15:57:58 PDT
Comment hidden (obsolete)
Created
attachment 318816
[details]
Patch
Brady Eidson
Comment 6
2017-08-22 15:58:18 PDT
Comment hidden (obsolete)
Comment on
attachment 318816
[details]
Patch Attempting to get more logging from the failure on EWS
Build Bot
Comment 7
2017-08-22 17:09:24 PDT
Comment hidden (obsolete)
Comment on
attachment 318816
[details]
Patch
Attachment 318816
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4364616
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 8
2017-08-22 17:09:25 PDT
Comment hidden (obsolete)
Created
attachment 318827
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 9
2017-08-22 17:32:40 PDT
Comment hidden (obsolete)
Comment on
attachment 318816
[details]
Patch
Attachment 318816
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4364748
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 10
2017-08-22 17:32:43 PDT
Comment hidden (obsolete)
Created
attachment 318833
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Brady Eidson
Comment 11
2017-08-23 10:30:36 PDT
Comment hidden (obsolete)
This is super frustrating, as I can't reproduce the failure on my El Cap, Sierra, or High Sierra machines with a local dev environment. Will have to try to work on the bot directly.
Brady Eidson
Comment 12
2017-08-23 14:22:58 PDT
Comment hidden (obsolete)
Created
attachment 318918
[details]
With some logging even EWS should give me.
Build Bot
Comment 13
2017-08-23 15:16:03 PDT
Comment hidden (obsolete)
Comment on
attachment 318918
[details]
With some logging even EWS should give me.
Attachment 318918
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4370775
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 14
2017-08-23 15:16:05 PDT
Comment hidden (obsolete)
Created
attachment 318929
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Brady Eidson
Comment 15
2017-08-23 15:28:31 PDT
Comment hidden (obsolete)
(In reply to Brady Eidson from
comment #12
)
> Created
attachment 318918
[details]
> With some logging even EWS should give me.
And that definitely did not work. It's not even revealing the printf() from the call to serviceWorker.register which is... suspicious.
Brady Eidson
Comment 16
2017-08-23 15:41:42 PDT
Comment hidden (obsolete)
Created
attachment 318932
[details]
Trying again, flushing stdout this time
Brady Eidson
Comment 17
2017-08-23 16:50:05 PDT
Okay so I can reproduce locally with a release build (which is what the EWS bot is using) I can *not* reproduce locally with a debug build. Now exploring what's different between those two...
Build Bot
Comment 18
2017-08-23 17:00:03 PDT
Comment hidden (obsolete)
Comment on
attachment 318932
[details]
Trying again, flushing stdout this time
Attachment 318932
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4371448
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 19
2017-08-23 17:00:05 PDT
Comment hidden (obsolete)
Created
attachment 318941
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 20
2017-08-23 17:27:33 PDT
Comment hidden (obsolete)
Comment on
attachment 318932
[details]
Trying again, flushing stdout this time
Attachment 318932
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4371539
New failing tests: http/tests/workers/service/basic-register.html
Build Bot
Comment 21
2017-08-23 17:27:35 PDT
Comment hidden (obsolete)
Created
attachment 318949
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Brady Eidson
Comment 22
2017-08-24 07:29:58 PDT
Comment hidden (obsolete)
This is too weird. The WK2 bots do release builds. So locally, with a release build, I can reproduce. But stepping aside from the run-webkit-tests script, I tried invoking WebKitTestRunner directly 4 different ways: Works - DYLD_FRAMEWORK_PATH=~/build/Debug/ ~/build/Debug/WebKitTestRunner
https://localhost:8443/workers/service/basic-register.html
Works - DYLD_FRAMEWORK_PATH=~/build/Debug/ ~/build/Debug/WebKitTestRunner
http://localhost:8000/workers/service/basic-register.html
Works - DYLD_FRAMEWORK_PATH=~/build/Release/ ~/build/Release/WebKitTestRunner
https://localhost:8443/workers/service/basic-register.html
FAILS - DYLD_FRAMEWORK_PATH=~/build/Release/ ~/build/Release/WebKitTestRunner
http://localhost:8000/workers/service/basic-register.html
So while Debug builds work with both http and https input URLs, Release builds work but only with https. Even more bizarre, with printf debugging, I've verified the serviceWorker property is available in all 4 of these cases, and there is an attempt to schedule the registration job. But for some reason... it never gets to the Storage process. Now, navigator.serviceWorker *is* supposed to be exposed only on HTTPS contexts but apparently our IDL parser doesn't correctly handle "SecureContext" quite yet. So I could fix that, make it HTTPs only, and call it a day. But... something weird is going on.
Brady Eidson
Comment 23
2017-08-24 13:31:02 PDT
We figured this out. Encoders and Decoder didn't match (one in WebCore one in WebKit) Why this works in Debug builds is a huge mystery!
Brady Eidson
Comment 24
2017-08-24 15:17:23 PDT
Comment hidden (obsolete)
Same patch after
https://bugs.webkit.org/show_bug.cgi?id=175952
lands should be fine.
Brady Eidson
Comment 25
2017-08-24 17:11:16 PDT
Comment hidden (obsolete)
Created
attachment 319041
[details]
For EWS (With test!)
Brady Eidson
Comment 26
2017-08-24 17:14:04 PDT
Comment hidden (obsolete)
Created
attachment 319043
[details]
For EWS (With test!)
Brady Eidson
Comment 27
2017-08-24 19:09:19 PDT
Created
attachment 319055
[details]
Patch
Andy Estes
Comment 28
2017-08-25 09:27:59 PDT
Comment on
attachment 319055
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319055&action=review
> Source/WebCore/workers/service/ServiceWorkerJobData.h:41 > + ServiceWorkerJobData(uint64_t connectionIdentifier); > + ServiceWorkerJobData(const ServiceWorkerJobData&);
Should these be explicit?
> Source/WebCore/workers/service/server/SWServer.cpp:108 > + { > + Locker<Lock> locker(m_taskThreadLock); > + }
Not sure why this necessary, but you told me in person that this was needed in IndexedDB and might be needed here too. If this is necessary then a comment would be helpful.
> Source/WebCore/workers/service/server/SWServerRegistration.h:41 > + SWServerRegistration(SWServer&);
Explicit?
Brady Eidson
Comment 29
2017-08-25 10:35:57 PDT
Created
attachment 319088
[details]
Patch
Brady Eidson
Comment 30
2017-08-25 10:36:43 PDT
Let EWS chew on it then will cq+
WebKit Commit Bot
Comment 31
2017-08-25 11:57:48 PDT
Comment on
attachment 319088
[details]
Patch Clearing flags on attachment: 319088 Committed
r221198
: <
http://trac.webkit.org/changeset/221198
>
WebKit Commit Bot
Comment 32
2017-08-25 11:57:50 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 33
2017-08-25 11:59:47 PDT
<
rdar://problem/34086138
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug