Linear issue: https://linear.app/comm/issue/ENG-2075/reproduce-socket-crash-loop-in-production-with-artificial-test-data
Calling this script in keyserver/ causes 1000 threads to be created under GENESIS with ashoat user and user whos id is specified as spammedUserID.
Having my physical iOS device use 3G this caused a socket crash loop.
Mind that creating 1000 threads takes about 15min.
Details
Details
Set iOS physical device network profile to 3G and run the script in keyserver/
This was tested on 22ac9645d0eb5f83a23a8c1daae0d31ebed5a4a1 D5513
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
This is a little risky to name this script triggerSocketCrashLoop - the name should indicate that we're going to create a lot of new threads. So maybe rename this script and add a comment explaining its purpose.
keyserver/src/scripts/trigger-socket-crash-loop.js | ||
---|---|---|
8 ↗ | (On Diff #18053) | It might be safer to set this to a string that can't be a valid id |
11 ↗ | (On Diff #18053) | Just a nit, really unimportant for a script, but we should prefer returning read only arrays. I we have to use mutable arrays, we can use a shorthand string[]. |
28 ↗ | (On Diff #18053) | Can we modify this function to accept also ids of both users? |