{
  "id": "embedded/freertos-timer-service-task-overrun",
  "signature": "FreeRTOS: Timer service task overrun, daemon task missed deadline",
  "signature_zh": "FreeRTOS：定时器服务任务超时，守护任务错过截止时间",
  "regex": "FreeRTOS: Timer service task overrun, daemon task missed deadline",
  "domain": "embedded",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Timer service task (daemon) is overloaded with too many active software timers or long callback execution, causing it to miss its scheduling deadline.",
  "root_cause_type": "generic",
  "root_cause_zh": "定时器服务任务（守护任务）因过多活动软件定时器或回调执行时间过长而过载，导致错过调度截止时间。",
  "versions": [
    {
      "version": "FreeRTOS 10.5.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ESP-IDF 5.1.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing timer service task priority does not fix overrun; the issue is CPU time exhaustion, not priority inversion.",
      "fail_rate": 0.88,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding more timer service tasks creates contention and worsens overrun due to scheduler overhead.",
      "fail_rate": 0.92,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce number of active timers or move long callbacks to separate tasks. Example: if (xTimerIsTimerActive(xTimer)) { xTimerStop(xTimer, 0); }",
      "success_rate": 0.85,
      "how": "Reduce number of active timers or move long callbacks to separate tasks. Example: if (xTimerIsTimerActive(xTimer)) { xTimerStop(xTimer, 0); }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase configTIMER_TASK_STACK_DEPTH in FreeRTOSConfig.h to 512 or more to prevent stack overflow, and set configTIMER_QUEUE_LENGTH to 20.",
      "success_rate": 0.9,
      "how": "Increase configTIMER_TASK_STACK_DEPTH in FreeRTOSConfig.h to 512 or more to prevent stack overflow, and set configTIMER_QUEUE_LENGTH to 20.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Reduce number of active timers or move long callbacks to separate tasks. Example: if (xTimerIsTimerActive(xTimer)) { xTimerStop(xTimer, 0); }",
    "Increase configTIMER_TASK_STACK_DEPTH in FreeRTOSConfig.h to 512 or more to prevent stack overflow, and set configTIMER_QUEUE_LENGTH to 20."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.freertos.org/FreeRTOS-Timer-Service-Task.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-06-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}