Is this a known bug? OOME because of MBeanServerConnection addListener

Hi
I use a JMXConnector to monitor different processes. For each MBean (which is
also a NotificationBroadcaster)registered in the monitored process a listener
is added by the monitoring process.
Now the problem is that I'm not able to remove this listener when the MBean is
removed by the monitored process. After a long time this causes the monitored
process to crash by a "java.lang.OutOfMemoryError: PermGen space".
The analysis shows that the ObjectNames added by the listener are never gc'ed.
They are held by ServerNotifForwarder's listenerMap. The OOME is in the PermGen
because of the String.intern done by setCanonicalName of ObjectName.
Here is an example which shows the problem in one process:
private static String keyname = "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
   private static List<ObjectName> names = new LinkedList<ObjectName>();
   private static long counter = 0;
   private static MBeanServer mbeanServer;
   final static MBean mbean = new MBean();
   public static void main (final String[] args)
      throws IOException, InstanceNotFoundException, MalformedObjectNameException, NullPointerException, InterruptedException
      // Init of process 1
      mbeanServer = ManagementFactory.getPlatformMBeanServer();
      // End of init process 1
      // This happens in process 2
      final String address = "service:jmx:rmi:///jndi/rmi://:15431/jmxrmi";
      final JMXServiceURL serviceURL = new JMXServiceURL(address);
      final JMXConnector connector = JMXConnectorFactory.connect(serviceURL, null);
      final MBeanServerConnection mBeanServerConnection = connector.getMBeanServerConnection();
      mBeanServerConnection.addNotificationListener(new ObjectName("JMImplementation:type=MBeanServerDelegate"),
               new NotificationListener()
                  public void handleNotification (final Notification notification, final Object handback)
                     try
                        final ObjectName name = ((MBeanServerNotification) notification).getMBeanName();
                        final String type = notification.getType();
                        if (type.equals(MBeanServerNotification.REGISTRATION_NOTIFICATION))
                           mBeanServerConnection.addNotificationListener(name, this, null, null);
                        else if (type.equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION))
                           // The next line is useless it throws a ListenerNotFoundException
                           mBeanServerConnection.removeNotificationListener(name, this);
                     catch (final InstanceNotFoundException ex)
                        ex.printStackTrace();
                     catch (final IOException ex)
                        ex.printStackTrace();
                     catch (final ListenerNotFoundException ex)
                     {// No exception handling because the exception is allways thrown if removeNotificationListener(name, this) is called
               }, null, null);
      // End of process2
      // This happens in process 1
      for (int i = 0; i < 100000; i++)
         registerMBean(); // Register some MBeans to avoid InstanceNotFoundException when registering the NotificationListener
      while (true)
         try
            registerMBean();
            mbeanServer.unregisterMBean(names.remove(0)); // Remove oldest MBean
            if (counter % 10000 == 0)
               System.out.print("*");
         catch (final MBeanRegistrationException ex)
            ex.printStackTrace();
         catch (final InstanceNotFoundException ex)
            ex.printStackTrace();
   private static void registerMBean ()
      throws MalformedObjectNameException
      final ObjectName name = new ObjectName("a.b.c.", keyname + counter, "ad");
      counter++;
      names.add(name);
      try
         mbeanServer.registerMBean(mbean, name);
      catch (final MBeanRegistrationException ex)
         ex.printStackTrace();
      catch (final InstanceAlreadyExistsException ex)
         ex.printStackTrace();
      catch (final NotCompliantMBeanException ex)
         ex.printStackTrace();
      return;
   private static final class MBean
      implements DynamicMBean, NotificationBroadcaster
      public MBean ()
      public Object getAttribute (final String attribute)
         throws AttributeNotFoundException, MBeanException, ReflectionException
         return null;
      public AttributeList getAttributes (final String[] attributes)
         return null;
      public MBeanInfo getMBeanInfo ()
         return new MBeanInfo(DynamicMBean.class.getCanonicalName(), "", null, null, null, null);
      public Object invoke (final String actionName, final Object[] params, final String[] signature)
         throws MBeanException, ReflectionException
         return null;
      public void setAttribute (final Attribute attribute)
         throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
      public AttributeList setAttributes (final AttributeList attributes)
         return null;
      public void addNotificationListener (final NotificationListener listener, final NotificationFilter filter,
                                           final Object handback)
      public MBeanNotificationInfo[] getNotificationInfo ()
         return null;
      public void removeNotificationListener (final NotificationListener listener)
         throws ListenerNotFoundException
         System.out.print("-");
   }Started with: -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=15431Does anyone have a workaround for this? Have I overlooked a fault or is this a known bug? I searched for it but could not find one.
I have to use the jre1.6.0_05.
Thank you for your input.
Edited by: Domi27 on Sep 14, 2009 10:11 PM

I'm the OP, but I never had 49,998 posts!
When I had this problem I created a bug report. But this report was never visible in the sun bug database. Half a year later an employee of oracle created a bug report about this problem and it got solved immediately. A big company like oracle which is about to buy your own employer may help ;-)
Today I don't find neither my bug report nor the other one. But the bug should be solved in the latest 1.6 release and I hope in 1.7 as well.
Our work-around was to close the connection at the server-side periodically (once a day) and reestablish the it from scratch.

Similar Messages

  • Are you aware of a possible bug in version 3.6.23? In the browser, for example, "two/" appears with the slash through the "o". Is this a known bug?

    Are you aware of a possible bug in version 3.6.23? In the browser, for example, "two/" appears with the slash through the "o". Is this a known bug?
    When the same text is view in another browsers it appears correctly as "two/".
    I've checked, and the same problem appears in Firefox on another computer.
    The two answers received so far have not provided an answer: is this a known bug in Firefox?
    Thank you.

    You are on a Mac and that is a [http://en.wikipedia.org/wiki/Kerning kerning] problem. Don't you see the same problem in other applications if you choose the same font, font-weight and font-size.
    I only find one other kerning [https://support.mozilla.com/questions/789254 question] here -- it is marked unsolved. I find it strange that Firefox got involved with this at all rather than leaving such things to the operating system and font metrics.
    Does the problem go away with "command+0" (zero) which resets [http://kb.mozillazine.org/Zoom_text_of_web_pages zoom level] to normal. If you mess with the font sizes in your preferences because you want larger print that would have the same effect.
    Also found this one recently reported for [https://support.mozilla.com/questions/892222 Firefox 7 in ubuntu 11.04] which appears much worse. If it involves Firefox and specific operating systems it becomes a lot harder to diagnose who or what is responsible.

  • Calendar adds an extra day when creating an event in ios 8.1.3. Is this a known bug?

    When i add an event using the calendar app in ios 8.1.3, it adds an extra day to the event when using a range of dates. I am able to recreate the problem. when entering the event i select a range of dates and confirm that it is what i want. after submitting, i verify and it has added an extra day at the end. Is this a known bug or am i on my own? Help please. this is annoying having to check each event after entering it.

    Ive reset, restored and this is the second phone. Thought it maybe a wonky screen that would shift it while setting dates. THe only thing I can think of is that I am syncing with google calendar, but it only happens when setting events in ios not if i do it from google website on desktop PC.

  • Number of address book contacts on MacBook Air using iCloud is one less than my other iDevices using iCloud.  Is this a known bug?

    Number of address book contacts on MacBook Air using iCloud is one less than my other iDevices using iCloud.  Is this a known bug?  I've checked for duplicates on my iDevices and I can't find any.  Additionally, I have wiped all the data from the Application Support folder of the address book and re-connected to iCloud, but it always shows 308 contacts instead of 309 found on iCloud and the rest of my devices.  Any ideas?

    Number of address book contacts on MacBook Air using iCloud is one less than my other iDevices using iCloud.  Is this a known bug?  I've checked for duplicates on my iDevices and I can't find any.  Additionally, I have wiped all the data from the Application Support folder of the address book and re-connected to iCloud, but it always shows 308 contacts instead of 309 found on iCloud and the rest of my devices.  Any ideas?

  • With 3.6.12, Help menu item "For Internet Explorer Users" results in a "Page Not Found" error. Is this a known bug? Is it being addressed?

    Clicking the 3.6.12 Help menu item "For Internet Explorers" item results in a "Page Not Found" error.
    The URL of the resultant page is https://support.mozilla.com/en-US/kb/Windows%20start%20page?as=u
    Is this a known bug, if so, is it being addressed? If so, someone needs to work faster.
    If it is not a known bug, someone needs to get right on it - you want people to switch to Firefox and then there is this bug -- not a good way to impress Internet Explorer users.

    Hi Claudio Roca,
    I have encountered the same problem. Do you found the solution for this issue? I will much appreciated if you willing to share your solution and email to [email protected] Thank you so much.
    Regards,
    Hau Chee

  • Problem with Arabic font: In certain contexts, when writing Arabic with vowel signs (fatha, damma, kasra, sukun) a sequence of sukun   fatha/damma etc. would reverse automatically. Is this a known bug?

    Problem with Arabic font: In certain contexts, when writing Arabic with vowel signs (fatha, damma, kasra, sukun) a sequence of sukun + fatha/damma etc. would reverse automatically. Is this a known bug?
    Example: عَيْنٌ
    would automatically convert to عَيُنْ
    Funnily, it doesn't seem to happen here, but it does when entering text in a web interface (using Firefox, font Bayan) and when using Text Edit.
    Seems to be a problem of a specific font, as e.g. Arial MS Unicode works fine. Any hints?
    Thank you!

    Musaafir wrote:
    I've no idea how i can even start using arabic vowels on Microsoft Word for Apple
    You can't do Arabic on MS Word for Mac.  This app has never supported RTL scripts, so you need to use something else.  Mellel is best, but Pages 5, TextEdit, Nisus Writer, Open/LibreOffice should work OK.
    You switch between languages by using the "flag" menu at the top right of the screen or by using the keyboard shortcuts apple/command plus space.  Go to system prefs/keyboard/shortcuts to make sure that is activated.
    To see which key does what, you use Keyboard  Viewer.
    http://support.apple.com/kb/PH13746
    You place vowels on letters by typing the key for the vowel after the key for the letter.  The vowels are on the option/alt keys, option/alt + a gives you َ

  • Is this a known bug (copying text freezes up APE)?

    I have had this happen to me several times now, and am now pretty sure what causes it:
    APE freezes up, becoming totally unresponsive. I can't even shut it down (both Organizer and Editor) via Windows Task Manager (Ctrl+Alt+Delete).
    What gets me to this juncture? When I try to rename an image, and have a series with the same base name (such as GoingOverNiagaraFallsInaBarrelOfMonkeys, as in:
    GoingOverNiagaraFallsInaBarrelOfMonkeys1
    GoingOverNiagaraFallsInaBarrelOfMonkeys2
    etc.
    ...and I copy the "base" portion via Ctrl+C -- voila! Everything stops dead in its tracks as if a 900-lb. Grizzly Bear in a bad humor swatted my CPU.
    Is this a known bug?

    when I select all the text in a description (FIle | Info, Description text box on first tab) and copy it, it freezes up (eventually it recovers, though).
    I can't reproduce that with my PSE 8.  Perhaps there's something specific about one or more of your photos that's triggering the problem -- attach one of the problem photos to your reply (use the Web form, not email), and I'll see if happens with my PSE 8.

  • Is this a known bug?

    Hi All,
    I haven't encountered this in the past, but it started happening now and then on a form I'm building. Occasionally, Numeric Fields change to Text Fields (either upon opening? or saving?). At first I thought it was just a fluke, or a mistake on my part--however it has happened on at least 5 varified occasions now. And, sometimes after correcting, saving and closing, when I reopen the form, the offending field has changed back to a Text Field, again! I'll get an incorrect pattern flag on the field, which tips me off.
    I think this is only happening on fields that are in table cells--which probably means nothing.
    Next time I will check the XML before and after correcting it.
    Using LCD 9.0 on Win7 Ultimate.
    Is this a known bug, or should it be reported? If so, where?
    Thanks,
    Stephen

    Hi Stephen,
    Intriging. I have not seen this.
    You should log it as a bug here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform.
    Good luck,
    Niall

  • Leopard completely freezes - is this a known bug?

    Greetings,
    since I've installed Leopard 10.5.4 on my MacBook Pro the day it came out, I have this weird behavior that sometimes Leopard completely freezes on me, i.e. doesn't accept mouse or keyboard input, nor does any application respond, no crashing or warning prompts.
    This happens while I am either doing regular routines or on the Internet and my only chance was to hit the power button. In total 3 times over the past weeks. I can't say which application or setting might cause this. For example it happened when I switched from VMWare to Entourage. Another time after closing XCode or by working in MS Office for Mac.
    I know that this decription isn't very specific, but I was wondering if that's a known bug and if anyone else experienced this?
    Should I run any system tool after this type of reboot which I believe is everything but best practice?
    Any help is greatly appreciated.
    Thanks
    -Alex
    Message was edited by: Alex Wied

    Is the cache cleaning for you s standard practice after each OS X update? If not i recommend it. Try with Leopard Cache Cleaner or Onyx.
    Regards
    Simon

  • Forms 6i menu item not being re-enabled. Is this a known bug?

    I am trying to re-enable a menu item in a When-Button-Pressed trigger. However the set_menu_item_property doesn't always work. Is this a known Oracle bug?

    Hi
    Its working perfectly fine. Can u mention a specific scenario where its being reproducible at your end or u can send across
    a scenario specific fmb and mmb files to me.
    Thanks and regards
    Amit

  • Iphone 4 (White MC604FB) Update iOs 6.0 - Wifi Problem and iphone bug when trying to unlock on call receive. Is this a known bug ?

    Dear Members (and Apple Team)
    I have two iphones 4 and two bugs on the white one
    1/ Is the first gen (Black)
    2/ Is the second gen (White MC604FB)
    I both uptdated the into Update iOs 6.0 -
    Bug 1 : With the white iPhone 4 i have a real Wifi Problem, as close as 5 to 7 meters from any WiFi spot, i lose the signal, where my "black" iphone at the same time and same distance shows full signal (and tested with safari.... works).
    Bug 2 : Once the white iphone is in "stand by" when trying to unlock on incoming call, the touch screen works and receive the touch information, but it bugs on trying to unlock to receive the call. (very very anoying :o) have to call back almost every time.
    Are those already known bugs ? Is there a fix ?
    Reagrds
    Alexandre

    Dear Diesel
    Thanks for your prompt reply.
    I did restore before posting, in evry possible way. no improvment.
    I have 24H ago updated to iOS 6.01. So far no more "screen jam" on incoming calls, but the wifi is still inconsistent with very poor signal strenght (compare to my black iphone 4)
    PS : For information, did beleive  there was two versions of iphone 4 (In Europe ) :
    1/ Is firts generation "gen" with With board MC603FB
    2/ The white one for me with board MC604FB

  • Really bad banding and artifacts in 16-bit layered greyscale file. Bad banding is retained when converted to 8-bit with No flattening. Flatten 16-bit image and banding and artifacts disappear even with no dither or noise layer. Is this a known bug?

    Has anyone else experienced this?
    I thought it was a monitor problem at first, but I'm using a 10-bit per channel Eizo. It seems to be a Photoshop bug based on many layers interacting with each other. When I flatten everything is fine. But I need to work on this image with layers and decent fidelity. Interestingly when I convert to 8-bit without flattening (and utilising the dither function to potentially reduce banding even further), it uses the terrible artifact laden/banding to do the conversion even though when I zoom into 1:1 in my 16-bit document it looks fine. But 50% or 25% zoom I suddenly get these awful artifacts.
    Here's some screenshots to clarify. Please note I've used Photoshop for 24 years so I'm no slouch but this is the first time I've seen this. The problem is I need to do some subtle airbrush and texture work on this and it's almost unusable unless I flatten (please note, it does the same in the original 8-bit file and just to say I Gaussian-Blurred every layer with a 30px radius after converting to 16-bit so the there's no longer any 8-bit information in there or reasons for banding/artifacts). I can only think it is some of bug in Photoshop's layering engine.
    Has anyone seen this before - dealt with this before?
    Thanks in advance.
    Not sure these embedded images will work.
    8% zoomed - see all the strange banding and triangular artifacts
    <a href="http://imgur.com/izrGuia"><img src="http://i.imgur.com/izrGuia.png" title="source: imgur.com" /></a>
    Flattened view - all smooth:
    <a href="http://imgur.com/Pn35IAK"><img src="http://i.imgur.com/Pn35IAK.png" title="source: imgur.com" /></a>
    50% zoom, still there:
    <a href="http://imgur.com/Z207hFd"><img src="http://i.imgur.com/Z207hFd.png" title="source: imgur.com" /></a>
    100% artifacts disappear:
    <a href="http://imgur.com/6aGOz0V"><img src="http://i.imgur.com/6aGOz0V.png" title="source: imgur.com" /></a>
    100% 16-bit layered
    <a href="http://imgur.com/0XJfe5e"><img src="http://i.imgur.com/0XJfe5e.png" title="source: imgur.com" /></a>
    and finally 8-bit layered converted from 16-bit with dither.
    <a href="http://imgur.com/PSxiu43"><img src="http://i.imgur.com/PSxiu43.png" title="source: imgur.com" /></a>
    help!

    I can't speak to why, perhaps someone more knowledgeable than I can speak to that.   But if it only happens at certain views then it's purely a display issue; it won't happen in print or when you downsample to display size.  Such banding issues have always disappeared for me when I output to 8 bit.
    I'd assume that it's because of your monitor; it can't display all the colors and when zoomed out there's too wide of a range in a small area so banding occurs.  But that's just my guess.

  • All apps that take pictures crash when I take a picture.  Is this a known bug?

    I have multiple apps that can take a picture, and when I take pictures from within the apps, they crash.  It is all the picture taking apps (except the onboard camera app).  So, Twitter, Bank of the West, and Contact Snapper.
    Is anyone else having this problem?

    I'm sure someone in the world, among the millions and millions with an iPhone might have the problem you're describing.  How does that help you, knowing this?
    Basic troubleshooting steps right out of the manual are restart, reset, restore from backup, restore as new.  Try each step in order until the problem is solved.

  • [N97 mini - UPDATED] Well known bug: "camera alrea...

    I updated my N97 mini device to latest fw which is 30.04.
    Like whenever I capture image with my camera, after capturing image I can't interact with the handset.
    Rather it shows "camera already in use".
    I have to wait a lot more rather usual time in order to delete captured image or interact. Is there any solution of this?
    I heard of some mod which arent authorized can fix it. But i don't trust those, neither I think is acceptable to be forced to put "custom" firmware to solve a problem Nokia should have fixed asap.
    Of course I won't buy another Nokia cellphone anymore and I will discourage friends (and they are really many) to do the same because of lack of support.
    Please:
    - don't tell me it is a problem of my phone because it is not (all people with N97 mini have the same problem)
    - don't tell me to reset it or to re-update firmware because it is useless (and I have already tried it)
    - tell me you are awared of the problem and it will be fixed in the next coming firmware release because it is the only thing worth saying
    Thanks for your attention and availability.
    Goodbye.

    Same problem here.
    Nokia Developers;
    Sir/s Maam/s..
    No particular software updates from Nokia in order to fix this "Well known BUG Problem"?
    --thanks..

  • Is there a KNOWN BUG regarding photos and text box formatting?

    I have created an extensive website for my town's Environmental Commission. (www.njnaturenotes.com).
    There are numerous pages in which text boxes are formatted with color, borders and shadows, and with photos. However, some of the pages (actually, an increasing number) are showing all the right attributes in iWeb, but NOT on the web (using Safari or any other browser).
    I've tried duplicating existing pages that 'work' and making modifications for them to be new pages (new subjects and photos) but in many cases the photos don't show up on the web, nor does most or all of the text box outlines and shadows. Sometimes, even the Hit Counter doesn't show up on the web.
    Is this a known bug in iWeb?

    I made it a point to view the site from windows machines today, using IE, Firefox and Safari. Spent lots of time making comparisons and looking for details.
    With each browser, it fit the page…no horizontal scrolling. So, that wasn't an issue. Perhaps yours is an older computer or has an unusual setting that's causing windows to fit beyond the screen edges horizontally.
    The fastest browser was Safari, on both Mac and Windows. Firefox on each platform was somewhat slower and displayed most of the formatting (mostly text box shadows and photo shadows), but less than Safari. IE was by far the slowest on both platforms and had the greatest number of issues with displaying numerous things.
    Well, the page is useable in about 5 seconds on a mac and about 7 seconds on a windows machine even though some features continue to load.
    I've discussed this with someone who makes his living working on Macs and he did tell me that there are still numerous issues with iWeb that he hopes will be remedied with the next update.
    I may have to live with some of the limitations (which are not consistent) until the update is available.

Maybe you are looking for

  • Unable to update revenue plan values in Easy Cost Planning

    Hi, Business maintains planned costs and revenues on WBS element using Easy Cost Planning tool. But for one of the WBS element system is not allowing to update/add planned revenue line items.User is able to update the planned costs for this WBS eleme

  • Library consolidation question

    does it move the music from its old location to the itunes folder or copy?

  • Authenticate the user OIM on WebCenter

    Hi for All, On Linux,... I have the following VM 1 1. Oracle Database 11.2 2. RCU 11.1.1.3.3 VM 2 1. Weblogic 10.3.3 + Coherence 2. SOA 11.1.1.2.0 + PatchSet Oracle SOA to 11.1.1.3.0 3. Oracle IDAM 11g R1 PS2 (11.1.1.3) VM 3 1. Weblogic 10.3.3 + Cohe

  • Connect smart TV to ONT without using router?

    I have Fios TV, internet and phone.  My ONT is in the basement and is run to a router 2 floors above and at the other end of the house.  A smart TV, which is one floor directly above and only about 20 feet from the ONT, has poor Netflix performance u

  • HELP!! Authorization in the same laptop with different operation systems

    My BF installed Win 7 operation system on his laptop yesterday and re-authorized it when he used iTunes. However, when he finished authorization, a dialog block showing that "*Including this one, you have authorised two computers out of your availabl