<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>231330</bug_id>
          
          <creation_ts>2021-10-06 13:53:01 -0700</creation_ts>
          <short_desc>Deadlocks in UIKeyboardTaskQueue from WKContentView(WKInteraction) endSelectionChange.</short_desc>
          <delta_ts>2022-02-22 10:57:42 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Justin Cohen">justincohen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ajuma</cc>
    
    <cc>andresg_22</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1801326</commentid>
    <comment_count>0</comment_count>
    <who name="Justin Cohen">justincohen</who>
    <bug_when>2021-10-06 13:53:01 -0700</bug_when>
    <thetext>Chrome is seeing a growing number of watchdog kills a day with stacks similar to below on iOS 15.0 and 15.1, as iOS 15 continues to be adopted.

Perhaps the fix for https://bugs.webkit.org/show_bug.cgi?id=228051 https://trac.webkit.org/changeset/280019/webkit introduced a deadlock?

0x00000001baaa5550	(libsystem_kernel.dylib + 0x00001550)		__psynch_cvwait
0x00000001daed3994	(libsystem_pthread.dylib + 0x00001994)		_pthread_cond_wait$VARIANT$armv81
0x0000000182c85d2c	(Foundation + 0x00084d2c)		-[NSCondition waitUntilDate:]
0x0000000182c780ec	(Foundation + 0x000770ec)		-[NSConditionLock lockWhenCondition:beforeDate:]
0x0000000183d9997c	(UIKitCore + 0x0057897c)		-[UIKeyboardTaskQueue lockWhenReadyForMainThread]
0x0000000183b73d70	(UIKitCore + 0x00352d70)		-[UIKeyboardTaskQueue waitUntilAllTasksAreFinished]
0x00000001844d02f0	(UIKitCore + 0x00caf2f0)		-[UIKeyboardImpl generateAutofillCandidateByAddingTask:]
0x0000000183e04214	(UIKitCore + 0x005e3214)		-[UIKeyboardImpl selectionDidChange:]
0x000000018f64ecc0	(WebKit + 0x00770cc0)		-[WKContentView(WKInteraction) endSelectionChange]
0x0000000184868f74	(UIKitCore + 0x0000000001047f74)		-[UITextSelectionInteraction tappedToPositionCursorWithGesture:atPoint:granularity:completionHandler:]
0x0000000184868cac	(UIKitCore + 0x0000000001047cac)		-[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:]
0x0000000184869724	(UIKitCore + 0x0000000001048724)		-[UITextSelectionInteraction _handleMultiTapGesture:]
0x0000000183cc04cc	(UIKitCore + 0x0049f4cc)		-[UIApplication sendAction:to:from:forEvent:]
0x00000001842a0674	(UIKitCore + 0x00a7f674)		-[UITextMultiTapRecognizer onStateUpdate:]
0x00000001839ef784	(UIKitCore + 0x001ce784)		-[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
0x00000001839b8f64	(UIKitCore + 0x00197f64)		_UIGestureRecognizerSendTargetActions
0x0000000183983a7c	(UIKitCore + 0x00162a7c)		_UIGestureRecognizerSendActions
0x00000001839bb23c	(UIKitCore + 0x0019a23c)		-[UIGestureRecognizer _updateGestureForActiveEvents]
0x0000000183975364	(UIKitCore + 0x00154364)		_UIGestureEnvironmentUpdate
0x00000001839a7f20	(UIKitCore + 0x00186f20)		-[UIGestureEnvironment _updateForEvent:window:]
0x00000001839b477c	(UIKitCore + 0x0019377c)		-[UIWindow sendEvent:]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1801327</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-10-06 13:53:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/83950285&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1801332</commentid>
    <comment_count>2</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2021-10-06 13:58:06 -0700</bug_when>
    <thetext>The changes in r280019 would only kick in if the user has Switch Control active (in Accessibility settings). Is that the case here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1801345</commentid>
    <comment_count>3</comment_count>
    <who name="Justin Cohen">justincohen</who>
    <bug_when>2021-10-06 14:18:51 -0700</bug_when>
    <thetext>Neither Apple provided crash reports nor Chrome generated hang reports indicate that state, so it&apos;s impossible to say. This particular stack is new for us in iOS15.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844702</commentid>
    <comment_count>4</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2022-02-22 07:55:55 -0800</bug_when>
    <thetext>We are still getting reports of this hang on iOS 15.4 beta (19E5225g).

(In reply to Wenson Hsieh from comment #2)
&gt; The changes in r280019 would only kick in if the user has Switch Control
&gt; active (in Accessibility settings). Is that the case here?

Someone who ran into this hang let us know they don&apos;t have Switch Control enabled, but do have an external keyboard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844724</commentid>
    <comment_count>5</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2022-02-22 08:24:45 -0800</bug_when>
    <thetext>(In reply to Ali Juma from comment #4)
&gt; We are still getting reports of this hang on iOS 15.4 beta (19E5225g).
&gt; 
&gt; (In reply to Wenson Hsieh from comment #2)
&gt; &gt; The changes in r280019 would only kick in if the user has Switch Control
&gt; &gt; active (in Accessibility settings). Is that the case here?
&gt; 
&gt; Someone who ran into this hang let us know they don&apos;t have Switch Control
&gt; enabled, but do have an external keyboard.

Thanks! That&apos;s really good to know. To summarize, I think the three clues we have so far are that this bug:

• Reproduces while performing a single tap to change the editable selection
• Does not require Switch Control to reproduce
• Reproduces with a hardware keyboard attached
  (though, it&apos;s unclear if it *only* reproduces when a hardware keyboard is attached)

I haven&apos;t been able to reproduce simply by tapping around inside contenteditable text with a hardware keyboard attached on iPad, so there&apos;s definitely more to this bug. In the meantime, do you have stats on which device models (i.e. iPad vs. iPhone) are experiencing this hang? If a disproportionate number of users are hitting this on iPad (despite iPhone users being far more common), I think it would be a strong indication that the hardware keyboard plays an important role in reproducing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844789</commentid>
    <comment_count>6</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2022-02-22 10:51:55 -0800</bug_when>
    <thetext>(In reply to Wenson Hsieh from comment #5)
&gt; (In reply to Ali Juma from comment #4)
&gt; &gt; We are still getting reports of this hang on iOS 15.4 beta (19E5225g).
&gt; &gt; 
&gt; &gt; (In reply to Wenson Hsieh from comment #2)
&gt; &gt; &gt; The changes in r280019 would only kick in if the user has Switch Control
&gt; &gt; &gt; active (in Accessibility settings). Is that the case here?
&gt; &gt; 
&gt; &gt; Someone who ran into this hang let us know they don&apos;t have Switch Control
&gt; &gt; enabled, but do have an external keyboard.
&gt; 
&gt; Thanks! That&apos;s really good to know. To summarize, I think the three clues we
&gt; have so far are that this bug:
&gt; 
&gt; • Reproduces while performing a single tap to change the editable selection
&gt; • Does not require Switch Control to reproduce
&gt; • Reproduces with a hardware keyboard attached
&gt;   (though, it&apos;s unclear if it *only* reproduces when a hardware keyboard is
&gt; attached)
&gt; 
&gt; I haven&apos;t been able to reproduce simply by tapping around inside
&gt; contenteditable text with a hardware keyboard attached on iPad, so there&apos;s
&gt; definitely more to this bug. In the meantime, do you have stats on which
&gt; device models (i.e. iPad vs. iPhone) are experiencing this hang? If a
&gt; disproportionate number of users are hitting this on iPad (despite iPhone
&gt; users being far more common), I think it would be a strong indication that
&gt; the hardware keyboard plays an important role in reproducing this.

The crash is affecting both iPad and iPhone. The most commonly affected devices are older iPhones (6s, 7, 7 plus). 

The iPhone vs iPad breakdown looks similar to the percentage of users on each device.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844793</commentid>
    <comment_count>7</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2022-02-22 10:57:42 -0800</bug_when>
    <thetext>(In reply to Ali Juma from comment #6)
&gt; (In reply to Wenson Hsieh from comment #5)
&gt; &gt; (In reply to Ali Juma from comment #4)
&gt; &gt; &gt; We are still getting reports of this hang on iOS 15.4 beta (19E5225g).
&gt; &gt; &gt; 
&gt; &gt; &gt; (In reply to Wenson Hsieh from comment #2)
&gt; &gt; &gt; &gt; The changes in r280019 would only kick in if the user has Switch Control
&gt; &gt; &gt; &gt; active (in Accessibility settings). Is that the case here?
&gt; &gt; &gt; 
&gt; &gt; &gt; Someone who ran into this hang let us know they don&apos;t have Switch Control
&gt; &gt; &gt; enabled, but do have an external keyboard.
&gt; &gt; 
&gt; &gt; Thanks! That&apos;s really good to know. To summarize, I think the three clues we
&gt; &gt; have so far are that this bug:
&gt; &gt; 
&gt; &gt; • Reproduces while performing a single tap to change the editable selection
&gt; &gt; • Does not require Switch Control to reproduce
&gt; &gt; • Reproduces with a hardware keyboard attached
&gt; &gt;   (though, it&apos;s unclear if it *only* reproduces when a hardware keyboard is
&gt; &gt; attached)
&gt; &gt; 
&gt; &gt; I haven&apos;t been able to reproduce simply by tapping around inside
&gt; &gt; contenteditable text with a hardware keyboard attached on iPad, so there&apos;s
&gt; &gt; definitely more to this bug. In the meantime, do you have stats on which
&gt; &gt; device models (i.e. iPad vs. iPhone) are experiencing this hang? If a
&gt; &gt; disproportionate number of users are hitting this on iPad (despite iPhone
&gt; &gt; users being far more common), I think it would be a strong indication that
&gt; &gt; the hardware keyboard plays an important role in reproducing this.
&gt; 
&gt; The crash is affecting both iPad and iPhone. The most commonly affected
&gt; devices are older iPhones (6s, 7, 7 plus). 
&gt; 
&gt; The iPhone vs iPad breakdown looks similar to the percentage of users on
&gt; each device.

I see, thanks for the info! Definitely not specific to the hardware keyboard, then...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>