How can a JVM terminate with an exit code of 141 and no other diagnostics?

Hello,
We are encountering a JVM process that dies with little explanation other than an exit code of 141. No hotspot error file (hs_err_*) or crash dump.  To date, the process runs anywhere from 30 minutes to 8 days before the problem occurs. The last application log entry is always the report of a lost SSL connection, the result of an thrown SSLException.  (The exception itself is unavailable at this time – the JVM dies before it is logged -- working on that.)
How can a JVM produce an exit code of 141, and nothing else?  Can anyone suggest ideas for capturing additional diagnostic information?  Any help would be greatly appreciated!  Environment and efforts to date are described below.
Thanks,
-KK
Host machine: 8x Xeon server with 256GB memory, RHEL 6 (or RHEL 5.5) 64-bit
Java: Oracle Java SE 7u21 (or 6u26)
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
JVM arguments:
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=256m
-XX:NewSize=64m
-Xms128m
-Xmx1037959168
-Djava.awt.headless=true
-Djava.security.egd=file:///dev/./urandom
Diagnostics attempted to date:
LD_PRELOAD=libjsig.so.   A modified version of libjsig.so was created to report all signal handler registrations and to report SIGPIPE signals received.  (Exit code 141 could be interpreted as 128+SIGPIPE(13).)  No JNI libraries are registering any signal handlers, and no SIGPIPE signal is reported by the library for the duration of the JVM run.  Calls to ::exit() are also intercepted and reported.  No call to exit() is reported.
Inspect /var/log/messages for any indication that the OS killed the process, e.g. via the Out Of Memory (OOM) Killer.  Nothing found.
Set ‘ulimit –c unlimited’, in case the default limit of 0 (zero) was preventing a core file from being written.  Still no core dump.
‘top’ reports the VIRT size of the process can grow to 20GB or more in a matter of hours, which is unusual compared to other JVM processes.  The RES (resident set size) does not grow beyond about 375MB, however, which is an considered normal.
This JVM process creates many short-lived Thread objects by way of a thread pool, averaging 1 thread every 2 seconds, and these objects end up referenced only by a Weak reference.   The CMS collector seems lazy about collecting these, and upwards of 2000 Thread objects have been seen (in heap dumps) held only by Weak references.  (The Java heap averages about 100MB, so the collector is not under any pressure.) However, a forced collection (via jconsole) cleans out the Thread objects as expected.  Any relationship of this to the VIRT size or the JVM disappearance, however, cannot be established.
The process also uses NIO and direct buffers, and maintains a DirectByteBuffer cache. There is some DirectByteBuffer churn. MBeans report stats like:
Direct buffer pool: allocated=669 (20,824,064 bytes), released=665 (20,725,760), active=4 (98,304)  [note: equals 2x 32K buffers and 2x 16K buffers]
java.nio.BufferPool > direct: Count=18, MemoryUsed=1343568, TotalCapacity=1343568
These numbers appear normal and also do not seem to correlate with the VIRT size or the JVM disappearance.

