Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@neko-kai
Copy link
Member

  • Add ZTrace#parents

This cures StackOverflowErrors of form:

Exception in thread "specs2.user-2" java.lang.StackOverflowError
	at java.base/java.lang.StringBuilder.<init>(StringBuilder.java:99)
	at java.base/java.lang.StackTraceElement.toString(StackTraceElement.java:356)
	at zio.internal.stacktracer.ZTraceElement$SourceLocation.prettyPrint(ZTraceElement.scala:31)
	at zio.ZTrace.$anonfun$prettyPrint$1(ZTrace.scala:34)
	at scala.collection.immutable.List.map(List.scala:286)
	at zio.ZTrace.prettyPrint(ZTrace.scala:34)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)
	at zio.ZTrace.prettyPrint(ZTrace.scala:45)
	at zio.ZTrace.$anonfun$prettyPrint$3(ZTrace.scala:46)
	at scala.Option.map(Option.scala:163)

I think there may still be a dangerous case with too many parallel traces, but not sure about (must reproduce separately)

@neko-kai neko-kai requested review from a team, ghostdogpr, iravid and jdegoes and removed request for ghostdogpr, iravid and jdegoes July 10, 2019 17:19
@neko-kai neko-kai force-pushed the feature/limit-max-ancestors-trace-size branch 2 times, most recently from 9dd79e3 to 1b1a80e Compare July 10, 2019 17:24
@jdegoes
Copy link
Member

jdegoes commented Jul 10, 2019

One failed test, probably rerunning will fix it.

@neko-kai neko-kai force-pushed the feature/limit-max-ancestors-trace-size branch from 1b1a80e to 0860bb7 Compare July 10, 2019 18:28
@neko-kai
Copy link
Member Author

@jdegoes Ready for another review

@neko-kai neko-kai requested a review from a team July 11, 2019 11:52
Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🎉

@neko-kai
Copy link
Member Author

[error] x supervision inheritance
[error] 'ArraySeq()' doesn't have size 1 but size 0 (RTSSpec.scala:996)

@neko-kai neko-kai merged commit 399c24f into zio:master Jul 11, 2019
@neko-kai neko-kai deleted the feature/limit-max-ancestors-trace-size branch July 11, 2019 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants