Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] memory leak in jetty monitor ?


Ivan,

Wow, jetty-7 isn't just old, it is ancient!     

It could be the problem found/fixed in 2015 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=484822
But jetty-monitor isn't even part of Jetty any more.

So sorry, we can't offer you much support on this one.   But the beauty of open source is that you are free to find/fix the issue yourself.  Do tell us how you go.

cheers



On Sat, 11 Sept 2021 at 04:04, Ivan 163 <xhhsld@xxxxxxx> wrote:
Hi,
    We are using jetty-monitor to print the thread usage, which following the configurations on the link [1]. After running the jetty server for a while, we found that tons of EventState instances, which were held by the _states variable in the AttrEventTrigger. We are trying to dive into the monitor the codes, it seems that the issue is that, the thread status retrieved from the mbean server  are saved in the _states map in the match method, but there is no remove action is invoked. So is it possible an issue here ?
   Although the jetty version we used is an very old one 7.6.7, it seems that no code is changed in the lastest 9.x version.

public final boolean match(long timestamp)

    throws Exception

  {

    MBeanServerConnection serverConnection = JMXMonitor.getServiceConnection();

    

    TYPE value = null;

    try

    {

      int pos = this._attributeName.indexOf('.');

      if (pos < 0) {

        value = (Comparable)serverConnection.getAttribute(this._nameObject, this._attributeName);

      } else {

        value = getValue((CompositeData)serverConnection.getAttribute(this._nameObject, this._attributeName.substring(0, pos)), this._attributeName

          .substring(pos + 1));

      }

    }

    catch (Exception ex)

    {

      LOG.debug(ex);

    }

    boolean result = false;

    if (value != null)

    {

      result = match(value);

      if ((result) || (getSaveAll())) {

        this._states.put(Long.valueOf(timestamp), new EventState(

          getID(), getNameString(), value));

      }

    }

    return result;

  }




 

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users


--

Back to the top