{"record":{"id":"6da7da78b19fd672","repo":"argoproj/argo-workflows","slug":"failed-waiting-for-debug-pause-before-marker-w","errorCode":null,"errorMessage":"failed waiting for debug-pause-before marker: %w","messagePattern":"failed waiting for debug-pause-before marker: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/argoexec/commands/emissary.go","lineNumber":219,"sourceCode":"\t\t\t\texitCode = code\n\t\t\t\tif exitCode != 0 {\n\t\t\t\t\treturn fmt.Errorf(\"dependency %q exited with non-zero code: %d\", y, exitCode)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tname, err = exec.LookPath(name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to find name in PATH: %w\", err)\n\t}\n\n\tif os.Getenv(\"ARGO_DEBUG_PAUSE_BEFORE\") == \"true\" {\n\t\t// User can create the file: /ctr/NAME_OF_THE_CONTAINER/before\n\t\t// in order to break out of the wait and release the container from\n\t\t// the debugging state.\n\t\tif waitErr := file.WaitForCreate(ctx, varRunArgo+\"/ctr/\"+containerName+\"/before\"); waitErr != nil {\n\t\t\treturn fmt.Errorf(\"failed waiting for debug-pause-before marker: %w\", waitErr)\n\t\t}\n\t}\n\n\tbackoff, err := template.GetRetryStrategy()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get retry strategy: %w\", err)\n\t}\n\n\tcmdErr := retry.OnError(backoff, func(error) bool { return true }, func() error {\n\t\tcommand, closer, err := startCommand(ctx, name, args, template, containerName, includeScriptOutput)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to start command: %w\", err)\n\t\t}\n\t\tdefer closer()\n\n\t\tforwardSignals(ctx, signals, command.Process.Pid, false)\n\t\tpid := command.Process.Pid\n\t\tinnerCtx, cancel := context.WithCancel(ctx)","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argoexec/commands/emissary.go#L201-L237","documentation":"When ARGO_DEBUG_PAUSE_BEFORE=true, argoexec deliberately pauses before launching the main command and blocks until a human creates the marker file /var/run/argo/ctr/<containerName>/before (for interactive debugging via kubectl exec). This error means that wait was interrupted — the context was cancelled (pod terminating / timeout) or the file watcher failed — so the container cannot proceed.","triggerScenarios":"ARGO_DEBUG_PAUSE_BEFORE env var set to \"true\" and the marker file was never created before the pod's context ended: pod deleted/deadline exceeded, or file.WaitForCreate failed (inotify watch error on /var/run/argo/ctr/<name>).","commonSituations":"A developer enabled the debug pause (typically via the ARGO_DEBUG_PAUSE_BEFORE env var) but forgot to exec into the pod and touch the file; CI runs with the flag accidentally set; activeDeadlineSeconds kills the pod while paused.","solutions":["kubectl exec into the pod and create the marker: touch /var/run/argo/ctr/<containerName>/before","Unset ARGO_DEBUG_PAUSE_BEFORE (remove it from the container env) and rerun the workflow","If the pod is gone, resubmit the workflow without the debug flag","Ensure activeDeadlineSeconds is generous while debugging"],"exampleFix":"// before\nenv:\n- name: ARGO_DEBUG_PAUSE_BEFORE\n  value: \"true\"\n// after (remove or set false)\nenv:\n- name: ARGO_DEBUG_PAUSE_BEFORE\n  value: \"false\"","handlingStrategy":"try-catch","validationCode":"// ensure the flag is only set in dev\nif (process.env.ARGO_DEBUG_PAUSE_BEFORE === 'true' && process.env.NODE_ENV === 'production') throw new Error('ARGO_DEBUG_PAUSE_BEFORE must not be set in production')","typeGuard":null,"tryCatchPattern":"try { await run() } catch (e) { if (/failed waiting for debug-pause-before marker/.test(e.message)) { // exec into pod: touch /var/run/argo/ctr/<name>/before, or disable flag and retry\n } throw e }","preventionTips":["Never set ARGO_DEBUG_PAUSE_BEFORE outside interactive debugging sessions","Remember any env var added to the pod must be documented (docs/environment-variables.md)","Set a reminder to remove the flag after debugging; search pod specs before submit","Allow ample activeDeadlineSeconds while paused"],"tags":["argoexec","debugging","env-var","file-wait"],"backgroundTag":"debug-pause-marker-missing","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}