-
Notifications
You must be signed in to change notification settings - Fork 258
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
Null Pointer in FuryLogger log method #1761
Comments
Do you use FuryLogger directly? Fury didn't pass null message to FuryLogger. But still, I will fix right now |
No I do not, this stack trace shows better that fury is passing in null messages to FuryLogger:
|
I see, thanks. I fixed it in #1762. I'm curious about why ThreadPoolFury throws exception. Do you invoked this method with your function? |
I have this setup: val fury = Fury
.builder()
.withLanguage(Language.JAVA)
.withScalaOptimizationEnabled(true)
.requireClassRegistration(false)
.withRefTracking(false)
.buildThreadSafeFuryPool(Runtime.getRuntime.availableProcessors() * 2, Runtime.getRuntime.availableProcessors() * 2) Then I call |
I wonder if there is an issue with Scala compatibility. I am seeing strange errors like:
and
|
Could you provide reproduction code? |
I will try today to see if I can create a reproducible code snippet |
If the schema are inconsistent, you may need to set CompatibleMode to Compatible |
Thanks, the schema of the class is not changing the data looks like case class Features(id: Long, counts: Option[CountFeature], timeseries: Option[TimeseriesFeature])
case class CountFeature(featureA: Option[Long], featureB: Option[Long], featureC: Option[Long], featureD: Option[Long])
case class TimeseriesFeature(
featureA: Option[List[TimestampedId]],
featureB: Option[List[TimestampedId]],
featureC: Option[List[TimestampedId]],
featureD: Option[List[TimestampedId]]
)
case class TimestampedId(timestamp: Instant, id: Long) Features is the type being serialized to and from using Fury. |
I havn't been able to reproduce this issue outside of my company infrastructure, which is k8s running debian 11, jdk 17. I created a small Scala app that uses Fury andTwitter Finagle, and in a loop serializes and deserializes randomly generated Features objects on multiple different threads. However, this code was not able to reproduce any errors. The issue only happens at pod startup, I will see a large surge of errors like:
and
Then they subside after a few seconds, and fury serialization/deserialization becomes stable. |
I'll try to keep digging, and open up another issue if I find something conclusive. If you have any hints or ideas, that would help me a lot. |
I see |
Search before asking
Version
0.6.0
Component(s)
Java
Minimal reproduce step
Pass in a null msg, and the logger will fail to log the error message and instead print:
The null pointer is caused by this line: https://github.com/apache/fury/blob/releases-0.6/java/fury-core/src/main/java/org/apache/fury/logging/FuryLogger.java#L145. We should first check that the msg is not null, before trying to get its length.
What did you expect to see?
I expect the stack trace to print if mayPrintTrace is true, even when the msg is null.
What did you see instead?
the actual error is not printed, instead we get a null pointer printed, this makes debugging the actual error more difficult.
Anything Else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: