Closed
Description
System information
Type | Version/Name |
---|---|
Distribution Name | Gentoo |
Distribution Version | (rolling) |
Kernel Version | 6.5.11 |
Architecture | amd64 |
OpenZFS Version | 2.2.0 |
Reference | https://bugs.gentoo.org/917224 |
Describe the problem you're observing
When installing the Go compiler with Portage, many of the internal compiler commands have been corrupted by having most of the files replaced by zeros.
$ file /usr/lib/go/pkg/tool/linux_amd64/* | grep data
/usr/lib/go/pkg/tool/linux_amd64/asm: data
/usr/lib/go/pkg/tool/linux_amd64/cgo: data
/usr/lib/go/pkg/tool/linux_amd64/compile: data
/usr/lib/go/pkg/tool/linux_amd64/covdata: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=xHCzRQtrkEP-Bbxql0SF/zxsofCJFlBoPlUclgwBG/TrsgK6SKiY4q6TIhyBjU/UwcISvZgqfQaEf3Kr_Tq, not stripped
/usr/lib/go/pkg/tool/linux_amd64/cover: data
/usr/lib/go/pkg/tool/linux_amd64/link: data
/usr/lib/go/pkg/tool/linux_amd64/vet: data
$ hexdump /usr/lib/go/pkg/tool/linux_amd64/compile
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0000fa0 0000 0000 0000 0000 0000 0000 5a41 3447
0000fb0 336a 3933 5a49 4f2d 6641 6342 7a6d 3646
0000fc0 582f 5930 5a4d 6761 5659 6f34 6d39 4130
0000fd0 4957 6555 2f67 686d 6a63 6675 5976 4e6a
0000fe0 346c 3070 5157 494e 5f41 5a2f 336d 6342
0000ff0 4e6d 4a4f 306c 4277 4a72 774d 4d41 006c
0001000 0000 0000 0000 0000 0000 0000 0000 0000
*
0ac9280 5a41 3447 336a 3933 5a49 4f2d 6641 6342
0ac9290 7a6d 3646 582f 5930 5a4d 6761 5659 6f34
0ac92a0 6d39 4130 4957 6555 2f67 686d 6a63 6675
0ac92b0 5976 4e6a 346c 3070 5157 494e 5f41 5a2f
0ac92c0 336d 6342 4e6d 4a4f 306c 4277 4a72 774d
0ac92d0 4d41 006c 0000 0000 0000 0000 0000 0000
0ac92e0 0000 0000 0000 0000 0000 0000 0000 0000
*
1139380 0000 0000 0000 0000 0000
1139389
I'm able to reproduce on two separate machines running 6.5.11 and ZFS 2.2.0.
ZFS does not see any errors with the pool.
$ zpool status
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:07:24 with 0 errors on Wed Nov 1 00:06:45 2023
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
nvme-WDS100T1X0E-XXXXXX_XXXXXXXXXXXX-part2 ONLINE 0 0 0
errors: No known data errors
$ zpool status -t
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:07:24 with 0 errors on Wed Nov 1 00:06:45 2023
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
nvme-WDS100T1X0E-XXXXXX_XXXXXXXXXXXX-part2 ONLINE 0 0 0 (100% trimmed, completed at Tue 31 Oct 2023 11:15:47 PM GMT)
errors: No known data errors
Describe how to reproduce the problem
- On a system running ZFS 2.2.0, upgrade pools to enable the block cloning feature.
emerge -1 dev-lang/go
, where Portage's TMPDIR is on ZFS.- After a successful install of Go, the files in
/usr/lib/go/pkg/tool/linux_amd64/compile
are corrupted.
I was able to reproduce with and without Portage's "native-extensions" feature. I was unable to reproduce after changing Portage's TMPDIR to another filesystem (such as tmpfs).