You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2024/05/21 16:07:14 UTC
[PR] reproduce issue where stackoverflow happens in unstash [pekko]
pjfanning opened a new pull request, #1336:
URL: https://github.com/apache/pekko/pull/1336
see #1327
This doesn't cause the test to fail or abort - for some reason testkit/scalatest logs the stackoverflow but then claims no tests were run.
```
[info] Run completed in 3 seconds, 635 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] No tests to run for persistence-typed-tests / Test / testOnly
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1336:
URL: https://github.com/apache/pekko/pull/1336#issuecomment-2131373286
> I have a possible solution but it is breaking quite a few tests so it needs more debugging. It is only one approach but by passing back a behavior wrapping the unstash instead of running the unstash in place - this avoids stack overflow issues. The broken tests show that it is not quite this simple and it may prove to be a dead end.
This 'solution' isn't working out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning closed pull request #1336: reproduce issue where stackoverflow happens in unstash
URL: https://github.com/apache/pekko/pull/1336
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #1336:
URL: https://github.com/apache/pekko/pull/1336#discussion_r1629511989
##########
persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala:
##########
@@ -55,10 +55,11 @@ object EventSourcedStashOverflowSpec {
SteppingInmemJournal.config("EventSourcedStashOverflow").withFallback(ConfigFactory.parseString(s"""
pekko.persistence {
typed {
- stash-capacity = 1000 # enough to fail on stack size
+ stash-capacity = 2000 # enough to fail on stack size
Review Comment:
The idea is to have a test that someone can use to produce a fix. This config is for one test. It is not a change to our default config.
There are some ideas for fixes in https://github.com/apache/pekko/issues/1327.
* possibly limit the number of read-only events that can be stashed
* possibly make the unstash asynchronous or at least go async after a recursion limit is reached
* possibly try to doing the unstashing in a loop instead of recursing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "Roiocam (via GitHub)" <gi...@apache.org>.
Roiocam commented on code in PR #1336:
URL: https://github.com/apache/pekko/pull/1336#discussion_r1629549870
##########
persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala:
##########
@@ -55,10 +55,11 @@ object EventSourcedStashOverflowSpec {
SteppingInmemJournal.config("EventSourcedStashOverflow").withFallback(ConfigFactory.parseString(s"""
pekko.persistence {
typed {
- stash-capacity = 1000 # enough to fail on stack size
+ stash-capacity = 2000 # enough to fail on stack size
Review Comment:
I see, thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1336:
URL: https://github.com/apache/pekko/pull/1336#issuecomment-2123316105
I have a possible solution but it is breaking quite a few tests so it needs more debugging. It is only one approach but by passing back a behavior wrapping the unstash instead of running the unstash in place - this avoids stack overflow issues.
The broken tests show that it is not quite this simple and it may prove to the dead end.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] reproduce issue where stackoverflow happens in unstash [pekko]
Posted by "Roiocam (via GitHub)" <gi...@apache.org>.
Roiocam commented on code in PR #1336:
URL: https://github.com/apache/pekko/pull/1336#discussion_r1629492867
##########
persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala:
##########
@@ -55,10 +55,11 @@ object EventSourcedStashOverflowSpec {
SteppingInmemJournal.config("EventSourcedStashOverflow").withFallback(ConfigFactory.parseString(s"""
pekko.persistence {
typed {
- stash-capacity = 1000 # enough to fail on stack size
+ stash-capacity = 2000 # enough to fail on stack size
Review Comment:
That's will cause more stack trace frame, that will event worst.
Maybe we could unstash with counter, after limitation, we will start another recursion(clear stack)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org