我有一个相当特殊的腐败问题,让我们首先列出情况:
主机硬件:
- 美超微 SuperServer A+ 2022G-URF
- 仅安装 1 个 CPU:AMD Opteron 6348
- 内存:4x 三星 8GB DDR3 PC3-12800 CL11 (M393B1K70DH0-CK0) = 32GB
- 硬盘驱动器:4 个 Seagate Constellation ES.3 SAS 2.0 1TB (ST1000NM0023) 作为系统硬盘驱动器(运行状况:良好)
- 带 BBU 的 LSI MegaRaid 9260-8i RAID Controller (运行状况:良好)
- 操作系统:Ubuntu 14.04 服务器
HDD 配置为 RAID10(32kb strip 大小):启用磁盘缓存、BBU 良好时回写、IO 访问:直接。 ECC 已启用并在系统 BIOS 中工作
服务器用作 VM 主机(kvm + libvirt),一个 VM 是用于自动 Android 源同步和构建的构建机器人。
虚拟机配置如下:
<domain type='kvm'>
<name>buildbot</name>
<uuid>long-uuid-that-is-of-no-interest-here</uuid>
<description>buildbot</description>
<memory unit='KiB'>14729216</memory>
<currentMemory unit='KiB'>14729216</currentMemory>
<vcpu placement='static' cpuset='2-11'>10</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>
<boot dev='hd'/>
<bootmenu enable='yes'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>Opteron_G5</model>
<vendor>AMD</vendor>
<feature policy='require' name='perfctr_core'/>
<feature policy='require' name='skinit'/>
<feature policy='require' name='perfctr_nb'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='topoext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='bmi1'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='ibs'/>
<feature policy='require' name='wdt'/>
<feature policy='require' name='extapic'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='nodeid_msr'/>
<feature policy='require' name='tce'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='lwp'/>
<feature policy='require' name='monitor'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='writethrough' io='native'/>
<source file='/var/lib/libvirt/images/disk.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<interface type='direct'>
<mac address='52:54:00:XX:XX:XX'/>
<source dev='eth0' mode='bridge'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
还安装了 Ubuntu 14.04 服务器。
现在出现了一个相当奇怪的问题:
通常一切正常。 ( repo 初始化&& repo 同步&&编译) 不过,同步很少会破坏 checkout 时的数据。该数据不会被 git 或 repo 识别为损坏(反过来又使用 git,所以这并不奇怪)。这也是一个非常非常具体的损坏(我会称其为简单的字符串替换)。
示例:
external/iproute2/tc/q_cbq.c:208: error: undefined reference to 'getOrate'
external/iproute2/tc/q_cbq.c:214: error: undefined reference to 'getOrate'
external/iproute2/tc/q_cbq.c:69: error: undefined reference to 'getOrate'
collect2: error: ld returned 1 exit status
getOrate(大写 O 而不是 0)应该是 get_rate。
Git 不会将此视为更改或损坏(git status
、git diff
和 git fsck --full
都是干净的),除非一旦更改为 get_rate 并返回 getOrate。 Git 也不会使用 git reset --hard 、 git reset --hard m/branch 、 git fetch remote && git reset --hard remote/branch 来注意到或纠正它。这不是发生这种情况的唯一文件,它只是一个示例。它发生在随机出现的随机文件中,甚至在一个文件中只出现 1 次,而忽略其他 get_rate 出现。对原始系统的新检查已经成为此问题的牺牲品。
但是,如果 git 存储库是在同一台或另一台计算机上单独克隆而不使用存储库,则不会出现此问题。
各种 HDD 模拟器/存储格式和 IO/Cache 策略已经尝试过。对 guest 和主机的 RAM 以及 HDD 进行了多次检查,没有发现任何错误。服务器和虚拟机都重新设置过多次,这个问题迟早会再次出现。
repo 版本:
版本 = (1, 21)
git 版本:
git 版本 1.9.1
Google 没有提出任何解决方案(在 google 上搜索 s/_/O 损坏问题相当困难),并且在对硬件、配置电缆、模块安装等进行了近一周的错误检查之后......我已经无能为力了。
任何指针将不胜感激。
最佳答案
感谢 @torek ( https://stackoverflow.com/users/1256452/torek ),我在 .120 的 LSI 固件更新日志中发现了一位提及的损坏问题 - 以前的固件在某些条件下无法识别磁盘缓存损坏。
由于我已经必须更新它,因此我将其更新为最新可用版本:.130。 (这必须逐步完成,当前 ->.120->.130,因为我的 Controller 古老固件无法识别 .130,从而导致“固件损坏”问题)
固件更新后,我终于遇到了一些 SENSE 错误:
05/25/14 12:07:46: EVT#00420-05/25/14 12:07:46: 113=Unexpected sense: PD 0c(e0xfc/s2) Path 4433221101000000, CDB: 1a 08 c8 00 ff 00, Sense: 5/24/00
05/25/14 12:07:46: Raw Sense for PD c: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00
05/25/14 12:07:46: PdWriteCacheSet: Error=2 issuing MODE SENSE to pd=0c
最后,在切换受影响的驱动器后(!三个!新驱动器受到影响),损坏问题像看起来一样神奇地消失了:) 所以我猜测这些驱动器上的磁盘缓存已损坏/出现故障,从而导致了一位错误。 我昨天对它们进行了 RMA,但我手边的 3 个备件已经可以完美使用了(到目前为止,尽量不要破坏我的运气^^)。
一旦 RMA 替换品到达,作为预防措施,我也将更换第四个,因为它与其他有此特殊问题的批处理来自同一批处理。
.
编辑:
提示:
可以通过 MegaCli64 -fwtermlog -dsply -aX
(X = 适配器 ID)访问更详细的 LSI Controller 技术日志
关于android - 存储库的文件损坏问题 - 随机用大写 O 替换下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23773440/