Bug 211978

Summary: Add a timeout monitor for JSC stress test
Product: WebKit Reporter: Zhifei Fang <zhifei_fang>
Component: New BugsAssignee: Zhifei Fang <zhifei_fang>
Status: REOPENED ---    
Severity: Normal CC: commit-queue, jbedard, keith_miller, ryanhaddad, ticaiolima, webkit-bug-importer, zhifei_fang
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 213019    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Zhifei Fang 2020-05-15 21:59:17 PDT
Add a timeout monitor for JSC stress test
Comment 1 Zhifei Fang 2020-05-15 22:00:59 PDT
Created attachment 399544 [details]
Patch
Comment 2 Keith Miller 2020-05-16 09:29:06 PDT
Is this an actual problem in practice? Have we had issues with the JSC internal killer not working?
Comment 3 Zhifei Fang 2020-05-16 12:13:51 PDT
(In reply to Keith Miller from comment #2)
> Is this an actual problem in practice? Have we had issues with the JSC
> internal killer not working?

It looks like yes, see <rdar://problem/61353156>
Though I am not sure why it is not working
Comment 4 Jonathan Bedard 2020-05-18 07:01:45 PDT
Comment on attachment 399544 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399544&action=review

> Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:259
> +    echo "#{Shellwords.shellescape(@name)} is time out, killing by timeout monitor"

Should be 'has timed out, killing with the timeout monitor'

> Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:261
> +    sleep 5  # give a grace period

I don't think the comment here is particularly helpful.

> Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:324
> +            cmd = timeoutMonitorAddon

I feel like we need to replace this with Python in the near future....this feels incredibly hackey.
Comment 5 Zhifei Fang 2020-05-18 10:27:06 PDT
(In reply to Jonathan Bedard from comment #4)
> Comment on attachment 399544 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399544&action=review
> 
> > Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:259
> > +    echo "#{Shellwords.shellescape(@name)} is time out, killing by timeout monitor"
> 
> Should be 'has timed out, killing with the timeout monitor'
> 
> > Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:261
> > +    sleep 5  # give a grace period
> 
> I don't think the comment here is particularly helpful.
> 
> > Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:324
> > +            cmd = timeoutMonitorAddon
> 
> I feel like we need to replace this with Python in the near future....this
> feels incredibly hackey.
agreed, the script writer may need to generate the pure python code, however I am not sure if that can be run on playstation port, maybe firstly we just change the default one
Comment 6 Zhifei Fang 2020-05-18 10:56:54 PDT
I will change this to just kill jsc process instead kill the whole runner script, this should link the reset error handler instead of repeat it in the timeout monitor process
Comment 7 Zhifei Fang 2020-06-08 14:14:39 PDT
Created attachment 401368 [details]
Patch
Comment 8 Jonathan Bedard 2020-06-08 14:18:46 PDT
Comment on attachment 401368 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401368&action=review

> Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:239
> +        timeout = ENV['JSCTEST_timeout'].to_i + 10 # let jsc timeout handler trigger first

I'm surprised the style-checker is happy with this.

'Seconds' and 'Let jsc timeout...' should have their first leter capitalized

> Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb:259
> +    echo "#{Shellwords.shellescape(@name)} has time out, killing with timeout monitor"

Should be "has timed out"
Comment 9 Zhifei Fang 2020-06-08 14:20:43 PDT
Created attachment 401371 [details]
Patch
Comment 10 EWS 2020-06-09 13:53:02 PDT
Committed r262807: <https://trac.webkit.org/changeset/262807>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401371 [details].
Comment 11 Radar WebKit Bug Importer 2020-06-09 13:53:17 PDT
<rdar://problem/64178437>
Comment 12 Caio Lima 2020-06-10 03:51:43 PDT
This seems to break all JSC queues. I'm explicitly disabling that for Linux, since current timeout monitor script doesn't work there (https://bugs.webkit.org/show_bug.cgi?id=213017).
Comment 13 WebKit Commit Bot 2020-06-10 04:16:34 PDT
Re-opened since this is blocked by bug 213019