-
Couldn't load subscription status.
- Fork 1.4k
Fix Schedule.unfold causing stack overflow #4064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
In the 1st commit, I used |
|
I also ran into this issue at work. The stack points at line 1041 which is |
|
It seems to crash after consuming events from Kafka for about 20 minutes (using zio-kafka cc @iravid ). I suspect it's the |
|
Ouch! @ghostdogpr I think we're only using @jdegoes @adamgfraser Can you take a look at the fix? |
|
Ah, actually I'm not using |
|
Fix looks fine assuming it works (it would have led to infinite thunks before). |
|
@tuleism Thank you for the contribution and the test! |
|
One issue here is we're evaluating the by name parameter immediately. What about something like? This resolves the stack overflow issue and preserves the laziness of the parameter. |
|
Also I think we may want to scale back the size of the test. I was able to reproduce with 10,000 elements instead of 1,000,000. |
|
Whoa, just hit this in production! Will upgrade asap. Thanks! |
This test
causes
After the fix, it takes around 5-7 seconds to execute on my machine. Not sure if it's good to leave it in.