WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194086
[GLIB] WebDriver: race condition when session starts
https://bugs.webkit.org/show_bug.cgi?id=194086
Summary
[GLIB] WebDriver: race condition when session starts
Carlos Garcia Campos
Reported
2019-01-31 04:03:23 PST
This is causing flakiness in WebDriver bots, I can only reproduce it locally when my CPUs are at 100%. The thing is that sometimes we receive an empty target list right after the connection is established because RemoteInspector::setClient() calls pushListingsSoon() before a target has been registered. Most of the times the target is registered before the listing is pushed, but it can happen that when pushed the listing is still empty. After the target is registered an empty target list means the connection was lost, so we clear the connection and target. We need to ensure we do that only after the target has been registered.
Attachments
Patch
(1.83 KB, patch)
2019-01-31 04:06 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Updated patch
(2.02 KB, patch)
2019-01-31 04:53 PST
,
Carlos Garcia Campos
pnormand
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2019-01-31 04:06:46 PST
Created
attachment 360716
[details]
Patch
Philippe Normand
Comment 2
2019-01-31 04:17:32 PST
Comment on
attachment 360716
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=360716&action=review
> Source/WebDriver/glib/SessionHostGlib.cpp:335 > m_connectionID = 0; > - if (m_dbusConnection) > + if (m_connectionID && m_dbusConnection)
So now this condition is always false because m_connectionID is set to 0 before the if. Is this correct? Why not remove the if block then?
Carlos Garcia Campos
Comment 3
2019-01-31 04:49:27 PST
(In reply to Philippe Normand from
comment #2
)
> Comment on
attachment 360716
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=360716&action=review
> > > Source/WebDriver/glib/SessionHostGlib.cpp:335 > > m_connectionID = 0; > > - if (m_dbusConnection) > > + if (m_connectionID && m_dbusConnection) > > So now this condition is always false because m_connectionID is set to 0 > before the if. Is this correct? Why not remove the if block then?
Oops, you are right!
Carlos Garcia Campos
Comment 4
2019-01-31 04:53:21 PST
Created
attachment 360717
[details]
Updated patch
Carlos Garcia Campos
Comment 5
2019-01-31 05:06:22 PST
Committed
r240778
: <
https://trac.webkit.org/changeset/240778
>
Radar WebKit Bug Importer
Comment 6
2019-01-31 05:07:28 PST
<
rdar://problem/47699722
>
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