-
Notifications
You must be signed in to change notification settings - Fork 557
SN 0.5.6 -> 0.5.7 -> 0.5.8 #4362
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
Okay, I think I can turn on and off the (probably) segfaults with a scala-native config flag 😀
I can see, that stacktraces are computed in a different way if that flag is true (and this seems new in 0.5.7). My best guess is that that different way sometimes segfaults 🤷♂️ (and also causes incorrect stacktraces for me locally). Also, this seems related: scala-native/scala-native/pull/4094 |
Green CI, nice work!! |
Current status:
Based on these, I can't definitively prove, but I suspect this could be a scala-native issue. I can see, that stacktraces are calculated in a different way in 0.5.7 if |
I think it's scala-native/scala-native/issues/4366 (more details there). |
Okay so I think what we're going to do is release 3.7 (or at least, an RC) against 0.5.6, just to unblock the ecosystem and move the train forward. Excellent digging btw, @durban. |
Good news, everyone! It seems we can avoid scala-native/scala-native/issues/4366 by turning on the SN optimizer (see details there, tl;dr: Apparently the optimizer being on is the default, and funnily we probably turned it off to make multithreading work easier. I don't know why would anyone want to turn it off (okay, I obviously know...), but we might just say in the release notes: "don't do that"? |
Also, I can now confirm that my fix for the SN 0.5.7 segfaults (scala-native/scala-native#4301) was indeed correct. (Due to the new segfaults in 0.5.8 that wasn't certain until now. But now I've tried (#4447), and 0.5.7 also segfaults with the optimizer on.) |
build.sbt
Outdated
@@ -364,7 +364,7 @@ Global / tlCommandAliases ++= Map( | |||
lazy val nativeTestSettings = Seq( | |||
nativeConfig ~= { c => | |||
c.withSourceLevelDebuggingConfig(_.enableAll.generateFunctionSourcePositions(false)) // `true` causes segfaults(?) | |||
.withOptimize(false) // disable Scala Native optimizer | |||
.withOptimize(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true is the default, so you can remove the line altogether.
.withOptimize(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as stuff is broken with false
, I'd prefer to be explicit. Also, to remove that line would mean removing the explanatory comment (you've reviewed an outdated commit).
Somehow I missed the fact that turning the optimizer on fixes this. Great news! @durban should we unwip this and merge the upgrade to 0.5.8? |
Yeah, I'm gonna merge 3.x into this branch, to be sure. If CI is green, I think it's good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 All that work for 6 lines lol
build.sbt
Outdated
c.withSourceLevelDebuggingConfig(_.enableAll) // enable generation of debug information | ||
.withOptimize(false) // disable Scala Native optimizer | ||
nativeConfig ~= { c => | ||
c.withSourceLevelDebuggingConfig(_.enableAll.generateFunctionSourcePositions(false)) // `true` causes segfaults(?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be recommended somewhere in a "scala native" docs page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhh... thanks, that's an outdated comment. We can use true
in 0.5.8, I've fixed it. I'm gonna remove that false
and the comment...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hell yeee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops just saw the failing test
There is a failure I don't remember seeing before 😠 |
Annoying. We'll have to be sure to experiment downstream (fs2 and http4s in particular) with whether this same configuration is required. |
To summarize: I thought I've fixed things (in SN) to work with Interestingly, with We might document that as a workaround, and leave it at that. But I'm bothered by the details of this "new" error:
Two things:
(In any case, I really don't think this is CE's fault.) |
Notes so far:
There is something weird going on with exception stacktraces; I haven't been able to minimize so far. UPDATE: seems to work fine in CI, so possibly something is broken in my local environment.ioAppTestsNative
fails onmacos-14
andubuntu-22.04-arm