Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3996658
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:18:22+00:00 2026-05-20T07:18:22+00:00

I have a C++ library that I call from Java via JNI. There’s a

  • 0

I have a C++ library that I call from Java via JNI. There’s a bug in the C++ code that occasionally crashes the JVM. To be robust to such crashes, I have wrapped the Java program in a shell script that relaunches java when it exits. Most of the time this works, but once in a while the JVM crashes (prints a native stack trace to stderr, can no longer be attached to by a java debugger, stops consuming any appreciable amount of CPU time) but doesn’t exit, so it doesn’t get relaunched until I kill it by hand. Why might this happen and what can I do to prevent it?

I’m running under linux. After the crash, the JVM doesn’t respond to SIGTERM, only to SIGKILL. When I attach to the JVM process with a native debugger, I see that the threads are all blocked in __kernel_vsyscall.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:18:22+00:00Added an answer on May 20, 2026 at 7:18 am

    FWIW I eventually traced these deadlocks to a bug in glibc’s malloc. It’s been known for years and apparently there are no plans to fix it. 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call a C subroutine from Java. I'm using JNI. I have
I have a java library that I am accessing in VB.NET via COM. The
I have a JNI function that returns a UChar array (from the ICU4C library)
I have a library that interacts with our phone system, ie, Hey phone, call
I have a static library (let's call it S) that uses a category (NSData+Base64
I have a library that does I/O. There are a couple of external knobs
The setup I have is I'm using a Java application to call native C-code
I would like to call an R script from Java. I have done google
I have an existing library (JPhysX) that is a Java wrapper for a native
I have a Java application which interacts with native code using JNI. The native

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.