Thinkpad X201i 在空闲、执行磁盘 IO 时、执行 CPU 密集型 IDE 调试时崩溃并重新启动

Thinkpad X201i 在空闲、执行磁盘 IO 时、执行 CPU 密集型 IDE 调试时崩溃并重新启动

X201i 随机突然重启。

它正在运行 Lubuntu 16.04

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial

截至今天,该发行版已是最新的,但仍然存在该问题。

无论系统处于空闲状态、系统依靠电池运行还是系统依靠电源运行,都会发生这种情况。

我尝试了一些方法。

第一个是配置 Linux 操作系统,使其不会覆盖 BIOS 配置:在文件中,我在包含“quiet splash”值的行末尾 /etc/default/grub添加了属性,如。同时,我配置了 BIOS,使 CPU 以最大功率运行,避免节能模式。这似乎有点帮助,因为它感觉崩溃的频率降低了,一天内只有几次,而不是每半小时一次。intel_idle.max_cstate=1GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

我做的另一件事是尝试将屏幕刷新频率从 60 降低到 50,但这并没有改善情况。

我做的最后一件事是使用命令关闭交换sudo swapoff -a,但这也无助于改善情况。

它确实会随机发生,有时我甚至不在机器旁边。我可以让它继续运行,如果我几个小时后回来,它很可能已经重新启动了。

然后我注意到一些导致它不断崩溃并重新启动的东西:如果我尝试使用该命令将大量文件从硬盘驱动器复制到外部 USB 驱动器cp -fr work/* /media/.../work,或者如果我尝试运行以下命令dosfsck -a /dev/sdb1来修复外部硬盘驱动器,它也会崩溃并重新启动。这让我认为问题与硬盘操作有关。

我使用该命令进行了长时间的测试sudo smartctl -H -t long /dev/sda1,结果看起来不错:

$ sudo smartctl -a /dev/sda1
[sudo] Mot de passe de stephane : 
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-83-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MK..61GSY[N]
Device Model:     TOSHIBA MK2561GSY
Serial Number:    61SHTKL8T
LU WWN Device Id: 5 000039 35180a4ef
Firmware Version: MC001D
User Capacity:    250 059 350 016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Jul  5 11:12:09 2017 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (  120) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  67) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 128
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1154
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       1
  9 Power_On_Minutes        0x0032   089   089   000    Old_age   Always       -       4591h+59m
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1278
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       151
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       114
193 Load_Cycle_Count        0x0032   098   098   000    Old_age   Always       -       23173
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       32 (Min/Max 5/48)
199 UDMA_CRC_Error_Count    0x0032   100   100   000    Old_age   Always       -       26466059
200 Multi_Zone_Error_Rate   0x0032   100   100   000    Old_age   Always       -       71774442
240 Head_Flying_Hours       0x0032   080   080   000    Old_age   Always       -       492201
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       7380666319
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       6705692631
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       39

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      4591         -
# 2  Short offline       Completed without error       00%      1102         -
# 3  Short offline       Completed without error       00%      1102         -
# 4  Short offline       Completed without error       00%      1102         -
# 5  Short offline       Completed without error       00%      1101         -
# 6  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

我还使用该命令进行了另一项长时间测试sudo smartctl -H -t long /dev/sda6,其结果是:

$ sudo smartctl -a /dev/sda6
[sudo] Mot de passe de stephane : 
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-83-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MK..61GSY[N]
Device Model:     TOSHIBA MK2561GSY
Serial Number:    61SHTKL8T
LU WWN Device Id: 5 000039 35180a4ef
Firmware Version: MC001D
User Capacity:    250 059 350 016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Jul  5 12:44:57 2017 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (  120) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  67) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 128
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1168
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       1
  9 Power_On_Minutes        0x0032   089   089   000    Old_age   Always       -       4593h+30m
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1279
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       151
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       115
193 Load_Cycle_Count        0x0032   098   098   000    Old_age   Always       -       23179
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       36 (Min/Max 5/48)
199 UDMA_CRC_Error_Count    0x0032   100   100   000    Old_age   Always       -       26786987
200 Multi_Zone_Error_Rate   0x0032   100   100   000    Old_age   Always       -       71797822
240 Head_Flying_Hours       0x0032   080   080   000    Old_age   Always       -       492216
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       7381212201
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       6707899566
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       39

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      4593         -
# 2  Extended offline    Completed without error       00%      4591         -
# 3  Short offline       Completed without error       00%      1102         -
# 4  Short offline       Completed without error       00%      1102         -
# 5  Short offline       Completed without error       00%      1102         -
# 6  Short offline       Completed without error       00%      1101         -
# 7  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

更新:我刚刚注意到在 Eclipse 下进行调试会导致崩溃和重启。

更新:今天早上我有了一个想法。我想,如果我整天不停地重启电脑而不等待问题发生会怎么样?我今天会看到问题发生吗?所以我就这么做了。我时不时地重启电脑,我必须承认,这种情况很常见。我会工作一会儿,然后重启它。而且,到了最后,我可以说,它从未崩溃过。这让我想到这里与熵或垃圾收集有关。

答案1

如果您怀疑磁盘子系统存在问题,最好的办法之一就是安装 smartmontools 包,然后运行,例如:

smartctl -H /dev/sda

(指定 sda 或您的 Linux 发行版正在使用的任何设备名称。)

“H”标志对指定磁盘执行健康检查。还有很多其他选项,请查看手册页和软件包文档。

当然,您还应该检查来自 Linux 系统本身的消息,例如通过 dmesg 并查看(通常)/var/log 中的日志文件。

答案2

要么是 X201i 无法处理 16 GB 内存,要么是无法处理速度超过 1096Mgh 的内存。我昨天安装的 2 * 4 GB 内存条似乎是一个解决方案。自那以后,它再也没有崩溃过。即使在执行之前会持续崩溃的操作时也是如此。

相关内容