mbien opened a new issue, #8702:
URL: https://github.com/apache/netbeans/issues/8702

   ### Apache NetBeans version
   
   Apache NetBeans 27 latest release candidate
   
   ### What happened
   
   A smoke test which I run during each release which opens all ~800 NB modules 
and lets NB index them found a potential classloader leak.
   
   Metaspace grows during indexing, closing projects or GC does not free it 
afterwards.
   
   looks like this once all projects indexed:
   
   <img width="1045" height="559" alt="Image" 
src="https://github.com/user-attachments/assets/f03bed8d-a855-4498-82bb-fa72767542a6";
 />
   
   setting `-J-Djava.source.aptutils.disable.classloader.cache=true` does seem 
to help and GC appears to free resources again, but this might be only part of 
the story.
   
   <img width="1342" height="585" alt="Image" 
src="https://github.com/user-attachments/assets/43f3087e-e0ff-4fe9-ab30-7219682ede2c";
 />
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   ```bash
   set -e
   
   # opens all netbeans modules as code scanner smoke test
   
   # 1) build netbeans and change netbeans project JDK to "default"
   # 2) run script in netbeans project
   
   NB="/path/to/extracted/zip"
   JDK="/home/mbien/dev/java/jdk-25-ea_b32"
   
   OPEN=$(find -maxdepth 2 -mindepth 2 -type d\
    -not -path "./.git*"\
    -not -path "./nbbuild/*"\
    -not -path "./dist/*"\
    -not -path "./ide/xml.core"\
    -not -path "./nbi/*" | sort | xargs)
   
   #-J-Djava.source.aptutils.disable.classloader.cache=true
   
   
FLAGS="-J-Dorg.netbeans.modules.parsing.impl.indexing.LogContext\$EventType.PATH.treshold=20"
   
   "$NB/bin/netbeans" --userdir /tmp/nbusr$$ --jdkhome $JDK $FLAGS $OPEN
   
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   linux
   
   ### JDK
   
   25
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to