unleash-client-java: Upgrading Unleash causes Rust thread panic

Describe the bug

When we upgraded Unleash java client from version 9.2.6 to 10.0.2, we started seeing errors in production

We reverted the upgrade and the errors went away.

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

thread '<unnamed>' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.138/src/ser.rs:2083:64:
byte index 2 is not a char boundary; it is inside '\t' (bytes 1..2) of `�	����nt`                                       
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace                                             
fatal runtime error: failed to initiate panic, error 4117039104             

Some of these errors contained recognizable flag names

byte index 4 is not a char boundary; it is inside '\u{4}' (bytes 3..4) of `�g��nd_profile_feature_card_notification_LC_enabled`
byte index 4 is not a char boundary; it is inside '\0' (bytes 3..4) of `�����NU_Highlighted_Item_Design`

Screenshots

No response

Additional context

No response

Unleash version

10.0.2

Subscription type

None

Hosting type

None

SDK information (language and version)

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Hi @lbenedetto, @sighphyre made a few changes to the Java SDK, now instead of relying on a compiled binary dependency, we have a pure Java implementation. The 11 version of this SDK will definitely not have this problem, but it’s a new version, so it might have some other unforeseen issue.

We’ve tested it thoroughly, and we have some users already using this version, but sometimes we only find issues in real production environments. So, would you mind giving it a try?

Yes, we build a Docker image with our Spring jar in it. Here is an approximation of our Dockerfile with irrelevant stuff removed.

FROM amazoncorretto:21-al2023-headless

RUN dnf install gperftools-libs -y && \
    dnf update --releasever latest -y && \
    echo "networkaddress.cache.ttl=10" >> ${JAVA_HOME}/conf/security/java.security && \
    dnf clean all

ENV LD_PRELOAD="/usr/lib64/libtcmalloc.so.4"