{"record":{"id":"524b7e0d2de59afc","repo":"apache/hadoop","slug":"thread-interrupted","errorCode":null,"errorMessage":"Thread Interrupted","messagePattern":"Thread Interrupted","errorType":"exception","errorClass":"InterruptedIOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java","lineNumber":223,"sourceCode":"        // compatible with earlier versions of LBKMSCP\n        if (action.action == RetryAction.RetryDecision.FAIL\n            && numFailovers >= providers.length - 1) {\n          LOG.error(\"Aborting since the Request has failed with all KMS\"\n              + \" providers(depending on {}={} setting and numProviders={})\"\n              + \" in the group OR the exception is not recoverable\",\n              CommonConfigurationKeysPublic.KMS_CLIENT_FAILOVER_MAX_RETRIES_KEY,\n              getConf().getInt(\n                  CommonConfigurationKeysPublic.\n                  KMS_CLIENT_FAILOVER_MAX_RETRIES_KEY, providers.length),\n              providers.length);\n          throw ioe;\n        }\n        if (((numFailovers + 1) % providers.length) == 0) {\n          // Sleep only after we try all the providers for every cycle.\n          try {\n            Thread.sleep(action.delayMillis);\n          } catch (InterruptedException e) {\n            throw new InterruptedIOException(\"Thread Interrupted\");\n          }\n        }\n      } catch (Exception e) {\n        if (e instanceof RuntimeException) {\n          throw (RuntimeException)e;\n        } else {\n          throw new WrapperException(e);\n        }\n      }\n    }\n  }\n\n  private int nextIdx() {\n    while (true) {\n      int current = currentIdx.get();\n      int next = (current + 1) % providers.length;\n      if (currentIdx.compareAndSet(current, next)) {\n        return current;","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java#L205-L241","documentation":"Thrown (as an InterruptedException wrapper, e.g. in IOException form) inside LoadBalancingKMSClientProvider.doOp's failover loop when the thread executing the KMS operation is interrupted while waiting between retries. The operation is aborted rather than retried.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["The thread was interrupted while waiting on the provider queue; retry the operation or investigate the interrupting shutdown."],"exampleFix":"Retry the key operation after the interruption cause is resolved.","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}