True, but the JNI call would still be reported by the LD_PRELOAD intercept, unless the native code could somehow circumvent that.  Using a test similar to GoodbyeWorld (shown below), I verified that the JNI call to exit() is reported.  In the failure case, no call to exit() is reported.
Can an OS (or a manual) 'kill' specify an exit code?  Where could "141" be coming from?
Thanks,
-K2
=== GoodbyeWorldFromJNI.java ===
package com.attachmate.test;
public class GoodbyeWorldFromJNI
    public static final String LIBRARY_NAME = "goodbye";
    static {
        try {
            System.loadLibrary(LIBRARY_NAME);
        } catch (UnsatisfiedLinkError error) {
            System.err.println("Failed to load " + System.mapLibraryName(LIBRARY_NAME));
    private static native void callExit(int exitCode);
    public static void main(String[] args) {
        callExit(141);
=== goodbye.c ===
#include <stdlib.h>
#include "goodbye.h"  // javah generated header file
JNIEXPORT void JNICALL Java_com_attachmate_test_GoodbyeWorldFromJNI_callExit
  (JNIEnv *env, jclass theClass, jint exitCode)
    exit(exitCode);
=== script.sh ===
#!/bin/bash -v
uname -a
export PATH=/opt/jre1.7.0_25/bin:$PATH
java -version
pwd
LD_PRELOAD=./lib/linux-amd64/libjsigdebug.so java -classpath classes -Djava.library.path=lib/linux-amd64 com.attachmate.test.GoodbyeWorldFromJNI > stdout.txt
echo $?
tail stdout.txt
=== script output ===
[keithk@keithk-RHEL5-dev goodbyeJNI]$ ./script.sh
#!/bin/bash -v
uname -a
Linux keithk-RHEL5-dev 2.6.18-164.2.1.el5 #1 SMP Mon Sep 21 04:37:42 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
export PATH=/opt/jre1.7.0_25/bin:$PATH
java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
pwd
/tmp/goodbyeJNI
LD_PRELOAD=./lib/linux-amd64/libjsigdebug.so java -classpath classes -Djava.library.path=lib/linux-amd64 com.attachmate.test.GoodbyeWorldFromJNI > stdout.txt
echo $?
141
tail stdout.txt
JSIG: exit(141) called
JSIG: Call stack has 4 frames:
JSIG: ./lib/linux-amd64/libjsigdebug.so [0x2b07dc1bdc2f]
JSIG: ./lib/linux-amd64/libjsigdebug.so(exit+0x29) [0x2b07dc1bea41]
JSIG: /tmp/goodbyeJNI/lib/linux-amd64/libgoodbye.so [0x2aaab3e82547]
JSIG: [0x2aaaab366d8e]       
=== ===

Similar Messages

  • In iPhoto, how can I export images with the metadata - including the title and caption information - intact as part of the image?

    In iPhoto, how can I export images with the metadata — including the title and caption information — intact as part of the image?

    Check those boxes in the export dialogue - Exporting From iPhoto
    LN

  • How can I write in the titles of songs I wrote and recorded other than track 1-2 etc.?

    How can I change the Titles of songs I recorded  on a playlist other than the given "track 1, 2,3 etc.? thanks Sigi

    Highlight a track. Press command + i to get information on the track. Enter the data.  For simultaneous multi-track editing use click and shift+ click to select a range of tracks on which to get information.
    Use iTunes help menu to find out how to use iTunes.

  • TS1292 my code on my itunes card has come off, how can i redeem it with =out the code,

    when trying to take the sticky off the back of the card all the code has come off. I do have receipt for it as i bought in a supermarket today, how can i redeem this itunes card now, as i paid 25pds.

    See this support article:
    http://support.apple.com/kb/TS1292
    If you can't get the card to work after perusing that page, as will obviously not be possible if the code has come completely off, contact the iTunes Store Support; instructions are at the bottom of that article.
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • My iTunes library is missing since upgrade Lion 7.2.  I have it all backed up so that's not the issue. How can I reinstall it with all my hundreds of playlists intact or do I have to recreate each one upon reinstalling the backup copy? Thank you for help

    Almost my iTunes library is missing since upgrade Lion 7.2. (the last 2.5 weeks worth of added music has transferred post-upgrade, none of whcih was bought from iTunes)
    I have it all backed up so that's not the issue. How can I reinstall it with all my hundreds of playlists intact or do I have to recreate each playlist upon reinstalling the backup copy? This would save a HUGE amount of time and efforts. Thank you for your help!

    hi Limnos,
    I do not mean the entire ITunes folder but, rather, the contents of the ITunes folder prior to September 29th.  (90% of the media is missing, along with all playlists)  The media that remains says it was added on 9/29 although I know most of it was added many months or even years earlier. There are no playlists listed at all, before or after 9/29.  (I know for certain that I added non-iTunes purchased songs on 10/6 although I had not created playlists for them)
    I have my iTunes folder backed up on both an external drive as well as Time Machine.
    I run iTunes off of an ITunes folder on my computer rather than from the external, if that's what you mean about how I have it set up. 
    Is it OK to drag the entire iTunes folder from the external drive onto my laptop's drive and see if that fixes it?
    Thank you for your help!
    Deb

  • How can I start anew with Photos and clear the (minimal) stuff it has uploaded

    I've about had it up to here with this new Photos scheme. I reorganised my Aperture libraries on both my iMac and MBA in preparation for this, delayed turning Photos on for a couple of days until I thought everything was ready based upon the limited advice that was out there, and then got stuck in an endless loop of "uploading" and "preparing" every time I opened Photos. There are 19,975 images in my Aperture library on the iMac. I was stuck at Uploading at anywhere between that number and 19,000 with no progress after hours of waiting. I tried all the tricks mentioned here including re booting, restarting the app, repairing/rebuilding the database, killing the "cloudd" process, etc.today Today when I restarted Photos, it now said I had 23,775 images to upload- 4000
    more than I have-and of course it got stuck there, like it has for the last week.
    I copied the previous Aperture library (pre Photos migration)back to my iMac and opened it in Aperture. Thankfully, all the photos I had taken on my iPhone this week during this Photos clusterphuck transition were in the Aperture Stream so I didn't lose any of those. I'm willing to give this whole thing one more shot. So  i need some advice. How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    <Re-Titled By Host>

    How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    It is hard to say from your post, why the migration did not succeed in your case.
    by "stuck on upload" do you mean, you opened the Aperture library in Photos, and Photos converted it to a Photo Library, and then the upload to iCloud Photo Library did hang?  Or did already the upgrade to the Photo Library fail?
    If you want the Aperture library to upload to iCloud Photo Library, it needs to be on a disk formatted MacOS Extended (Journaled) and the original image files must not be referenced. Referenced originals will not upload.
    Also, the upload may hang, if you do not have enough free iCloud storage, orr if one of the videos or photos in your library is in an unsupported format or corrupted.
    To start over, try to repair and rebuild the Aperture library before opening it in Photos. Try all Aperture Library First Aid options - starting with repairing the permissions.  (Repairing and Rebuilding Your Aperture Library: Aperture 3 User Manual)
    If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    You will have to delete the photos that are already in icloud too; otherwise you are risking duplicates.
    Can you launch Photos at all?  If yes, delete all photos in Photos and empty the Recently Deleted album. Wait for the deletion to sync to iCloud. Then delete the Photos.photolibrary.

  • I cant remember my password to logon to my mac, how can i change it with out needing the old one?

    i cant remember my password to logon to my mac, how can i change it with out needing the old one?

    http://support.apple.com/kb/HT1274

  • How can I copy songs with metadata (added in iTunes) from my PC to my new iMac?

    I have iTunes 12.0.1 on my Windows PC. I'm about to get a new iMac (hooray!) and I'm beginning the process of transferring everything on my PC to my Mac. I've got all the documents, pictures, files, etc. covered, but now I have to make a copy of all of my music.
    Most of the music in my iTunes library is not bought through the iTunes Store (I download most of my songs from the Internet). Then, after saving the downloaded song to my computer, I go into iTunes on my computer and add the song. I also add metadata like artist, album, genre, album artwork, etc. to the song in iTunes. What concerns me is that only the songs in iTunes have this metadata: the original downloaded files I saved onto my computer don't have any metadata.
    I really don't want to have to go through the long and tedious process of adding artist/album names, genre, etc. to every single song in my iTunes library on my new iMac. How can I copy songs with metadata (added in iTunes) from my PC to my new iMac?
    Thank you so much for any help!

    Hello! I'd like to learn more about Home Sharing. To do this, would both my PC (which I hope to get rid of) and my new iMac need to be plugged in?
    Also, after Home Sharing with the old PC is initiated, I understand that all my songs would appear on my iMac. Is there a way to copy all of these (with album artwork, name, artist, etc.) directly to the iMac's hard drive and then disconnect home sharing so I can get rid of my PC?
    Thank you!

  • I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    Have you redeemed your iTunes card to an account associated with an Apple ID?
    Once you have your iPad associated with an Apple ID AND you have an account with a credit card associated with the same Apple ID AND you have some 'store credit' (from redeeming your iTunes card) then purchases use the store credit before they charge the credit card, so you should be ok!
    Personally, I use 'store credit' as a way to monitor whether or not there have been any 'unauthorised' purchases because as soon as the store credit is zero, the security code from the credit card is needed for further purchases!  It does mean that I have sometimes to top up store credit before making a purchase, but 'better safe than sorry'! 

  • HT2486 My address book only displays e-mails. How can I sync it with my i-phone to display the address book the same way as my contacts in my i-phone?

    Currently my address book only displays e-mail addresses. It uses the portion of the address in front of the @ as the name. How can I sync it with my i-phone 4S that has name/numbers and addresses of my contacts?

    Hello there, Seta.
    You are correct that this can be done with iCloud. The following Knowledge Base article provides some great instruction for syncing contacts:
    iOS: How to transfer or sync content to your computer
    http://support.apple.com/kb/ht1296
    Particularly:
    Contacts, Calendars, Bookmarks, and Notes
    You can sync contacts, calendars, bookmarks, and notes with other applications on your computer. This allows you to keep all your information in sync across multiple computers and iOS devices. The settings for these items are all in the Info tab for your iOS device in iTunes. With your iOS device connected to the computer, select your iOS device. Then click the Info tab.
    For details on syncing content on your iOS device with your computer, click the sections below.
    Contacts
    To sync contacts with your computer, choose "Sync Contacts with" within iTunes for Windows, or "Sync Contacts" in OS X v10.8, or "Sync Address Book Contacts" in OS X v10.7 and earlier.
    You can sync your contacts with:
    Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010 (Windows XP, Windows Vista, Windows 7, and Windows 8)
    Windows Address Book (Windows XP)
    Windows Contacts (Windows Vista, Windows 7, and Windows 8)
    Address Book (Mac OS X v10.7 and earlier)
    Contacts (Mac OS X v10.8)
    Microsoft Entourage 2004, Microsoft Entourage 2008, or Microsoft Outlook 2011 for Mac
    Notes:
    When syncing contacts, you can choose to sync all of your contacts or only selected groups. The option to sync selected items may not show up until after the first sync.
    You can select a group of contacts to which all new contacts created on your iOS device will be added.
    Additional options for syncing include syncing your contacts with Yahoo or Gmail/Google Mail. You will need to configure it with the user name and password for your Yahoo or Google account.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • HT5622 We have two iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself

    My son and I both have iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself from finding out what he is up to during Freshers week!

    You have to use a different Apple ID for your son.
    Read this note:
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family
    still valid for ios 7

  • How can i share documents with different users on the same mac?

    How can i share documents with different users on the same mac?

    Shared how? The other users can read the documents or you all can read and write the documents?
    The first is easy just place the documents in /Users/Shared anyone can access the files there and the other users will be able to read them.
    The second is a bit trickier.

  • I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    try
    http://support.apple.com/kb/ht2589

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How can I use Bluetooth with another devices?

    How can I use Bluetooth with another devices?

    You can set up your FaceTime account in Settings > FaceTime.

Maybe you are looking for

  • Windows 7 install failure - hardware configure problem

    Installing windows 7 64-bit using boot camp onto newly formatted drive giving it a 200gb partition in drive bay 1. Gets through most of the windows setup install then says: 'windows setup could not configure windows to run on this computer's hardware

  • TC problem printing large photos

    I have a canon mp530 hooked up to the usb port on my 1gig TC. It prints documents fine, but whenever I send a picture file to be printed, it begins to print but stops just a few seconds into it. After a while, the printer just ejects the unfinished d

  • HT201340 Is there a way to combine all my libraries into one library on Aperture?

    I have pictures all over the place on my mac and would like to put them all in one library and delete the other locations.  Is there any easy way to do this?

  • Upload of Relationships in OM

    Hi, I have uploaded the objects using LSMW using tcode PP02.It worked successfully.Now i want to maintain relationship between objects.Can anyone pls let me know how to proceed forward with this. When i am trying to maintaining relation using the sam

  • Weblogic 8.1 Connection Pool and jta

    Hi ! I am getting the below exception while migrating my application from weblogic 6.1sp2 to weblogic 8.1. When I migrate to weblogic 7.0 sp2 there are no problems. The problem occurs specifically when I save an record using a container managed trans