{"record":{"id":"491fb284efc661d1","repo":"quarkusio/quarkus","slug":"java-lang-interruptedexception-wrapped","errorCode":null,"errorMessage":"java.lang.InterruptedException (wrapped)","messagePattern":"java\\.lang\\.InterruptedException \\(wrapped\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"warning","filePath":"core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java","lineNumber":253,"sourceCode":"                if (IS_LINUX) {\n                    //note that this is only used for notifications that something has changed,\n                    //this triggers the same file scan as the polling approach\n                    //this is not as efficient as it could be, but saves having two separate code paths\n                    testClassChangeWatcher = new WatchServiceFileSystemWatcher(\"Quarkus Test Watcher\", true);\n                    FileChangeCallback callback = new FileChangeCallback() {\n                        @Override\n                        public void handleChanges(Collection<FileChangeEvent> changes) {\n                            //sometimes changes come through as two events\n                            //which can cause problems for our CI tests\n                            //and cause unnecessary runs.\n                            //we add a half second delay for CI tests, to make sure this does not cause\n                            //problems\n                            try {\n                                if (context.isTest()) {\n                                    Thread.sleep(500);\n                                }\n                            } catch (InterruptedException e) {\n                                throw new RuntimeException(e);\n                            }\n                            periodicTestCompile();\n                        }\n                    };\n                    // monitor .env as it can impact test execution\n                    testClassChangeWatcher.watchFiles(Path.of(context.getApplicationRoot().getProjectDirectory()),\n                            List.of(Path.of(\".env\")),\n                            callback);\n                    Set<Path> nonExistent = new HashSet<>();\n                    for (DevModeContext.ModuleInfo module : context.getAllModules()) {\n                        for (Path path : module.getMain().getSourcePaths()) {\n                            testClassChangeWatcher.watchDirectoryRecursively(path, callback);\n                        }\n                        for (Path path : module.getMain().getResourcePaths()) {\n                            testClassChangeWatcher.watchDirectoryRecursively(path, callback);\n                        }\n                    }\n                    for (DevModeContext.ModuleInfo module : context.getAllModules()) {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java#L235-L271","documentation":"RuntimeUpdatesProcessor.handleChanges(), when running in test mode, sleeps 500ms before periodic test compilation; if that Thread.sleep is interrupted, the InterruptedException is wrapped in a RuntimeException and rethrown. The interruption typically comes from dev mode shutting down while change handling is in flight, so this is usually a benign shutdown-time failure.","triggerScenarios":"Dev mode / continuous testing stops (application shutdown, watcher thread interrupted) at the exact moment handleChanges is sleeping before periodicTestCompile(); the InterruptedException is converted to a RuntimeException.","commonSituations":"Stopping quarkus:dev (Ctrl+C) while continuous testing is mid-recompile; test run finished and the update processor being torn down during a change event.","solutions":["Usually ignore: it occurs during shutdown and does not affect a fresh dev mode run.","If it appears repeatedly at runtime, check which component interrupts the update thread (e.g. executor shutdown) and ensure change watchers are stopped before shutdown.","Upgrade Quarkus — later releases handle interruption in the update loop more gracefully.","Reproduce context: note whether it coincides with test completion; adjust quarkus.test.continuous-testing settings if disruptive."],"exampleFix":"// before (framework behavior on shutdown)\nThread.sleep(500); // InterruptedException -> RuntimeException\n\n// after (user-side): nothing to change in app code; restart dev mode cleanly\n./mvnw quarkus:dev","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    // change handling / shutdown\n} catch (RuntimeException e) {\n    if (e.getCause() instanceof InterruptedException) {\n        Thread.currentThread().interrupt(); // expected during shutdown; treat as benign\n    }\n}","preventionTips":["Expect this during dev mode shutdown; verify against a fresh restart rather than debugging in-place.","Keep Quarkus updated for improved interruption handling in the update loop.","Avoid force-killing the dev process while continuous testing is recompiling."],"tags":["quarkus","thread-interrupted","live-reload","shutdown"],"backgroundTag":"thread-interrupted","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}