{"record":{"id":"2306faadc27468af","repo":"apache/druid","slug":"worker-s","errorCode":null,"errorMessage":"Worker: %s","messagePattern":"Worker: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java","lineNumber":520,"sourceCode":"        // Cancellation triggered by an external error. Report the original error.\n        if (exceptionEncountered != null) {\n          cancelException.addSuppressed(exceptionEncountered);\n        }\n        errorForReport =\n            MSQErrorReport.fromException(queryId(), selfHost, null, cancelException, querySpec.getColumnMappings());\n      } else if (cancelReason != null) {\n        errorForReport = MSQErrorReport.fromFault(queryId(), selfHost, null, new CanceledFault(cancelReason));\n      } else {\n        errorForReport = MSQTasks.makeErrorReport(queryId(), selfHost, controllerError, workerError);\n      }\n\n      // Log the errors we encountered.\n      if (controllerError != null) {\n        log.warn(\"Controller: %s\", MSQTasks.errorReportToLogMessage(controllerError, context.isDebug()));\n      }\n\n      if (workerError != null) {\n        log.warn(\"Worker: %s\", MSQTasks.errorReportToLogMessage(workerError, context.isDebug()));\n      }\n    }\n    if (queryKernel != null && queryKernel.isSuccess()) {\n      // If successful, encourage workers to exit successfully.\n      // Only send this command to participating workers. For task-based queries, this is all tasks, since tasks\n      // are launched only when needed. For Dart, this is any servers that were actually assigned work items.\n      postFinishToWorkers(queryKernel.getAllParticipatingWorkers());\n      workerManager.stop(false);\n    } else {\n      // If not successful, cancel running tasks.\n      if (workerManager != null) {\n        workerManager.stop(true);\n      }\n    }\n\n    // Wait for worker tasks to exit. Ignore their return status. At this point, we've done everything we need to do,\n    // so we don't care about the task exit status.\n    if (workerTaskRunnerFuture != null) {","sourceCodeStart":502,"sourceCodeEnd":538,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java#L502-L538","documentation":"Same error path as the controller log: in ControllerImpl.runInternal, when a worker error report exists, it is logged as 'Worker: %s' after the controller error. This is the controller logging what a worker reported as the failure reason for the MSQ query.","triggerScenarios":"A MSQ query fails because one of its workers errored: channel/communication failures, OOM on a worker, stage execution exceptions, or data-source/segment read failures reported back to the controller.","commonSituations":"Workers die from insufficient memory (tune peon memory), storage connector issues during shuffle, or exceptions reading input segments; the controller then logs the worker report and the query fails with a Worker fault.","solutions":["Read the rendered message after 'Worker:' — the fault class and message identify the worker-side root cause.","Increase worker task memory (druid.indexer.runner javaOpts / MSQ task context maxWorkerMemory) if the cause is OOM or channel pressure.","Check the specific task's logs on its host for the full stack trace of the reported worker fault."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  runMsqQuery(query);\n} catch (MSQException e) {\n  // \"Worker:\" log names the worker fault; fetch that task's logs for the stack trace\n  fetchTaskLogsForFault(e);\n}","preventionTips":["Give MSQ worker tasks adequate memory; OOM is a common worker-fault cause.","Check the specific task logs on the worker host named in the report.","Monitor shuffle/storage-connector health between controller and workers."],"tags":["druid","msq","worker","controller","query-failure"],"backgroundTag":"msq-query-failed","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}