You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "rkeen-siemens (via GitHub)" <gi...@apache.org> on 2026/07/07 15:17:14 UTC
[I] Deadlock on startup [netbeans]
rkeen-siemens opened a new issue, #9490:
URL: https://github.com/apache/netbeans/issues/9490
### Apache NetBeans version
Apache NetBeans 30
### What happened
There appears to be the potential for a deadlock on startup. The following stack traces are from an application based on the NetBeans Platform 29 intermittently on first run after starting the machine. I haven't been able to recompile using NetBeans Platform 30 or 31 yet, but will update this when I do. I thought it might be worth getting some feedback in the meantime.
```
Thread [main] (Suspended)
owns: Class<T> (org.openide.modules.Places) (id=32)
owns: Object (id=33)
waiting for: MainLookup (id=31)
MainLookup(ProxyLookup).lookup(Class<T>) line: 276
23 collapsed frames
Places.getCacheDirectory() line: 72
Stamps.fileImpl(String, int[], long) line: 627
Stamps.file(String, int[]) line: 176
Stamps.asByteBuffer(String, boolean, boolean) line: 181
Stamps.asStream(String) line: 141
LocaleVariants.<clinit>() line: 43
StandardModuleData.<init>(Manifest, StandardModule) line: 71
StandardModule.createData(ObjectInput, Manifest) line: 100
StandardModule(Module).dataWithCheck() line: 158
ModuleFactory.create(File, Object, boolean, boolean, boolean, ModuleManager, Events) line: 53
ModuleManager.create(File, Object, boolean, boolean, boolean) line: 821
ModuleList.createModule(File, ModuleHistory, boolean, boolean, boolean, Integer) line: 163
ModuleList$ReadInitial.run() line: 1646
EventControl.runAtomicAction(FileSystem$AtomicAction) line: 102
SystemFileSystem(FileSystem).runAtomicAction(FileSystem$AtomicAction) line: 494
ModuleList.readInitial() line: 147
ModuleSystem.readList() line: 283
Main.getModuleSystem(boolean) line: 172
Main.getModuleSystem() line: 142
Main.start(String[]) line: 303
TopThreadGroup.run() line: 97
Thread.runWith(Object, Runnable) line: 1487
Thread.run() line: 1474
System Thread [Logging Flush] (Suspended)
owns: HashSet<E> (id=34)
owns: ProxyLookup (id=35)
owns: MainLookup (id=31)
owns: MessagesHandler (id=36)
waiting for: Object (id=33)
FixedModule(Module).dataWithCheck() line: 140
34 collapsed frames
FixedModule(Module).data() line: 132
FixedModule(Module).getCodeNameBase() line: 260
FixedModule.toString() line: 246
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
HashSet<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
Util$ModuleLookup.toString() line: 504
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
Arrays$ArrayList<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
ProxyLookup.toString() line: 91
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
Arrays$ArrayList<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
MainLookup(ProxyLookup).toString() line: 91
MessageFormat.subformat(Object[], StringBuf, FieldPosition, List<AttributedCharacterIterator>) line: 1539
MessageFormat.format(Object, Format$StringBuf, FieldPosition) line: 1093
MessageFormat(Format).format(Object) line: 165
MessageFormat.format(String, Object...) line: 1059
NbFormatter(Formatter).formatMessage(LogRecord) line: 141
NbFormatter.print(StringBuilder, LogRecord, Set<Throwable>) line: 59
NbFormatter.format(LogRecord) line: 45
MessagesHandler(StreamHandler).publish(LogRecord) line: 207
MessagesHandler.publish(LogRecord) line: 115
DispatchingHandler.run() line: 152
RequestProcessor$Task.run() line: 1519
GlobalLookup.execute(Lookup, Runnable) line: 45
Lookups.executeWith(Lookup, Runnable) line: 287
RequestProcessor$Processor.run() line: 2141
```
### Language / Project Type / NetBeans Component
NetBeans Platform Application
### How to reproduce
Launch an application based on the NetBeans Platform. Most often occurs on first launch after the machine startup.
### Did this work correctly in an earlier version?
Apache NetBeans 28
### Operating System
Windows 10
### JDK
Eclipse Temurin 25.0.1+8
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
Occurs intermittently, most commonly on first launch after machine start
### Are you willing to submit a pull request?
No
--
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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-4905949852
Please check with NB30 and follow up - code (and locks) in this area changed in #9307 Please also confirm whether this affects the base platform.
cc/ @mbien
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "rkeen-siemens (via GitHub)" <gi...@apache.org>.
rkeen-siemens commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-4982379638
> [@rkeen-siemens](https://github.com/rkeen-siemens) did you encounter the deadlock while logging with `fine` level or already with regular logger settings?
Yes, I started with `org.netbeans.core.level=FINE` and `org.netbeans.core.modules.level=FINE`
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "rkeen-siemens (via GitHub)" <gi...@apache.org>.
rkeen-siemens commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-5375300714
It does appear to be resolved in 31 and I suspect the fix was [`Module.DATA_LOCK` changing from static to an instance value](https://github.com/apache/netbeans/pull/9307/changes?diff=split&w=1#diff-7b2ebd7a5f00adcf957f6292d8750b474e75941efc8560d37e1d1bfb7f35e8d7R85).
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net closed issue #9490: Deadlock on startup
URL: https://github.com/apache/netbeans/issues/9490
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-4930125908
@rkeen-siemens did you encounter the deadlock while logging with `fine` level or already with regular logger settings?
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-4906341822
https://github.com/apache/netbeans/blob/e45e218307fce4891f6ea1d58efb5ff7031518e2/platform/o.n.bootstrap/src/org/netbeans/StandardModuleData.java#L71-L73
`localeVariants` could be potentially initialized lazily to avoid hitting the monitor, assuming nothing else in the remaining constructor would hit it later.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-5243863410
This is still awaiting information on whether this is reproducible with NB platform 30 or 31, or with the basic platform.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Deadlock on startup [netbeans]
Posted by "rkeen-siemens (via GitHub)" <gi...@apache.org>.
rkeen-siemens commented on issue #9490:
URL: https://github.com/apache/netbeans/issues/9490#issuecomment-4905476364
I've also seen the main thread blocked waiting for the logger queue to be emptied but the log flush thread was blocked on the main thread.
```
Thread [main] (Suspended)
owns: Object (id=31)
waited by: System Thread [Logging Flush] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
28 collapsed frames
LockSupport.park() line: 369
AbstractQueuedSynchronizer$ConditionNode.block() line: 520
ForkJoinPool.unmanagedBlock(ForkJoinPool$ManagedBlocker) line: 4364
ForkJoinPool.managedBlock(ForkJoinPool$ManagedBlocker) line: 4310
AbstractQueuedSynchronizer$ConditionObject.await() line: 1752
LinkedBlockingQueue<E>.put(E) line: 343
DispatchingHandler.publish(LogRecord) line: 64
Logger.log(LogRecord) line: 962
Logger.doLog(LogRecord) line: 989
Logger.log(Level, String) line: 1012
Logger.fine(String) line: 1811
StandardModule.loadManifest() line: 246
StandardModule.getManifest() line: 107
StandardModule(Module).dataWithCheck() line: 158
ModuleFactory.create(File, Object, boolean, boolean, boolean, ModuleManager, Events) line: 53
ModuleManager.create(File, Object, boolean, boolean, boolean) line: 821
ModuleList.createModule(File, ModuleHistory, boolean, boolean, boolean, Integer) line: 163
ModuleList$ReadInitial.run() line: 1646
EventControl.runAtomicAction(FileSystem$AtomicAction) line: 102
SystemFileSystem(FileSystem).runAtomicAction(FileSystem$AtomicAction) line: 494
ModuleList.readInitial() line: 147
ModuleSystem.readList() line: 283
Main.getModuleSystem(boolean) line: 172
Main.getModuleSystem() line: 142
Main.start(String[]) line: 303
TopThreadGroup.run() line: 97
Thread.runWith(Object, Runnable) line: 1487
Thread.run() line: 1474
System Thread [Logging Flush] (Suspended)
owns: HashSet<E> (id=32)
owns: ProxyLookup (id=33)
owns: MainLookup (id=34)
owns: MessagesHandler (id=35)
waiting for: Object (id=31)
owned by: Thread [main] (Suspended)
StandardModule(Module).dataWithCheck() line: 139
34 collapsed frames
StandardModule(Module).data() line: 132
StandardModule(Module).getCodeNameBase() line: 260
StandardModule.toString() line: 575
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
HashSet<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
Util$ModuleLookup.toString() line: 504
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
Arrays$ArrayList<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
ProxyLookup.toString() line: 91
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
Arrays$ArrayList<E>(AbstractCollection<E>).toString() line: 459
String.valueOf(Object) line: 4530
StringBuilder.append(Object) line: 173
MainLookup(ProxyLookup).toString() line: 91
MessageFormat.subformat(Object[], StringBuf, FieldPosition, List<AttributedCharacterIterator>) line: 1539
MessageFormat.format(Object, Format$StringBuf, FieldPosition) line: 1093
MessageFormat(Format).format(Object) line: 165
MessageFormat.format(String, Object...) line: 1059
NbFormatter(Formatter).formatMessage(LogRecord) line: 141
NbFormatter.print(StringBuilder, LogRecord, Set<Throwable>) line: 59
NbFormatter.format(LogRecord) line: 45
MessagesHandler(StreamHandler).publish(LogRecord) line: 207
MessagesHandler.publish(LogRecord) line: 115
DispatchingHandler.run() line: 152
RequestProcessor$Task.run() line: 1519
GlobalLookup.execute(Lookup, Runnable) line: 45
Lookups.executeWith(Lookup, Runnable) line: 287
RequestProcessor$Processor.run() line: 2141
```
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists