pkg SIGBUS during check
soralx at cydem.org
soralx at cydem.org
Tue Jul 7 13:05:29 UTC 2020
Greetings!
Looks like I've encountered a bug in pkg on -CURRENT r362826:
# gdb /usr/local/sbin/pkg
GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD]
[...]
Reading symbols from /usr/local/sbin/pkg...
(gdb) set args check -qsa
(gdb) run
Starting program: /usr/local/sbin/pkg check -qsa
linux-c7-alsa-lib-1.1.8: checksum mismatch for /compat/linux/etc/asound.conf
linux-c7-devtools-7.8.2003_1: checksum mismatch for /compat/linux/usr/bin/ld
linux-c7-devtools-7.8.2003_1: checksum mismatch for /compat/linux/usr/include/asm/msr-index.h
linux-c7-devtools-7.8.2003_1: checksum mismatch for /compat/linux/usr/include/linux/version.h
linux-c7-devtools-7.8.2003_1: checksum mismatch for /compat/linux/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libgcc_s.so
linux-c7-devtools-7.8.2003_1: checksum mismatch for /compat/linux/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgcc_s.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/kms_swrast_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/r300_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/r600_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/radeonsi_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/swrast_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/dri/vmwgfx_dri.so
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_r600.so.1
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_r600.so.1.0
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_r600.so.1.0.0
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_radeonsi.so.1
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_radeonsi.so.1.0
linux-c7-dri-18.3.4_3: checksum mismatch for /compat/linux/usr/lib64/vdpau/libvdpau_radeonsi.so.1.0.0
Program received signal SIGBUS, Bus error.
0x000000000045afd3 in sha256_update (ctx=0x7fffffffbe88, data=0x7fffffffbf00 "\037\213\b", len=18446744073709551615) at sha256.c:104
104 ctx->data[ctx->datalen] = data[i];
(gdb) bt
#0 0x000000000045afd3 in sha256_update (ctx=0x7fffffffbe88, data=0x7fffffffbf00 "\037\213\b", len=18446744073709551615) at sha256.c:104
#1 0x000000000043a312 in pkg_checksum_hash_sha256_file (fd=6, out=0x7fffffffdf40, outlen=0x7fffffffdf30) at pkg_checksum.c:405
#2 0x00000000004399b9 in pkg_checksum_fd (fd=6, type=PKG_HASH_TYPE_SHA256_HEX) at pkg_checksum.c:721
#3 0x0000000000439a85 in pkg_checksum_file (path=0x801ba3a00 "/compat/linux/etc/fonts", type=PKG_HASH_TYPE_SHA256_HEX) at pkg_checksum.c:703
#4 0x0000000000439d34 in pkg_checksum_validate_file (path=0x801ba3a00 "/compat/linux/etc/fonts", sum=0x80216ab52 "583a5ab4b75a7c96ff0632ed80578751b9c5c6ce8decf0802da82c98c28d6764")
at pkg_checksum.c:803
#5 0x0000000000433be4 in pkg_test_filesum (pkg=0x801520700) at pkg.c:1512
#6 0x000000000029ed82 in exec_check (argc=0, argv=0x7fffffffea60) at check.c:467
#7 0x00000000002a902b in main (argc=2, argv=0x7fffffffea50) at main.c:886
(gdb) p *ctx
$2 = {data = '\000' <repeats 63 times>, datalen = 0, bitlen = 133120, state = {3886342592, 1112691322, 3055998057, 463880560, 1126513688, 3345049214, 1543968199, 2816371606}}
(gdb) up
#1 0x000000000043a312 in pkg_checksum_hash_sha256_file (fd=6, out=0x7fffffffdf40, outlen=0x7fffffffdf30) at pkg_checksum.c:405
405 sha256_update(&sign_ctx, buffer, r);
(gdb) p sign_ctx
$3 = {data = '\000' <repeats 63 times>, datalen = 0, bitlen = 133120, state = {3886342592, 1112691322, 3055998057, 463880560, 1126513688, 3345049214, 1543968199, 2816371606}}
(gdb) p buffer
$4 = "\037\213\b\000\000\000\000\000\002\003\235Y[s\333\066\026~\307\257\300\352\241\261g$*\227v\247\233\246i\235Xi\264\223\330\036Kn\232\331\354\003DB\022\032\212[...]"
(gdb) p r
$5 = 18446744073709551615 [2^64-1]
(gdb) list
400
401 SHA256_CTX sign_ctx;
402 *out = xmalloc(SHA256_BLOCK_SIZE);
403 sha256_init(&sign_ctx);
404 while ((r = read(fd, buffer, sizeof(buffer))) > 0)
405 sha256_update(&sign_ctx, buffer, r);
406 sha256_final(&sign_ctx, *out);
407 *outlen = SHA256_BLOCK_SIZE;
408 }
409
(gdb) call sizeof(buffer)
$6 = 8192
(gdb) p errno
$8 = 21 [EISDIR?]
(gdb)
pkg v1.14.5
--
[SorAlx] ridin' VN2000 Classic LT
More information about the freebsd-pkg
mailing list