Re: protection fault in amap_wipeout

2024-04-13 Thread Martin Pieuchot
On 30/03/24(Sat) 18:38, Martin Pieuchot wrote:
> Hello Alexander,
> 
> Thanks for the report.
> 
> On 01/03/24(Fri) 16:39, Alexander Bluhm wrote:
> > Hi,
> > 
> > An OpenBSD 7.4 machine on KVM running postgress and pagedaemon
> > crashed in amap_wipeout().
> > 
> > bluhm
> > 
> > kernel: protection fault trap, code=0
> > Stopped at  amap_wipeout+0x76:  movq%rcx,0x28(%rax)
> 
> The problem is an incorrect call to amap_wipeout() in OOM situation
> inside amap_copy().  At this moment the amap being copied/allocated
> is not in the global list.  That's why you see this incorrect
> dereference which corresponds to:
> 
>   amap_list_remove(amap);
> 
> > ddb{3}> show panic
> > the kernel did not panic
> > 
> > ddb{3}> trace
> > amap_wipeout(fd8015b154d0) at amap_wipeout+0x76
> > uvm_fault_check(8000232d6a20,8000232d6a58,8000232d6a80) at 
> > uvm_faul
> > t_check+0x2ad
> > uvm_fault(fd811d150748,7d42519fb000,0,1) at uvm_fault+0xfb
> > upageflttrap(8000232d6b80,7d42519fb3c0) at upageflttrap+0x65
> > usertrap(8000232d6b80) at usertrap+0x1ee
> > recall_trap() at recall_trap+0x8
> > end of kernel
> > end trace frame: 0x7d42519fb3f0, count: -6
> 
> Diff below should fix it.  I don't know how to test it.
> 
> ok?

Anyone?

> Index: uvm/uvm_amap.c
> ===
> RCS file: /cvs/src/sys/uvm/uvm_amap.c,v
> diff -u -p -r1.92 uvm_amap.c
> --- uvm/uvm_amap.c11 Apr 2023 00:45:09 -  1.92
> +++ uvm/uvm_amap.c30 Mar 2024 17:30:10 -
> @@ -662,9 +658,10 @@ amap_copy(struct vm_map *map, struct vm_
>  
>   chunk = amap_chunk_get(amap, lcv, 1, PR_NOWAIT);
>   if (chunk == NULL) {
> - /* amap_wipeout() releases the lock. */
> - amap->am_ref = 0;
> - amap_wipeout(amap);
> + amap_unlock(srcamap);
> + /* Destroy the new amap. */
> + amap->am_ref--;
> + amap_free(amap);
>   return;
>   }
>  
> 



Issues with the installer

2024-04-13 Thread Walter Alejandro Iglesias
As I did many times, yesterday I installed the latest OpenBSD snapshot
on my old machine.  Legacy BIOS, its hard drive had Linux installed,
ext4 in a msdos mbr.  When the installer got to the disk partitioning
step, instead of wd0 (as it always did in the past), it defaulted to
sd0, in this case the USB stick where the installer was.  Accustomed to
hit ENTER on everything, I accidentally formatted the USB memory. :-)

Is this a for-some-reason new planed behavior in the installer or a bug?

The story didn't end there.  When I realized I had formatted the USB
stick, trusting in that the installer was loaded in the RAM, before
rebooting I selected and formatted the wd0 with the default
partitioning.  After downloading and copying the snapshot image again, I
tried to repeat the installation, but this time, presumably because the
hard drive had not been properly formatted, when the installer finished
booting and before showing the first choice, the machine rebooted.  I
had to boot to a linux live distribution and reformat the disk partition
table, then the installer booted normally and I was finally able to
install OpenBSD.  It seems that the installer is not able to deal with a
corruped disk?



OpenBSD 7.5-current (GENERIC.MP) #23: Thu Apr 11 12:33:45 MDT 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4135260160 (3943MB)
avail mem = 3988922368 (3804MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xeb920 (70 entries)
bios0: vendor Hewlett-Packard version "786E1 v01.16" date 08/17/2011
bios0: Hewlett-Packard HP Compaq dc7700 Convertible Minitower
acpi0 at bios0: ACPI 1.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET
acpi0: wakeup devices PCI0(S4) COM1(S4) PEG1(S4) IGBE(S4) PCX1(S4) PCX2(S4) 
HUB_(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) EUS1(S3) EUS2(S3) PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz, 1795.56 MHz, 06-0f-02, patch 
005d
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 2MB 64b/line 
8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz, 1795.67 MHz, 06-0f-02, patch 
005d
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 2MB 64b/line 
8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xf400, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG1)
acpiprt2 at acpi0: bus 32 (PCX1)
acpiprt3 at acpi0: bus -1 (PCX2)
acpiprt4 at acpi0: bus 7 (HUB_)
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
"PNP0003" at acpi0 not configured
acpibtn0 at acpi0: PBTN(wakeup)
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
cpu0: Enhanced SpeedStep 1795 MHz: speeds: 1800, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82Q965 Host" rev 0x02
inteldrm0 at pci0 dev 2 function 0 "Intel 82Q965 Video" rev 0x02
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0: apic 1 int 16, I965G, gen 4
"Intel 82Q965 HECI" rev 0x02 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel ICH8 IGP AMT" rev 0x02: apic 1 int 19, 
address 00:0f:fe:77:4f:df
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 1 int 21
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 1 int 22
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: apic 1 int 
21
azalia0: codecs: Realtek ALC262
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02
pci1 at ppb0 bus 32
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: apic 1 int 20
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: apic 1 int 

Unable to use latest version ( 7.5) Autoinstall

2024-04-13 Thread markmarques

Hi,

Recently with the latest 7.5 ISO I am unable to "AutoInstall"

Calling the (A)utoinstall opttion in the installer I get :



Could not determine auto server.

Could not determine auto mode .

Response file location ?



Afterwards I get

(I)nstall or (U)pgrade 

Fetching yes

No response file found;  non-interactive mode aborted.

#

-

Although the (I)nstall mode apparently works

Nonethless I was able to upgrade from a previous 7.4 version 

I think the first installation started with 6.9 and since then I was  
able to upgrade without any hassle 


Any comments ?