Summary: | Fatal trap 12: page fault while in kernel mode | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Dennis Clarke <dclarke> | ||||
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | emaste, kib, markj, swills | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | i386 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Dennis Clarke
2021-10-16 22:24:45 UTC
What is the source line for random_nehemiah_read+0x60? (In reply to Konstantin Belousov from comment #1) https://cgit.freebsd.org/src/tree/sys/dev/random/nehemiah.c#n96 What are you asking really ? (In reply to Dennis Clarke from comment #2) I am asking for the line number for the instruction at random_nehemiah_read+0x60. (In reply to Konstantin Belousov from comment #3) I see no way to get that information. The machine never seems to stop these repeat panics and it always resets. I think I saw it once and only once stop at the kernel debugger. There is no coredump even though there is plenty of swap. If I ever see the kernel debugger prompt then I will try a "dump" and "reset" but that seems unlikely. You do not need neither kernel debugger nor dump. Load your kernel.full in gdb, then do "list *random_nehemiah_read+0x60'. (In reply to Konstantin Belousov from comment #5) I do not see a file called "kernel.full" anywhere. This machine was installed from a snapshot install media about a week ago. I am trying to install gdb but the machine panic'd and reset during the pkg install and I am trying to get to a point where some sort of information can be achieved. (In reply to Konstantin Belousov from comment #5) I am going to move the single hard disk over to another machine and then get a buildworld/buildkernel going. Then I can migrate the disk back to this odd ball motherboard where I get a panic every hour. Build was easy on another machine : esther# uname -apKU FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n250102-d95c0a12a2d: Mon Oct 18 05:58:15 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 i386 1400038 1400038 I also have that kernel.full : esther# ls -lapb /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full -rwxr-xr-x 1 root wheel 86441196 Oct 18 05:58 /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full esther# So now I wait and see if the panic happens again. Finally I can follow up here. The kernel ( and buildworld ) were done with another machine and then I was able to move the hard disk back to the troublesome VIA Eden Esther motherboard. After letting the machine boot : esther# esther# uname -apKU FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n250102-d95c0a12a2d: Mon Oct 18 05:58:15 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 i386 1400038 1400038 esther# I left it to sit idle for a good long while and of course we caught a panic and even a coredump. esther# esther# ls -lap /var/crash/ total 109816 drwxr-x--- 2 root wheel 512 Oct 18 18:24 ./ drwxr-xr-x 24 root wheel 512 Oct 18 19:20 ../ -rw-r--r-- 1 root wheel 2 Oct 18 18:24 bounds -rw-r--r-- 1 root wheel 84 Oct 18 18:24 core.txt.0 -rw------- 1 root wheel 516 Oct 18 18:24 info.0 lrwxr-xr-x 1 root wheel 6 Oct 18 18:24 info.last -> info.0 -rw-r--r-- 1 root wheel 5 Oct 7 21:44 minfree -rw------- 1 root wheel 121741312 Oct 18 18:24 vmcore.0 lrwxr-xr-x 1 root wheel 8 Oct 18 18:24 vmcore.last -> vmcore.0 esther# Regardless lets get what you asked for : esther# cd esther# setenv TERM 'dumb' esther# gdb -q /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full Reading symbols from /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full... (gdb) list *random_nehemiah_read+0x60 0x1404240 is in random_nehemiah_read (/usr/src/sys/dev/random/nehemiah.c:69). 64 { 65 uint32_t retval = 0; 66 uint32_t rate = 0; 67 68 #ifdef __GNUCLIKE_ASM 69 __asm __volatile( 70 "movl $0,%%edx\n\t" 71 "xstore" 72 : "=a" (retval), "+d" (rate), "+D" (buf) 73 : (gdb) for the sake of looking at more lines : (gdb) list - 54 .rs_source = RANDOM_PURE_NEHEMIAH, 55 .rs_read = random_nehemiah_read 56 }; 57 58 static struct fpu_kern_ctx *fpu_ctx_save; 59 60 /* This H/W source never stores more than 8 bytes in one go */ 61 /* ARGSUSED */ 62 static __inline size_t 63 VIA_RNG_store(void *buf) (gdb) list 64 { 65 uint32_t retval = 0; 66 uint32_t rate = 0; 67 68 #ifdef __GNUCLIKE_ASM 69 __asm __volatile( 70 "movl $0,%%edx\n\t" 71 "xstore" 72 : "=a" (retval), "+d" (rate), "+D" (buf) 73 : (gdb) list 74 : "memory" 75 ); 76 #endif 77 if (rate == 0) 78 return (retval&0x1f); 79 return (0); 80 } 81 82 static void 83 random_nehemiah_init(void) (gdb) quit esther# Hope this helps however I can xz compress that coredump and upload it however I worry that a coredump will contain security data such as a root password. I need simple but consistent data from you, and I do not need the core dump. I need the exact content from console on the panic, like what you provided before, but for the kernel that you built anew. Then, for the same kernel, I need either source line for the last top frame before trap, or (this would probably easier to describe) a disassembly of random_nehemiah_read(). You do not need to wait for the kernel panic to get the second thing: % gdb kernel.full (gdb) disassemble random_nehemiah_read But again, I need both panic info and disassembly _from then same kernel binary_. Well, the most recent comment and data that I provided was from a panic on the same new kernel that I built in the last 48 hours. esther# uname -apKU FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n250102-d95c0a12a2d: Mon Oct 18 05:58:15 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 i386 1400038 1400038 esther# Why did I bother to build a new kernel? Because there was no way to follow your instructions when there is no such thing as "kernel.full" previously. Also no way to fetch it and then use gdb. Why? There was no way to install gdb. The whole system was so unstable that it did a panic in the middle of "pkg install gdb" and that mess landed me in a situation where the pkg sqlite database held a pid lock record on the process when the panic happened. It has been a ton of fun just getting to this point. This is what I saw on the console when the panic happened in the middle of trying to do "pkg install gdb" : Last login: Mon Oct 18 01:58:17 on ttyu0 Oct 18 18:37:35 esther login[753]: ROOT LOGIN (root) ON ttyu0 FreeBSD 14.0-CURRENT (GENERIC) #0 main-n250102-d95c0a12a2d: Mon Oct 18 05:58:15 GMT 2021 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier To change this login announcement, see motd(5). You have new mail. esther# esther# ls -lap /var/crash total 109816 drwxr-x--- 2 root wheel 512 Oct 18 18:24 ./ drwxr-xr-x 24 root wheel 512 Oct 18 18:23 ../ -rw-r--r-- 1 root wheel 2 Oct 18 18:24 bounds -rw-r--r-- 1 root wheel 84 Oct 18 18:24 core.txt.0 -rw------- 1 root wheel 516 Oct 18 18:24 info.0 lrwxr-xr-x 1 root wheel 6 Oct 18 18:24 info.last -> info.0 -rw-r--r-- 1 root wheel 5 Oct 7 21:44 minfree -rw------- 1 root wheel 121741312 Oct 18 18:24 vmcore.0 lrwxr-xr-x 1 root wheel 8 Oct 18 18:24 vmcore.last -> vmcore.0 esther# esther# cat /var/crash/core.txt.0 Unable to find a kernel debugger. Please install the devel/gdb port or gdb package. esther# esther# pkg update --force Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.pkg: 100% 6 MiB 3.2MB/s 00:02 Processing entries: 100% FreeBSD repository update completed. 30438 packages processed. All repositories are up to date. esther# esther# date -u Mon Oct 18 18:41:42 UTC 2021 esther# pkg audit 0 problem(s) in 0 installed package(s) found. esther# esther# pkg install gdb Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The following 4 package(s) will be affected (of 0 checked): New packages to be INSTALLED: boost-libs: 1.72.0_5 gdb: 11.1 libiconv: 1.16 source-highlight: 3.1.9_1 Number of packages to be installed: 4 The process will require 218 MiB more space. Proceed with this action? [y/N]: y [1/4] Installing boost-libs-1.72.0_5... [1/4] Extracting boost-libs-1.72.0_5: 98%panic: vm_fault_lookup: fault on nofault entry, addr: 0xd2d8000 cpuid = 0 time = 1634582864 KDB: stack backtrace: db_trace_self_wrapper(0,10283000,10283002,d2d7a48,202,...) at db_trace_self_wrapper+0x28/frame 0xd2d79bc vpanic(151e45c,d2d79f8,d2d79f8,d2d7ab0,12de9b2,...) at vpanic+0x124/frame 0xd2d79d8 panic(151e45c,150024a,d2d8000,d2d8000,0,...) at panic+0x14/frame 0xd2d79ec vm_fault(1e4f5ec,d2d8000,2,0,0) at vm_fault+0x1862/frame 0xd2d7ab0 vm_fault_trap(1e4f5ec,d2d8000,2,0,0,0) at vm_fault_trap+0x52/frame 0xd2d7ad8 trap_pfault(d2d8000,0,0) at trap_pfault+0x16a/frame 0xd2d7b24 trap(d2d7bf8,8,28,28,d2d8000,...) at trap+0x2d2/frame 0xd2d7bec calltrap() at 0xffc0319f/frame 0xd2d7bec --- trap 0xc, eip = 0x1404240, esp = 0xd2d7c38, ebp = 0xd2d7c60 --- random_nehemiah_read(b2d5278a,f90b3d82,3e782ecf,9908ee70,a799ef37,...) at random_nehemiah_read+0x60/frame 0xd2d7c60 Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0xb2b9d8d1 fault code = supervisor read data, page not present instruction pointer = 0x20:0x1409ea0 stack pointer = 0x28:0xd2d784c frame pointer = 0x28:0xd2d7894 code segment = base rx0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 5 (rand_harvestq) trap number = 12 panic: page fault cpuid = 0 time = 1634582864 KDB: stack backtrace: db_trace_self_wrapper(d2d780c,10283000,d2d780c,c,0,...) at db_trace_self_wrapper+0x28/frame 0xd2d769c vpanic(1479c1e,d2d76d8,d2d76d8,d2d7700,142f277,...) at vpanic+0x124/frame 0xd2d76b8 panic(1479c1e,150c09f,0,fffff,d2df69b,...) at panic+0x14/frame 0xd2d76cc trap_fatal(d2d0000,7f,1,8,1511eb4,...) at trap_fatal+0x347/frame 0xd2d7700 trap_pfault(b2b9d8d1,0,0) at trap_pfault+0x6f/frame 0xd2d7734 trap(d2d780c,8,28,28,d2d7984,...) at trap+0x2d2/frame 0xd2d7800 calltrap() at 0xffc0319f/frame 0xd2d7800 --- trap 0xc, eip = 0x1409ea0, esp = 0xd2d784c, ebp = 0xd2d7894 --- . . . I will attach the remainder of the 4000+ lines in a txt file. Created attachment 228851 [details]
kernel panic as seen on the serial console
As promised here is the entire console output.
Here is the disassembly : dclarke@esther:~ $ uname -apKU FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n250102-d95c0a12a2d: Mon Oct 18 05:58:15 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 i386 1400038 1400038 dclarke@esther:~ $ dclarke@esther:~ $ dclarke@esther:~ $ ls -lap /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full -rwxr-xr-x 1 root wheel 86441196 Oct 18 05:58 /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full dclarke@esther:~ $ dclarke@esther:~ $ TERM=dumb gdb -q /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full Reading symbols from /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full... (gdb) disassemble random_nehemiah_read Dump of assembler code for function random_nehemiah_read: 0x014041e0 <+0>: push %ebp 0x014041e1 <+1>: mov %esp,%ebp 0x014041e3 <+3>: push %ebx 0x014041e4 <+4>: push %edi 0x014041e5 <+5>: push %esi 0x014041e6 <+6>: and $0xfffffff8,%esp 0x014041e9 <+9>: sub $0x18,%esp 0x014041ec <+12>: mov %fs:0x0,%eax 0x014041f2 <+18>: push $0x0 0x014041f4 <+20>: push 0x1e5bb30 0x014041fa <+26>: mov %eax,0xc(%esp) 0x014041fe <+30>: push %eax 0x014041ff <+31>: call 0x1416e90 <fpu_kern_enter> 0x01404204 <+36>: add $0xc,%esp 0x01404207 <+39>: cmpl $0x0,0xc(%ebp) 0x0140420b <+43>: je 0x1404277 <random_nehemiah_read+151> 0x0140420d <+45>: mov 0x8(%ebp),%esi 0x01404210 <+48>: mov 0xc(%ebp),%ebx 0x01404213 <+51>: jmp 0x1404235 <random_nehemiah_read+85> 0x01404215 <+53>: nop 0x01404216 <+54>: nop 0x01404217 <+55>: nop 0x01404218 <+56>: nop 0x01404219 <+57>: nop 0x0140421a <+58>: nop 0x0140421b <+59>: nop 0x0140421c <+60>: nop 0x0140421d <+61>: nop 0x0140421e <+62>: nop 0x0140421f <+63>: nop 0x01404220 <+64>: push %edi 0x01404221 <+65>: lea 0xc(%esp),%eax 0x01404225 <+69>: push %eax 0x01404226 <+70>: push %esi 0x01404227 <+71>: call 0x142caf8 <memcpy> 0x0140422c <+76>: add $0xc,%esp 0x0140422f <+79>: add %edi,%esi 0x01404231 <+81>: sub %edi,%ebx 0x01404233 <+83>: je 0x1404277 <random_nehemiah_read+151> 0x01404235 <+85>: xor %edx,%edx 0x01404237 <+87>: lea 0x8(%esp),%edi --Type <RET> for more, q to quit, c to continue without paging-- 0x0140423b <+91>: mov $0x0,%edx 0x01404240 <+96>: repz xstore-rng 0x01404244 <+100>: and $0x1f,%eax 0x01404247 <+103>: test %edx,%edx 0x01404249 <+105>: mov $0x0,%ecx 0x0140424e <+110>: cmovne %ecx,%eax 0x01404251 <+113>: mov %ebx,%edi 0x01404253 <+115>: cmp %ebx,%eax 0x01404255 <+117>: jae 0x1404220 <random_nehemiah_read+64> 0x01404257 <+119>: xor %edx,%edx 0x01404259 <+121>: lea 0x8(%esp),%edi 0x0140425d <+125>: mov $0x0,%edx 0x01404262 <+130>: repz xstore-rng 0x01404266 <+134>: mov %eax,%edi 0x01404268 <+136>: and $0x1f,%edi 0x0140426b <+139>: test %edx,%edx 0x0140426d <+141>: mov $0x0,%eax 0x01404272 <+146>: cmovne %eax,%edi 0x01404275 <+149>: jmp 0x1404220 <random_nehemiah_read+64> 0x01404277 <+151>: push 0x1e5bb30 0x0140427d <+157>: push 0x8(%esp) 0x01404281 <+161>: call 0x1417100 <fpu_kern_leave> 0x01404286 <+166>: add $0x8,%esp 0x01404289 <+169>: mov 0xc(%ebp),%eax 0x0140428c <+172>: lea -0xc(%ebp),%esp 0x0140428f <+175>: pop %esi 0x01404290 <+176>: pop %edi 0x01404291 <+177>: pop %ebx 0x01404292 <+178>: pop %ebp 0x01404293 <+179>: ret End of assembler dump. (gdb) list *random_nehemiah_read 0x14041e0 is in random_nehemiah_read (/usr/src/sys/dev/random/nehemiah.c:99). 94 } 95 96 /* It is specifically allowed that buf is a multiple of sizeof(long) */ 97 static u_int 98 random_nehemiah_read(void *buf, u_int c) 99 { 100 uint8_t *b; 101 size_t count, ret; 102 uint64_t tmp; 103 (gdb) 104 fpu_kern_enter(curthread, fpu_ctx_save, FPU_KERN_NORMAL); 105 b = buf; 106 for (count = c; count > 0; count -= ret) { 107 ret = MIN(VIA_RNG_store(&tmp), count); 108 memcpy(b, &tmp, ret); 109 b += ret; 110 } 111 fpu_kern_leave(curthread, fpu_ctx_save); 112 113 return (c); (gdb) 114 } 115 116 static int 117 nehemiah_modevent(module_t mod, int type, void *unused) 118 { 119 int error = 0; 120 121 switch (type) { 122 case MOD_LOAD: 123 if (via_feature_rng & VIA_HAS_RNG) { (gdb) quit dclarke@esther:~ $ Try this please diff --git a/sys/dev/random/nehemiah.c b/sys/dev/random/nehemiah.c index ba0dfb200ba0..3ad18005c935 100644 --- a/sys/dev/random/nehemiah.c +++ b/sys/dev/random/nehemiah.c @@ -68,7 +68,7 @@ VIA_RNG_store(void *buf) #ifdef __GNUCLIKE_ASM __asm __volatile( "movl $0,%%edx\n\t" - "xstore" + ".byte 0x0f, 0xa7, 0xc0" : "=a" (retval), "+d" (rate), "+D" (buf) : : "memory" (In reply to Konstantin Belousov from comment #14) looks very similar to : https://github.com/torvalds/linux/blob/2f111a6fd5b5297b4e92f53798ca086f7c7d33a4/drivers/char/hw_random/via-rng.c#L77 done! System is running fine and I am trying to stress it a bit. We won't really know unless I can stress it and let it be for a day or so but usually the thing has a panic and reset within a few hours. Or sooner! (In reply to Konstantin Belousov from comment #14) The little machine is chugging away on a buildworld and seems to be nice and stable. However it sets a new record for "slow" and that is fine with me. In fact the git clone was hours : esther# pwd /usr/src esther# cd .. esther# rm -rf src esther# /usr/bin/time -p git clone anongit@git.freebsd.org:src.git src Cloning into 'src'... The authenticity of host 'git.freebsd.org (96.47.72.109)' can't be established. ED25519 key fingerprint is SHA256:y1ljKrKMD3lDObRUG3xJ9gXwEIuqnh306tSyFd1tuZE. Matching host key fingerprint found in DNS. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'git.freebsd.org' (ED25519) to the list of known hosts. remote: Enumerating objects: 4015024, done. remote: Counting objects: 100% (379021/379021), done. remote: Compressing objects: 100% (27310/27310), done. remote: Total 4015024 (delta 373279), reused 351711 (delta 351711), pack-reused 3636003 Receiving objects: 100% (4015024/4015024), 1.34 GiB | 692.00 KiB/s, done. Resolving deltas: 100% (3179795/3179795), done. Checking objects: 100% (8388608/8388608), done. Updating files: 100% (87898/87898), done. real 10272.67 user 8911.64 sys 904.85 esther# esther# cat /root/sys_dev_random_nehemiah.patch --- sys/dev/random/nehemiah.c.orig 2021-10-18 02:07:54.279416000 +0000 +++ sys/dev/random/nehemiah.c 2021-10-21 00:28:09.571500000 +0000 @@ -68,7 +68,7 @@ #ifdef __GNUCLIKE_ASM __asm __volatile( "movl $0,%%edx\n\t" - "xstore" + ".byte 0x0f, 0xa7, 0xc0" : "=a" (retval), "+d" (rate), "+D" (buf) : : "memory" esther# I figure the buildworld will run until sometime in November. Still a bit faster than QEMU and RISC-V emulation. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=362c6d8dec6dfbedc5717e45769042279a1dd3df commit 362c6d8dec6dfbedc5717e45769042279a1dd3df Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-20 22:42:05 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-10-22 23:31:16 +0000 nehemiah: manually assemble xstore(-rng) It seems that clang IAS erronously adds repz prefix which should not be there. Cpu would try to store around %ecx bytes of random, while we only expect a word. PR: 259218 Reported and tested by: Dennis Clarke <dclarke@blastwave.org> Sponsored by: The FreeBSD Foundation MFC after: 1 week sys/dev/random/nehemiah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5306ca9a8e2f2b3bfa7d1ebc784dedbd5422fdae commit 5306ca9a8e2f2b3bfa7d1ebc784dedbd5422fdae Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-20 22:42:05 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-10-28 00:35:54 +0000 nehemiah: manually assemble xstore(-rng) PR: 259218 (cherry picked from commit 362c6d8dec6dfbedc5717e45769042279a1dd3df) sys/dev/random/nehemiah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Follow up. The little VIA Eden Esther 7F4K1G2E-LF board is running fine
for a week now. At the very least it is walking briskly. Managed to
perform a buildworld and buildkernel. The buildworld required a bit more
than 7 days and 8 hours :
esther# /usr/bin/time -p /usr/bin/nice -n +18 make buildworld
.
.
.
cc -target i386-unknown-freebsd14.0 --sysroot=/usr/obj/usr/src/i386.i386/tmp -B/usr/obj/usr/src/i386.i386/tmp/usr/bin -O2 -pipe -fno-common -g -gz=zlib -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o shared_shadow_inval_test.full shared_shadow_inval_test.o -lprivateatf-c
objcopy --only-keep-debug shared_shadow_inval_test.full shared_shadow_inval_test.debug
objcopy --strip-debug --add-gnu-debuglink=shared_shadow_inval_test.debug shared_shadow_inval_test.full shared_shadow_inval_test
===> tests/sys/vmm (all)
echo '#! /usr/libexec/atf-sh' > vmm_cred_jail.tmp
cat /usr/src/tests/sys/vmm/vmm_cred_jail.sh >>vmm_cred_jail.tmp
chmod +x vmm_cred_jail.tmp
mv vmm_cred_jail.tmp vmm_cred_jail
===> etc (all)
===> etc/sendmail (all)
rm -f freebsd.cf
m4 -D_CF_DIR_=/usr/src/contrib/sendmail/cf/ -D_NO_MAKEINFO_ /usr/src/contrib/sendmail/cf/m4/cf.m4 /usr/src/etc/sendmail/freebsd.mc > freebsd.cf
chmod 444 freebsd.cf
rm -f freebsd.submit.cf
m4 -D_CF_DIR_=/usr/src/contrib/sendmail/cf/ -D_NO_MAKEINFO_ /usr/src/contrib/sendmail/cf/m4/cf.m4 /usr/src/etc/sendmail/freebsd.submit.mc > freebsd.submit.cf
chmod 444 freebsd.submit.cf
83844.82 real 75910.18 user 5317.98 sys
--------------------------------------------------------------
>>> World build completed on Fri Oct 29 09:14:59 GMT 2021
>>> World built in 634489 seconds, ncpu: 1
--------------------------------------------------------------
real 634499.23
user 599593.08
sys 21475.68
You have new mail.
esther#
At times it seems to get "stuck" while doing installworld and hitting
the SIGINFO ( CTRL - T ) on the console would report :
load: 11.40 cmd: install 14225 [runnable] 2562.09r 0.00u 0.25s 0%
1368k mi_switch+0x1ca critical_exit_preempt+0x5d
__stop_set_sysinit_set+0xe3c01df7 ll+0x7
Then it would seem to gather its wits and resume.
esther# uname -apKU
FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #2 main-n250207-3b5331dd8d4-dirty: Fri Oct 29 16:54:01 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 i386 1400039 1400039
esther#
Seems perfectly stable and slow.
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
As a follow up the machine seems to "freeze" when asked to perform any sort of load. There is no output at the console. The machine does not respond to anything other than a ping. I even tried a SIGINFO on the serial console and nothing happens. The only action I can take is to pull out the power. Further follow up I did try to run some pkg commands on that box and within a few minutes it would freeze up however a SIGINFO to the serial console reveals ever increasing load : Loading kernel... /boot/kernel/kernel text=0xfecb0 text=0xb49980 text=0x5f6920 data=0xb0 data=0x10e08c+0x332244 syms=[0x4+0xed0a0+0x4+0x184b6c] Loading configured modules... /boot/kernel/cryptodev.ko text=0x20a0 text=0x2113 data=0x228+0x8 syms=[0x4+0x8c0+0x4+0xa94] /boot/entropy size=0x1000 /etc/hostid size=0x25 GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb ---<<BOOT>>--- MP Configuration Table version 1.4 found at 0x4f0c00 APIC: Using the MADT enumerator. Copyright (c) 1992-2021 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 14.0-CURRENT #2 main-n250207-3b5331dd8d4-dirty: Fri Oct 29 16:54:01 GMT 2021 root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 FreeBSD clang version 12.0.1 (git@github.com:llvm/llvm-project.git llvmorg-12.0.1-0-gfed41342a82f) WARNING: WITNESS option enabled, expect reduced performance. . . . Setting up harvesting: PURE_NEHEMIAH,[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . Setting hostname: esther. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg /usr/local/lib/perl5/5.32/mach/CORE lo0: link state changed to UP re0: link state changed to UP re0: link state changed to DOWN re0: link state changed to UP Starting Network: lo0 re0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> ether 00:30:18:b0:29:b6 inet 172.16.35.59 netmask 0xffffffc0 broadcast 172.16.35.63 media: Ethernet autoselect (1000baseT <full-duplex,master>) status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> Starting devd. add host 127.0.0.1: gateway lo0 fib 0: route already in table add net default: gateway 172.16.35.1 add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Updating motd:. Clearing /tmp. Creating and/or trimming log files. Updating /var/run/os-release done. Starting syslogd. No core dumps found. Mounting late filesystems:. Security policy loaded: MAC/ntpd (mac_ntpd) Starting ntpd. Configuring vt: blanktime. Performing sanity check on sshd configuration. Starting sshd. Starting sendmail_submit. Starting sendmail_msp_queue. Starting cron. Starting background file system checks in 60 seconds. Sun Nov 7 05:10 FreeBSD/i386 (esther) (ttyu0) login: root Password: Nov 7 05:11:08 esther login[729]: ROOT LOGIN (root) ON ttyu0 Last login: Sun Nov 7 01:52:30 on ttyu0 FreeBSD 14.0-CURRENT (GENERIC) #2 main-n250207-3b5331dd8d4-dirty: Fri Oct 29 16:54:01 GMT 2021 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier To change this login announcement, see motd(5). You have mail. esther# ls log readme.jitterbug readme.pkg readme.src esther# cat log/readme.pkg from Steve Wills pkg upgrade -Ffy pkg upgrade -fy pkg autoremove -y pkg clean -ya esther# esther# esther# pkg upgrade -Ffy Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking for upgrades (69 candidates): 100% Processing candidates (69 candidates): 100% Checking integrity... done (0 conflicting) The following 69 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: boost-libs: 1.72.0_5 -> 1.72.0_6 git: 2.33.0 -> 2.33.1 libnghttp2: 1.45.1 -> 1.46.0 Installed packages to be REINSTALLED: bitmap-1.0.9 ca_root_nss-3.71 curl-7.79.1 expat-2.4.1 fontconfig-2.13.94_1,1 freetype2-2.11.0 gdb-11.1_1 gettext-runtime-0.21 gettext-tools-0.21 gmp-6.2.1 icu-70.1,1 indexinfo-0.3.1 libICE-1.0.10,1 libSM-1.2.3,1 libX11-1.7.2,1 libXau-1.0.9 libXaw-1.0.14,2 libXdmcp-1.1.3 libXext-1.3.4,1 libXft-2.3.3 libXmu-1.1.3,1 libXpm-3.5.13 libXrender-0.9.10_2 libXt-1.2.1,1 libffi-3.3_1 libiconv-1.16 libpthread-stubs-0.4 libssh2-1.9.0_3,3 libtextstyle-0.21 libxcb-1.14_1 mpc-1.2.1 mpdecimal-2.5.1 mpfr-4.1.0_1 p5-Authen-SASL-2.16_1 p5-CGI-4.53 p5-Clone-0.45 p5-Digest-HMAC-1.04 p5-Encode-Locale-1.05 p5-Error-0.17029 p5-GSSAPI-0.28_1 p5-HTML-Parser-3.76_1 p5-HTML-Tagset-3.20_1 p5-HTTP-Date-6.05 p5-HTTP-Message-6.33 p5-IO-HTML-1.004 p5-IO-Socket-INET6-2.72_1 p5-IO-Socket-SSL-2.072 p5-LWP-MediaTypes-6.04 p5-Mozilla-CA-20211001 p5-Net-SSLeay-1.90 p5-Socket6-0.29 p5-TimeDate-2.33,1 p5-URI-5.10 pcre2-10.37 perl5-5.32.1_1 pkg-1.17.3 png-1.6.37_1 python38-3.8.12_1 readline-8.1.1 source-highlight-3.1.9_1 vim-8.2.3458 xauth-1.1 xbitmaps-1.1.2 xlogo-1.0.5 xorgproto-2021.4 xterm-369 Number of packages to be upgraded: 3 Number of packages to be reinstalled: 66 esther# pkg upgrade -fy Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking for upgrades (69 candidates): 100% Processing candidates (69 candidates): 100% Checking integrity... done (0 conflicting) The following 69 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: boost-libs: 1.72.0_5 -> 1.72.0_6 git: 2.33.0 -> 2.33.1 libnghttp2: 1.45.1 -> 1.46.0 Installed packages to be REINSTALLED: bitmap-1.0.9 ca_root_nss-3.71 curl-7.79.1 expat-2.4.1 fontconfig-2.13.94_1,1 freetype2-2.11.0 gdb-11.1_1 gettext-runtime-0.21 gettext-tools-0.21 gmp-6.2.1 icu-70.1,1 indexinfo-0.3.1 libICE-1.0.10,1 libSM-1.2.3,1 libX11-1.7.2,1 libXau-1.0.9 libXaw-1.0.14,2 libXdmcp-1.1.3 libXext-1.3.4,1 libXft-2.3.3 libXmu-1.1.3,1 libXpm-3.5.13 libXrender-0.9.10_2 libXt-1.2.1,1 libffi-3.3_1 libiconv-1.16 libpthread-stubs-0.4 libssh2-1.9.0_3,3 libtextstyle-0.21 libxcb-1.14_1 mpc-1.2.1 mpdecimal-2.5.1 mpfr-4.1.0_1 p5-Authen-SASL-2.16_1 p5-CGI-4.53 p5-Clone-0.45 p5-Digest-HMAC-1.04 p5-Encode-Locale-1.05 p5-Error-0.17029 p5-GSSAPI-0.28_1 p5-HTML-Parser-3.76_1 p5-HTML-Tagset-3.20_1 p5-HTTP-Date-6.05 p5-HTTP-Message-6.33 p5-IO-HTML-1.004 p5-IO-Socket-INET6-2.72_1 p5-IO-Socket-SSL-2.072 p5-LWP-MediaTypes-6.04 p5-Mozilla-CA-20211001 p5-Net-SSLeay-1.90 p5-Socket6-0.29 p5-TimeDate-2.33,1 p5-URI-5.10 pcre2-10.37 perl5-5.32.1_1 pkg-1.17.3 png-1.6.37_1 python38-3.8.12_1 readline-8.1.1 source-highlight-3.1.9_1 vim-8.2.3458 xauth-1.1 xbitmaps-1.1.2 xlogo-1.0.5 xorgproto-2021.4 xterm-369 Number of packages to be upgraded: 3 Number of packages to be reinstalled: 66 [1/69] Reinstalling xorgproto-2021.4... [1/69] Extracting xorgproto-2021.4: 100% [2/69] Reinstalling perl5-5.32.1_1... [2/69] Extracting perl5-5.32.1_1: 100% [3/69] Reinstalling libpthread-stubs-0.4... [3/69] Extracting libpthread-stubs-0.4: 100% [4/69] Reinstalling libXdmcp-1.1.3... [4/69] Extracting libXdmcp-1.1.3: 100% [5/69] Reinstalling libXau-1.0.9... [5/69] Extracting libXau-1.0.9: 100% [6/69] Reinstalling p5-TimeDate-2.33,1... [6/69] Extracting p5-TimeDate-2.33,1: 100% [7/69] Reinstalling libxcb-1.14_1... [7/69] Extracting libxcb-1.14_1: 100% [8/69] Reinstalling libICE-1.0.10,1... [8/69] Extracting libICE-1.0.10,1: 100% [9/69] Reinstalling png-1.6.37_1... [9/69] Extracting png-1.6.37_1: 100% [10/69] Reinstalling p5-URI-5.10... [10/69] Extracting p5-URI-5.10: 100% [11/69] Reinstalling p5-LWP-MediaTypes-6.04... [11/69] Extracting p5-LWP-MediaTypes-6.04: 100% [12/69] Reinstalling p5-IO-HTML-1.004... [12/69] Extracting p5-IO-HTML-1.004: 100% [13/69] Reinstalling p5-HTTP-Date-6.05... [13/69] Extracting p5-HTTP-Date-6.05: 100% [14/69] Reinstalling p5-Encode-Locale-1.05... [14/69] Extracting p5-Encode-Locale-1.05: 100% [15/69] Reinstalling p5-Clone-0.45... [15/69] Extracting p5-Clone-0.45: 100% [16/69] Reinstalling libX11-1.7.2,1... [16/69] Extracting libX11-1.7.2,1: 100% [17/69] Reinstalling libSM-1.2.3,1... [17/69] Extracting libSM-1.2.3,1: 100% [18/69] Reinstalling indexinfo-0.3.1... [18/69] Extracting indexinfo-0.3.1: 100% [19/69] Reinstalling p5-Socket6-0.29... [19/69] Extracting p5-Socket6-0.29: 100% [20/69] Reinstalling p5-HTTP-Message-6.33... [20/69] Extracting p5-HTTP-Message-6.33: 100% [21/69] Reinstalling p5-HTML-Tagset-3.20_1... [21/69] Extracting p5-HTML-Tagset-3.20_1: 100% [22/69] Reinstalling libXt-1.2.1,1... [22/69] Extracting libXt-1.2.1,1: 100% [23/69] Reinstalling libXext-1.3.4,1... [23/69] Extracting libXext-1.3.4,1: 100% [24/69] Reinstalling icu-70.1,1... [24/69] Extracting icu-70.1,1: 100% [25/69] Reinstalling gettext-runtime-0.21... [25/69] Extracting gettext-runtime-0.21: 100% [26/69] Reinstalling freetype2-2.11.0... [26/69] Extracting freetype2-2.11.0: 100% [27/69] Reinstalling expat-2.4.1... [27/69] Extracting expat-2.4.1: 100% [28/69] Reinstalling readline-8.1.1... [28/69] Extracting readline-8.1.1: 100% [29/69] Reinstalling p5-Net-SSLeay-1.90... [29/69] Extracting p5-Net-SSLeay-1.90: 100% [30/69] Reinstalling p5-Mozilla-CA-20211001... [30/69] Extracting p5-Mozilla-CA-20211001: 100% [31/69] Reinstalling p5-IO-Socket-INET6-2.72_1... [31/69] Extracting p5-IO-Socket-INET6-2.72_1: 100% [32/69] Reinstalling p5-HTML-Parser-3.76_1... [32/69] Extracting p5-HTML-Parser-3.76_1: 100% [33/69] Reinstalling p5-GSSAPI-0.28_1... [33/69] Extracting p5-GSSAPI-0.28_1: 100% [34/69] Reinstalling p5-Digest-HMAC-1.04... [34/69] Extracting p5-Digest-HMAC-1.04: 100% [35/69] Reinstalling mpdecimal-2.5.1... [35/69] Extracting mpdecimal-2.5.1: 100% [36/69] Reinstalling libssh2-1.9.0_3,3... [36/69] Extracting libssh2-1.9.0_3,3: 100% [37/69] Upgrading libnghttp2 from 1.45.1 to 1.46.0... [37/69] Extracting libnghttp2-1.46.0: 100% [38/69] Reinstalling libffi-3.3_1... [38/69] Extracting libffi-3.3_1: 100% [39/69] Reinstalling libXrender-0.9.10_2... [39/69] Extracting libXrender-0.9.10_2: 100% [40/69] Reinstalling libXpm-3.5.13... [40/69] Extracting libXpm-3.5.13: 100% [41/69] Reinstalling libXmu-1.1.3,1... [41/69] Extracting libXmu-1.1.3,1: 100% [42/69] Reinstalling gmp-6.2.1... [42/69] Extracting gmp-6.2.1: 100% [43/69] Reinstalling fontconfig-2.13.94_1,1... [43/69] Extracting fontconfig-2.13.94_1,1: 100% Running fc-cache to build fontconfig cache... Font directories: /usr/local/share/fonts /usr/local/lib/X11/fonts /usr/local/share/fonts: skipping, no such directory /usr/local/lib/X11/fonts: skipping, no such directory /var/db/fontconfig: cleaning cache directory fc-cache: succeeded [44/69] Reinstalling ca_root_nss-3.71... [44/69] Extracting ca_root_nss-3.71: 100% [45/69] Upgrading boost-libs from 1.72.0_5 to 1.72.0_6... [45/69] Extracting boost-libs-1.72.0_6: 75% load: 10.29 cmd: pkg 747 [runnable] 1253.05r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d load: 12.13 cmd: pkg 747 [runnable] 1820.46r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d load: 12.29 cmd: pkg 747 [runnable] 2746.55r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d load: 12.30 cmd: pkg 747 [runnable] 9713.15r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d load: 12.30 cmd: pkg 747 [runnable] 45533.10r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d load: 12.41 cmd: pkg 747 [runnable] 46715.76r 124.04u 131.78s 0% 275308k mi_switch+0x1ca critical_exit_preempt+0x5d uma_zfree_arg+0x44f bucket_free+0x6a cache_alloc+0x45a cache_alloc_retry+0x18 uma_zalloc_arg+0x159 vm_page_alloc_noobj_domain+0x97 vm_page_alloc_noobj+0x3b allocbuf+0x6c7 geteblk+0x78 softdep_process_journal+0x1e8 jwait+0xac softdep_update_inodeblock+0x18f ffs_update+0x291 ffs_truncate+0x541 ufs_setattr+0x674 VOP_SETATTR_APV+0x2d At this point I have to pull power as the system will never recover. Can we close this as "fixed" in the compiler? (In reply to Dennis Clarke from comment #21) I suspect that this hang is fixed by https://cgit.freebsd.org/src/commit/?id=d7acbe481d17ccb81c2b879b9731c83b018f3094 based on the fact that the dmesg indicates the kernel is in the affected range of revisions, and based on the kernel stacks printed by the SIGINFO handler. A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b2e306164faa10ab0be957378a5344f45f7288de commit b2e306164faa10ab0be957378a5344f45f7288de Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-20 22:42:05 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-12-09 00:31:53 +0000 nehemiah: manually assemble xstore(-rng) PR: 259218 (cherry picked from commit 362c6d8dec6dfbedc5717e45769042279a1dd3df) sys/dev/random/nehemiah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) |