Skip to content

Commit df6e0c0

Browse files
committed
more debug
1 parent bca3f91 commit df6e0c0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/ArchivePathTree.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ public boolean isOpen() {
348348
protected <T> T apply(String resourceName, Function<PathVisit, T> func, boolean manifestEnabled) {
349349
lock.readLock().lock();
350350
try {
351+
checkInterrupt("apply");
351352
ensureOpen();
352353
return super.apply(resourceName, func, manifestEnabled);
353354
} finally {
@@ -359,6 +360,7 @@ protected <T> T apply(String resourceName, Function<PathVisit, T> func, boolean
359360
public void accept(String resourceName, Consumer<PathVisit> consumer) {
360361
lock.readLock().lock();
361362
try {
363+
checkInterrupt("accept");
362364
ensureOpen();
363365
super.accept(resourceName, consumer);
364366
} finally {
@@ -370,6 +372,7 @@ public void accept(String resourceName, Consumer<PathVisit> consumer) {
370372
public void walk(PathVisitor visitor) {
371373
lock.readLock().lock();
372374
try {
375+
checkInterrupt("walk");
373376
ensureOpen();
374377
super.walk(visitor);
375378
} finally {
@@ -381,6 +384,7 @@ public void walk(PathVisitor visitor) {
381384
public void walkRaw(PathVisitor visitor) {
382385
lock.readLock().lock();
383386
try {
387+
checkInterrupt("walkRaw");
384388
ensureOpen();
385389
super.walkRaw(visitor);
386390
} finally {
@@ -438,6 +442,15 @@ private void ensureOpen() {
438442
+ " because the FileSystem has been closed");
439443
}
440444

445+
private void checkInterrupt(String op) {
446+
if (Thread.currentThread().isInterrupted()
447+
&& ArchivePathTree.this.archive.toString().contains("jboss-threads")) {
448+
log.warnf(new Exception("interrupt stack trace"),
449+
"Thread %s is interrupted BEFORE %s on %s",
450+
Thread.currentThread().getName(), op, ArchivePathTree.this.archive);
451+
}
452+
}
453+
441454
@Override
442455
public void close() throws IOException {
443456
lock.writeLock().lock();

0 commit comments

Comments
 (0)