The issue can't be reproduced reliably, the most reliable way is with the following code (you may need to launch it a couple of times) WARNING: it forks a lot of processes:
We’ve been getting this error fairly regularly. At first I thought it could be due to the thread wake-up issue, but after shipping #74 we still get the BufError.
Ref: opal/opal#2463
The issue can't be reproduced reliably, the most reliable way is with the following code (you may need to launch it a couple of times) WARNING: it forks a lot of processes:
The issue has been seen on opal's CI since Ruby 2.6 until 3.1.