From dev-return-33718-archive-asf-public=cust-asf.ponee.io@mina.apache.org Sun Oct 28 08:34:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CC36A180671 for ; Sun, 28 Oct 2018 08:34:03 +0100 (CET) Received: (qmail 78899 invoked by uid 500); 28 Oct 2018 07:34:02 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 78888 invoked by uid 99); 28 Oct 2018 07:34:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2018 07:34:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E13DDD3B53 for ; Sun, 28 Oct 2018 07:34:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hMh-3UhM8tY3 for ; Sun, 28 Oct 2018 07:34:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 36CE55F4DB for ; Sun, 28 Oct 2018 07:34:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9ADF3E0D27 for ; Sun, 28 Oct 2018 07:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3013227763 for ; Sun, 28 Oct 2018 07:34:00 +0000 (UTC) Date: Sun, 28 Oct 2018 07:34:00 +0000 (UTC) From: "Goldstein Lyor (JIRA)" To: dev@mina.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SSHD-854) Massive object graph in NioSocketSession MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SSHD-854?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D166663= 16#comment-16666316 ]=20 Goldstein Lyor commented on SSHD-854: ------------------------------------- In this context, I re-wrote {{CachingPublicKeyAuthenticator}} to=C2=A0 [use= a session attribute|https://github.com/apache/mina-sshd/commit/5c7cc71377e= f8d720683957548e8f0c66756d5c2] instead of a listener-updated map. This will= make sure that when the session is GC'ed, the attributes will be cleaned-u= p regardless of whether {{sessionClosed}} was called or not (due to some bu= g/issue). > Massive object graph in NioSocketSession > ---------------------------------------- > > Key: SSHD-854 > URL: https://issues.apache.org/jira/browse/SSHD-854 > Project: MINA SSHD > Issue Type: Bug > Reporter: jpalacios > Priority: Major > > I'm looking at a heap dump from one of our customers where the retained h= eap size for some {{NioSocketSession}} instances is almost 1GB. > From the looks of the dump MINA has created a massive object graph where: > {code} > NioSocketSession -> SelectionKeyImpl -> EpollSelectorImpl -> HashMap -> S= electionKeyImpl -> NioSocketSession -> ... > {code} > From the looks of the obeject IDs these are not loops > Each individual object is not large by itself but at the top of the graph= the accumulated retained size is enough to produce an OOME > Could you help me understand how MINA can produce such a massive object g= raph? Should MINA apply any defense mechanism to prevent this?? -- This message was sent by Atlassian JIRA (v7.6.3#76005)