Skip to content
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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FiberFailure doesn't fill its stacktrace #9025

Open
tnielensopened this issue Jul 18, 2024 · 4 comments · May be fixed by#9073
Open

FiberFailure doesn't fill its stacktrace #9025

tnielensopened this issue Jul 18, 2024 · 4 comments · May be fixed by#9073

Comments

@tnielens
Copy link
Contributor

The following scalaAppthrows. The printed stacktrace starts at thesubcall()method. I expected it to capture the full trace includingcal()andTest.main().I'm integrating zio gradually in my code base and am usingunsafeRunSynchere and there. Important parts of stacktraces are missing. I wonder if this is on purpose or if it's an oversight.

importzio.{Runtime,Unsafe,ZIO}

objectTestextendsApp{
defcall():Unit=subcall()
defsubcall():Unit=
Unsafe.unsafe {implicitunsafe=>
Runtime.default.unsafe.run(subcall2()).getOrThrowFiberFailure()
}
defsubcall2()=ZIO.fail("boom")
call()
}
Exception in thread "main" Exception in thread "zio-fiber-1239886032" java.lang.String: boom
at <empty>.Test.subcall2(Test.scala:9)
at <empty>.Test.subcall(Test.scala:7)
@tnielens
Copy link
Contributor Author

Relates to#1218.

@jdegoes
Copy link
Member

jdegoes commented Jul 30, 2024

/bounty $350 to lazily(?) reconstruct the proper stack trace in the fiber failure, potentially duringgetOrThrowFiberFailureif that's the only way to have a fast happy path

Copy link

algora-pbc bot commented Jul 30, 2024

💎 $350 bounty• ZIO

Steps to solve:

  1. Start working:Comment/attempt #9025with your implementation plan
  2. Submit work:Create a pull request including/claim #9025in the PR body to claim the bounty
  3. Receive payment:100% of the bounty is received 2-5 days post-reward.Make sure you are eligible for payouts

Thank you for contributing to zio/zio!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢@asr2003 #9073

Copy link

algora-pbc bot commented Aug 5, 2024

💡@asr2003submitted apull requestthat claims the bounty. You canvisit your bounty boardto reward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants