Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 伺服器運行 210 天左右神秘宕機:內核 Bug 導致的定時重啟

編輯:Linux 教學

多台線上 Linux 伺服器在運行約 213 天無重啟情況下接連宕機,dmesg 僅顯示 ACPI 相關錯誤,初判為硬體驅動問題。經查證,實為 Linux Kernel 2.6.28 版本已知 Bug:系統運行達 208.5 天時會觸發定時器溢位,導致自動重啟或異常掛起。

錯誤日誌片段

ERST: Error Record Serialization Table (ERST) support is initialized.
ACPI Error: No handler for Region [IPMI] (ffff88081cd55420) [IPMI] (20090903/evregion-319)
ACPI Error: Region IPMI(7) has no handler (20090903/exfldio-295)
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PMI0._GHL] (Node ffff88101c853a38), AE_NOT_EXIST
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PMI0._PMC] (Node ffff88101c853a88), AE_NOT_EXIST

根因分析

Linux Kernel 2.6.28 使用 32 位元有號整數儲存系統啟動以來的毫秒數(jiffies),最大值約 231-1 毫秒 ≈ 24.8 天。但部分架構透過 timer_wheel 或 ktime 機制延伸至 208.5 天(約 180 億毫秒),超過此閾值會導致定時器計算溢位,觸發核心 panic 或硬體看門狗重啟。

參考 Red Hat 官方知識庫:Solution 68466

解決方案

  1. 升級內核(推薦)
    yum install kernel
    
  2. 重啟系統載入新內核
    reboot
    

預防建議

  • 定期檢查內核版本,關注 CVE 及廠商公告。
  • 建立定期重啟排程(如每 180 天),規避長時間運行風險。
  • 使用監控工具(Zabbix、Prometheus)監控 uptime 指標,設定告警閾值。
Copyright © Windows教程網 All Rights Reserved