Bug 236643 - [JSC] Guard against dead remotes in numberOfProcessors
Summary: [JSC] Guard against dead remotes in numberOfProcessors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Angelos Oikonomopoulos
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-15 06:09 PST by Angelos Oikonomopoulos
Modified: 2022-02-22 02:27 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.43 KB, patch)
2022-02-15 06:11 PST, Angelos Oikonomopoulos
no flags Details | Formatted Diff | Diff
Patch (2.76 KB, patch)
2022-02-21 01:49 PST, Angelos Oikonomopoulos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Angelos Oikonomopoulos 2022-02-15 06:09:31 PST
[JSC] Guard against dead remotes in numberOfProcessors
Comment 1 Angelos Oikonomopoulos 2022-02-15 06:11:13 PST
Created attachment 452014 [details]
Patch
Comment 2 Angelos Oikonomopoulos 2022-02-21 01:49:09 PST
Created attachment 452720 [details]
Patch
Comment 3 Adrian Perez 2022-02-22 01:47:34 PST
Comment on attachment 452720 [details]
Patch

r=me

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

> Tools/Scripts/run-jsc-stress-tests:2585
> +            numProcessors = runCommandOnTester("sysctl -n hw.activecpu 2>/dev/null || nproc --all 2>/dev/null").to_i

I wonder if it would be better/good to use “getconf _NPROCESSORS_ONLN“ or have
it as yet another fallback 🤔️

Anyway, just a thought, no need to update the patch for it.
Comment 4 Angelos Oikonomopoulos 2022-02-22 01:52:49 PST
(In reply to Adrian Perez from comment #3)
> Comment on attachment 452720 [details]
> Patch
> 
> r=me
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452720&action=review
> 
> > Tools/Scripts/run-jsc-stress-tests:2585
> > +            numProcessors = runCommandOnTester("sysctl -n hw.activecpu 2>/dev/null || nproc --all 2>/dev/null").to_i
> 
> I wonder if it would be better/good to use “getconf _NPROCESSORS_ONLN“ or
> have
> it as yet another fallback 🤔️

That's probably a good idea. And since you mention _NPROCESSORS_ONLN, it'd probably make sense to remove the --all argument from the nproc invocation too.
Comment 5 EWS 2022-02-22 02:26:53 PST
Committed r290298 (247621@main): <https://commits.webkit.org/247621@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452720 [details].
Comment 6 Radar WebKit Bug Importer 2022-02-22 02:27:16 PST
<rdar://problem/89283653>