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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Crash on hotswap attempt #42

Open
OOP-778 opened this issue Apr 25, 2021 · 12 comments
Open

Application Crash on hotswap attempt #42

OOP-778 opened this issue Apr 25, 2021 · 12 comments

Comments

@OOP-778
Copy link

OOP-778 commented Apr 25, 2021

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fa0fa2109d4, pid=5821, tid=5836
#
# JRE version: OpenJDK Runtime Environment AdoptOpenJDK (11.0.9+2) (build 11.0.9+2-202011221359)
# Java VM: Dynamic Code Evolution 64-Bit Server VM AdoptOpenJDK (11.0.9+2-202011221359, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x99a9d4][thread 6122 also had an error]
  VM_EnhancedRedefineClasses::do_topological_class_sorting(Thread*)+0x224
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/server/dev/hs_err_pid5821.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-support/issues
#

My startup: java -DIReallyKnowWhatIAmDoingISwear -Xms3G -Xmx3G -XX:HotswapAgent=fatjar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -XX:-OmitStackTraceInFastThrow ->

@OOP-778 OOP-778 changed the title Application Crash Application Crash on hotswap attempt Apr 25, 2021
@skybber
Copy link
Contributor

skybber commented Apr 25, 2021

Are you able to reproduce the problem ?

@OOP-778
Copy link
Author

OOP-778 commented Apr 25, 2021

I'm not sure how to reproduce as it doesn't matter what I change or do and try to hot-swap it just crashes my application.
Not sure if it has something to do with, but it's a remote application.

@skybber
Copy link
Contributor

skybber commented Apr 25, 2021

Could you create minimalistic example?

@jebeaudet
Copy link

I don't have a core dump but I have a more complete pid hs_err log, would that help?

@skybber
Copy link
Contributor

skybber commented Apr 29, 2022

do you still have this problem?

@jebeaudet
Copy link

I've moved to JBR dcevm because of this since it was unstable for me sorry.

@jebeaudet
Copy link

Though I saw you released a new version, I can give that a try!

@dejavumaster
Copy link

Hi, I'm experimenting the same problem. Could you give me any hint?
Thanks in advance,

Though I saw you released a new version, I can give that a try!

@skybber
Copy link
Contributor

skybber commented May 19, 2022

Is the problem reproducible or is it completely random?

@DejmalDavid
Copy link

I get this error message too. I use hotswap inside docker container and problem was in user permission. On recompiled class was changed user permission (access only for root). On reload that class disappear for dcevm because of permission and whole application crash.

@Aliaksei-Tatarynchyk
Copy link

I got the same issue in SpringBoot tests which used Mockito. And there was something else that was contributing to this issue because this Mockito stuff worked perfectly until the point when we added support of mongo gridfs, after which it started causing SIGSEGV crash. When I replaced Mockito mock with the regular class, it started working again.

What I had:

  @Bean
  @Primary
  public UuidProvider fakeUuidProvider() {
    final UuidProvider uuidProvider = mock(UuidProvider.class);
    given(uuidProvider.uuid()).willReturn(UUID.fromString(FAKE_UUID));
    return uuidProvider;
  }

My workaround to fix this SIGSEGV:

  @Bean
  @Primary
  public UuidProvider fakeUuidProvider() {
    return new FakeUuidProvider();
  }

  public static class FakeUuidProvider extends UuidProvider {
    public UUID uuid() {
      return UUID.fromString(FAKE_UUID);
    }
  }

I also attached the crash log - hs_err_pid37359.log

@skybber
Copy link
Contributor

skybber commented Feb 27, 2024

I recommend to use jbr17, if it is possible, since there are a lot of problems fixed, especially with Mockito and redefinition of java.lang.Object.

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

No branches or pull requests

6 participants