MMBase

Memory leak after editing tree if encountering relations pointing to self.

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 1.7.3
  • Fix Version/s: 2.0.0
  • Component/s: Core
  • Description:
    Hide
    After editing documents tree we faced OutOfMemory error which caused server to crash.
    This error occured while generation of tree and caused production server to crash.
    MMbase reserved great amounts of memory.

    Excerpt from log file:

    2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377
    2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 11 org.mmbase.storage.search.implementation.database.BasicSqlHandler - generated SQL: SELECT pools31.owner,pools31.otype,pools31.name,pools31.description,pools31.number,insrel30.number,pools31.number,pools0.number,pools.number,pools3.number,pools5.number,pools7.number,pools9.number,pools11.number,pools13.number,pools15.number,pools17.number,pools19.number,pools21.number,pools23.number,pools25.number,pools27.number,pools29.number FROM mm_pools pools0,mm_insrel insrel,mm_pools pools,mm_insrel insrel2,mm_pools pools3,mm_insrel insrel4,mm_pools pools5,mm_insrel insrel6,mm_pools pools7,mm_insrel insrel8,mm_pools pools9,mm_insrel insrel10,mm_pools pools11,mm_insrel insrel12,mm_pools pools13,mm_insrel insrel14,mm_pools pools15,mm_insrel insrel16,mm_pools pools17,mm_insrel insrel18,mm_pools pools19,mm_insrel insrel20,mm_pools pools21,mm_insrel insrel22,mm_pools pools23,mm_insrel insrel24,mm_pools pools25,mm_insrel insrel26,mm_pools pools27,mm_insrel insrel28,mm_pools pools29,mm_insrel insrel30,mm_pools pools31 WHERE pools0.number=35 AND (pools0.number=insrel.snumber AND pools.number=insrel.dnumber) AND (pools.number=insrel2.snumber AND pools3.number=insrel2.dnumber) AND (pools3.number=insrel4.snumber AND pools5.number=insrel4.dnumber) AND (pools5.number=insrel6.snumber AND pools7.number=insrel6.dnumber) AND (pools7.number=insrel8.snumber AND pools9.number=insrel8.dnumber) AND (pools9.number=insrel10.snumber AND pools11.number=insrel10.dnumber) AND (pools11.number=insrel12.snumber AND pools13.number=insrel12.dnumber) AND (pools13.number=insrel14.snumber AND pools15.number=insrel14.dnumber) AND (pools15.number=insrel16.snumber AND pools17.number=insrel16.dnumber) AND (pools17.number=insrel18.snumber AND pools19.number=insrel18.dnumber) AND (pools19.number=insrel20.snumber AND pools21.number=insrel20.dnumber) AND (pools21.number=insrel22.snumber AND pools23.number=insrel22.dnumber) AND (pools23.number=insrel24.snumber AND pools25.number=insrel24.dnumber) AND (pools25.number=insrel26.snumber AND pools27.number=insrel26.dnumber) AND (pools27.number=insrel28.snumber AND pools29.number=insrel28.dnumber) AND (pools29.number=insrel30.snumber AND pools31.number=insrel30.dnumber) ORDER BY pools0.number DESC,insrel.number DESC,pools.number DESC,pools3.name ASC,insrel2.number DESC,pools3.number DESC,pools5.name ASC,insrel4.number DESC,pools5.number DESC,pools7.name ASC,insrel6.number DESC,pools7.number DESC,pools9.name ASC,insrel8.number DESC,pools9.number DESC,pools11.name ASC,insrel10.number DESC,pools11.number DESC,pools13.name ASC,insrel12.number DESC,pools13.number DESC,pools15.name ASC,insrel14.number DESC,pools15.number DESC,pools17.name ASC,insrel16.number DESC,pools17.number DESC,pools19.name ASC,insrel18.number DESC,pools19.number DESC,pools21.name ASC,insrel20.number DESC,pools21.number DESC,pools23.name ASC,insrel22.number DESC,pools23.number DESC,pools25.name ASC,insrel24.number DESC,pools25.number DESC,pools27.name ASC,insrel26.number DESC,pools27.number DESC,pools29.name ASC,insrel28.number DESC,pools29.number DESC,pools31.name ASC,insrel30.number DESC,pools31.number DESC
    2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377
    2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Punctuality Reports
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Dec 2006
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 2112
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 2112
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28
    2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Nov 2006
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1846
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1846
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Punctuality Reports
    2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All

    After analysis of generated heapdump we saw 400MB ArrayList created by mmbase.

    Finally we found out that the problem was in entry in MM_INSREL db table - two rows had snumber the same as dnumber (1377)- so we executed DELETE FROM MM_INSREL where snumber=dnumber; and everything started working fine.

    Show
    After editing documents tree we faced OutOfMemory error which caused server to crash. This error occured while generation of tree and caused production server to crash. MMbase reserved great amounts of memory. Excerpt from log file: 2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377 2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 11 org.mmbase.storage.search.implementation.database.BasicSqlHandler - generated SQL: SELECT pools31.owner,pools31.otype,pools31.name,pools31.description,pools31.number,insrel30.number,pools31.number,pools0.number,pools.number,pools3.number,pools5.number,pools7.number,pools9.number,pools11.number,pools13.number,pools15.number,pools17.number,pools19.number,pools21.number,pools23.number,pools25.number,pools27.number,pools29.number FROM mm_pools pools0,mm_insrel insrel,mm_pools pools,mm_insrel insrel2,mm_pools pools3,mm_insrel insrel4,mm_pools pools5,mm_insrel insrel6,mm_pools pools7,mm_insrel insrel8,mm_pools pools9,mm_insrel insrel10,mm_pools pools11,mm_insrel insrel12,mm_pools pools13,mm_insrel insrel14,mm_pools pools15,mm_insrel insrel16,mm_pools pools17,mm_insrel insrel18,mm_pools pools19,mm_insrel insrel20,mm_pools pools21,mm_insrel insrel22,mm_pools pools23,mm_insrel insrel24,mm_pools pools25,mm_insrel insrel26,mm_pools pools27,mm_insrel insrel28,mm_pools pools29,mm_insrel insrel30,mm_pools pools31 WHERE pools0.number=35 AND (pools0.number=insrel.snumber AND pools.number=insrel.dnumber) AND (pools.number=insrel2.snumber AND pools3.number=insrel2.dnumber) AND (pools3.number=insrel4.snumber AND pools5.number=insrel4.dnumber) AND (pools5.number=insrel6.snumber AND pools7.number=insrel6.dnumber) AND (pools7.number=insrel8.snumber AND pools9.number=insrel8.dnumber) AND (pools9.number=insrel10.snumber AND pools11.number=insrel10.dnumber) AND (pools11.number=insrel12.snumber AND pools13.number=insrel12.dnumber) AND (pools13.number=insrel14.snumber AND pools15.number=insrel14.dnumber) AND (pools15.number=insrel16.snumber AND pools17.number=insrel16.dnumber) AND (pools17.number=insrel18.snumber AND pools19.number=insrel18.dnumber) AND (pools19.number=insrel20.snumber AND pools21.number=insrel20.dnumber) AND (pools21.number=insrel22.snumber AND pools23.number=insrel22.dnumber) AND (pools23.number=insrel24.snumber AND pools25.number=insrel24.dnumber) AND (pools25.number=insrel26.snumber AND pools27.number=insrel26.dnumber) AND (pools27.number=insrel28.snumber AND pools29.number=insrel28.dnumber) AND (pools29.number=insrel30.snumber AND pools31.number=insrel30.dnumber) ORDER BY pools0.number DESC,insrel.number DESC,pools.number DESC,pools3.name ASC,insrel2.number DESC,pools3.number DESC,pools5.name ASC,insrel4.number DESC,pools5.number DESC,pools7.name ASC,insrel6.number DESC,pools7.number DESC,pools9.name ASC,insrel8.number DESC,pools9.number DESC,pools11.name ASC,insrel10.number DESC,pools11.number DESC,pools13.name ASC,insrel12.number DESC,pools13.number DESC,pools15.name ASC,insrel14.number DESC,pools15.number DESC,pools17.name ASC,insrel16.number DESC,pools17.number DESC,pools19.name ASC,insrel18.number DESC,pools19.number DESC,pools21.name ASC,insrel20.number DESC,pools21.number DESC,pools23.name ASC,insrel22.number DESC,pools23.number DESC,pools25.name ASC,insrel24.number DESC,pools25.number DESC,pools27.name ASC,insrel26.number DESC,pools27.number DESC,pools29.name ASC,insrel28.number DESC,pools29.number DESC,pools31.name ASC,insrel30.number DESC,pools31.number DESC 2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377 2006.12.27 14:47:54.820 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Punctuality Reports 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1377 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Dec 2006 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 2112 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 2112 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28 2006.12.27 14:47:54.821 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Nov 2006 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1846 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting number to 1846 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting owner to admin 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting otype to 28 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting name to Punctuality Reports 2006.12.27 14:47:54.822 DEBUG Servlet.Engine.Transports : 5 org.mmbase.module.core.MMObjectNode - Setting description to All After analysis of generated heapdump we saw 400MB ArrayList created by mmbase. Finally we found out that the problem was in entry in MM_INSREL db table - two rows had snumber the same as dnumber (1377)- so we executed DELETE FROM MM_INSREL where snumber=dnumber; and everything started working fine.
  • Environment:
    DB2 v8.2.5, Webshpere 5.1 on AIX

