Re: Relinking to create unique kernel... failed!
Thanks for the tips. I opened up the case and checked the cables, nothing obviously damaged or poorly connected, but certainly dusty in there. I reseated the cables and rebooted into single-user mode. fsck -f on each partition didn't reveal any issues, but after rebooting again the ahci0 errors went away. However, the reorder_kernel error remained. BUT your pointers got me to think "maybe the files in /usr/share/relink/kernel/GENERIC.MP/ are corrupt and overwriting them might fix things." I didn't know the best way to go about doing that, so I forced an OS "update" via bsd.rd and what do you know, things seem to be running smoothly again, relinking/reodering and everything. I may have a failing harddrive, but for now this immediate problem seems to be resolved. Thanks! -Nick On Fri, Jan 13, 2023 at 2:00 PM Crystal Kolipe wrote: > > On Fri, Jan 13, 2023 at 11:45:31AM -0800, Philip Guenther wrote: > > On Fri, Jan 13, 2023 at 10:59 AM Nick Templeton > > wrote: > > > > > Ever since upgrading my machine to 7.2 I've been unable to relink my > > > kernel, anybody have any idea why? > > > > ... > > > > > Running "/usr/libexec//reorder_kernel" manually resulted in a kernel > > > panic: > > > > > > mode = 0100600, inum = 7, fs = /tmp > > > panic: ffs_valloc: dup alloc > > > Stopped at db_enter+0x10: popq %rbp > > > > > > > You have at least one filesystem with latent corruption. You should reboot > > in single-user mode and run fsck with the -f option on each partition. > > But it would be wise to check the hardware first, because he also mentions: > > > Rebooting the machine results in this at the login prompt: > > > > login: ahci0: attempting to idle device > > ahci0: couldn't recover NCQ error, failing all outstanding commands. > > ahci0: attempting to idle device > > ahci0: couldn't recover NCQ error, failing all outstanding commands. > > This could be caused by a faulty sata cable, dirty connector, or something > more serious. > > Probably not a great idea to get half way through an fsck and have the drive > start failing commands.
Re: Relinking to create unique kernel... failed!
On Fri, Jan 13, 2023 at 11:45:31AM -0800, Philip Guenther wrote: > On Fri, Jan 13, 2023 at 10:59 AM Nick Templeton > wrote: > > > Ever since upgrading my machine to 7.2 I've been unable to relink my > > kernel, anybody have any idea why? > > ... > > > Running "/usr/libexec//reorder_kernel" manually resulted in a kernel panic: > > > > mode = 0100600, inum = 7, fs = /tmp > > panic: ffs_valloc: dup alloc > > Stopped at db_enter+0x10: popq %rbp > > > > You have at least one filesystem with latent corruption. You should reboot > in single-user mode and run fsck with the -f option on each partition. But it would be wise to check the hardware first, because he also mentions: > Rebooting the machine results in this at the login prompt: > > login: ahci0: attempting to idle device > ahci0: couldn't recover NCQ error, failing all outstanding commands. > ahci0: attempting to idle device > ahci0: couldn't recover NCQ error, failing all outstanding commands. This could be caused by a faulty sata cable, dirty connector, or something more serious. Probably not a great idea to get half way through an fsck and have the drive start failing commands.
Re: Relinking to create unique kernel... failed!
On Fri, Jan 13, 2023 at 10:59 AM Nick Templeton wrote: > Ever since upgrading my machine to 7.2 I've been unable to relink my > kernel, anybody have any idea why? ... > Running "/usr/libexec//reorder_kernel" manually resulted in a kernel panic: > > mode = 0100600, inum = 7, fs = /tmp > panic: ffs_valloc: dup alloc > Stopped at db_enter+0x10: popq %rbp > You have at least one filesystem with latent corruption. You should reboot in single-user mode and run fsck with the -f option on each partition. Philip Guenther
Relinking to create unique kernel... failed!
Ever since upgrading my machine to 7.2 I've been unable to relink my kernel, anybody have any idea why? I was reminded of this when I attempted to apply the latest errata today: $ doas syspatch Get/Verify syspatch72-009_xserver... 100% |*| 4384 KB00:01 Installing patch 009_xserver Get/Verify syspatch72-010_vmd.tgz 100% || 2338 00:00 Installing patch 010_vmd Get/Verify syspatch72-011_gpuinv.tgz 100% |*| 197 KB00:00 Installing patch 011_gpuinv Get/Verify syspatch72-012_acme.tgz 100% |***| 40197 00:00 Installing patch 012_acme Get/Verify syspatch72-013_tcp.tgz 100% || 508 KB00:00 Installing patch 013_tcp Relinking to create unique kernel... failed! !!! "/usr/libexec/reorder_kernel" must be run manually to install the new kernel Running "/usr/libexec//reorder_kernel" manually resulted in a kernel panic: mode = 0100600, inum = 7, fs = /tmp panic: ffs_valloc: dup alloc Stopped at db_enter+0x10: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 47548 27451 0 0x13 0 4K sh db_enter() at db_enter+0x10 panic (81f1612f) at panic+0xbf ffs_inode_alloc(fd820bedf878,8180, fd81fe987008, 800022e4f528) at ffs_inode_alloc+0x42e ufs_makeinode (8180, fd8200b73130, 800022e4f820,800022e4f850) at ufs_makeinode+0x79 ufs_create(800022e4f5d8) at ufs_create+0x3c VOP CREATE (fd8200b73130,800022e4f820, 800022e4f850, 800022e4f630) at VOP_CREATE+0x3f vn_open(800022e4f7f0, a03,180) at vn_open+0x162 doopenat (800022ba8a88, ff9c, 5d2b50be3b0, a02, 180, 800022e4f9d0) at doo penat+0x1cd syscall(800022e4fa40) at syscall+0x35f Xsyscall at Xsyscall+0x128 end of kernel end trace frame: 0x7f7c9820, count: 5 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{4}> show panic cpu4: ffs_valloc: dup alloc ddb{4}) trace db_enter() at db_enter+0x10 panic (81f1612f) at panic+0xbf| ffs_inode_alloc(fd820bedf878,8180, fd81fe987008, 800022e4f528) at ffs_inode_alloc+0x42e ufs_makeinode (8180, fd8200b73130,800022e4f820,800022e4f850) at ufs_m ake inode+0x79 ufs_create(800022e4f5d8) at ufs_create+0x3c VOP_CREATE(fd8200b73130,800022e4f820,800022e4f850,800022e4f630) at VOP_CREATE+0x3f vn_open(800022e4f7f0, a03,180) at vn_open+0x162 doopenat (800022ba8a88, ff9c, 5d2b50be3b0, a02, 180, 800022e4f9d0) at doo penat+0x1cd syscall(800022e4fa40) at syscall+0x35f Xsyscall at Xsyscall+0x128 end of kernel end trace frame: 0x7f7c9820, count: -10 ddb{4}> mach ddbcpu 0 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(822c7ff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler+0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi +0x23 acpicpu_idle() at acpicpu_idle+0x203 sched_idle(822c7ff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb {0}> mach ddbcpu 1 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(800022509ff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler+0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x203 sched_idle(800022509ff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb{1}> mach ddbcpu 2 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(800022512ff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler+0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_id le+0x203 sched_idle(800022512ff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb{2}> mach ddbcpu 3 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(80002251bff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler+0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x203 sched_idle(80002251bff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb{3}> mach ddbcpu 5 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(80002252dff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler+0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x203 sched_idle(80002252dff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb{5}) mach ddbcpu 6 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(800022536ff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler +0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_id le+0x203 sched_idle(800022536ff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb {6}) mach ddbcpu 7 Stopped at x86_ipi_db+0x12: leave x86_ipi_db(80002253fff0) at x86_ipi_db+0x12 x86_ipi_handler() at x86_ipi_handler +0x80 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x203 sched_idle (80002253fff0) at sched_idle+0x280 end trace frame: 0x0, count: 10 ddb{7}> (ps output from the kernel debugger is not copy/pasting well, but I can provide it if it
Re: Relinking to create unique kernel... failed!
If you self-modify /bsd, the hash will disagree. That deactivates kernel relinking. That is used by developers. re-create the hash > Predrag Punosevac wrote: > > > > # uname -a > > OpenBSD oko.bagdala2.net 6.2 GENERIC.MP#0 amd64 > > > > # syspatch > > Get/Verify syspatch62-002_fktrace... 100% |*| 785 KB00:01 > > > > Installing patch 002_fktrace > > Relinking to create unique kernel... failed! > > > > > > Any hints where should I look for the reason relinking is failing? > > > > Predrag > > > > I am onto something > > # pwd > /usr/share/compile/GENERIC.MP > # more relink.log > sha256: /var/db/kernel.SHA256: no properly formatted checksum lines > found > sha256: /bsd does not exist in /var/db/kernel.SHA256 > > The kernel I am currently using was copied from the other machine when > the desktop was trashed due to pmap_flash_cache problem on Apollo Lake > > https://www.mail-archive.com/misc@openbsd.org/msg157274.html > > Cheers, > Predrag >
Re: Relinking to create unique kernel... failed!
Predrag Punosevac wrote: > > # uname -a > OpenBSD oko.bagdala2.net 6.2 GENERIC.MP#0 amd64 > > # syspatch > Get/Verify syspatch62-002_fktrace... 100% |*| 785 KB00:01 > > Installing patch 002_fktrace > Relinking to create unique kernel... failed! > > > Any hints where should I look for the reason relinking is failing? > > Predrag > I am onto something # pwd /usr/share/compile/GENERIC.MP # more relink.log sha256: /var/db/kernel.SHA256: no properly formatted checksum lines found sha256: /bsd does not exist in /var/db/kernel.SHA256 The kernel I am currently using was copied from the other machine when the desktop was trashed due to pmap_flash_cache problem on Apollo Lake https://www.mail-archive.com/misc@openbsd.org/msg157274.html Cheers, Predrag
Relinking to create unique kernel... failed!
# uname -a OpenBSD oko.bagdala2.net 6.2 GENERIC.MP#0 amd64 # syspatch Get/Verify syspatch62-002_fktrace... 100% |*| 785 KB00:01 Installing patch 002_fktrace Relinking to create unique kernel... failed! Any hints where should I look for the reason relinking is failing? Predrag