Activity

Michiel Meeuwissen made changes - 2007-02-01 08:10
Field Original Value New Value
Fix Version/s 1.8.4 [ 10140 ]
Michiel Meeuwissen made changes - 2007-02-01 08:10
Assignee Default Project Leader [ mmbaseleader ] Michiel Meeuwissen [ mihxil ]
Henk Hangyi made changes - 2007-05-10 15:28
Fix Version/s 1.8.5 [ 10145 ]
Fix Version/s 1.8.4 [ 10140 ]
Michiel Meeuwissen made changes - 2007-11-28 11:54
Fix Version/s 1.8.6 [ 10156 ]
Fix Version/s 1.8.5 [ 10145 ]
Michiel Meeuwissen made changes - 2008-03-19 20:07
Fix Version/s 1.8.7 [ 10160 ]
Fix Version/s 1.8.6 [ 10156 ]
Michiel Meeuwissen made changes - 2008-12-05 17:03
Fix Version/s 1.9.2 [ 10171 ]
Fix Version/s 1.8.7 [ 10160 ]
Michiel Meeuwissen made changes - 2009-07-31 14:59
Summary Memory leak after editing tree Memory leak after editing tree if encountering relations pointing to self.
Fix Version/s 1.9.3 [ 10190 ]
Fix Version/s 1.9.2 [ 10171 ]
Michiel Meeuwissen made changes - 2010-03-04 20:10
Fix Version/s 2.0.0 [ 10143 ]
Fix Version/s 1.9.3 [ 10190 ]

People

Dates

  • Created:
    2007-01-02 12:26
    Updated:
    2010-03-04 20:10