Re: sometimes graphics is slow, with high Xorg CPU usage

2021-03-09 Thread Stuart Henderson
On 2021-03-09, Aaron Miller  wrote:
> For some time now, my -CURRENT system will occasionally get into a
> state where graphics is slow to refresh and the Xorg uses ~50% of
> CPU. I notice this in Firefox or GVim when repeatedly pressing
> PgDn on a long site/file, and in Evolution (emails are slow to
> load, and text input is laggy when composing a message).
>
> OpenBSD 6.9-beta (GENERIC.MP) #366: Sun Feb 28 07:15:39 MST 2021

Update your snapshot and see how it goes.



Re: 6.8 with gnome boots to xterm after upgrade

2021-03-09 Thread Sivan !
Thank you. Please see inline:

On Tue, 9 Mar 2021 at 13:03, Stuart Henderson  wrote:
>
> On 2021-03-08, Sivan !  wrote:
> > Thank you.  One unresolved issue. While running fetch, there was an
> > error pop up that said /usr directory is out of space, though an
> > entire 250 GB nvme is for OpenBSD, almost with no user files, except
> > for the ports tree that was being downloaded b the fetch command.
> > When installing OpenBSD in a 250 GB nvme, I chose GPT and let the
> > installer decide on partitions. But something went wrong.
>
> The disk is split into partitions. Run df -h to see what's free.

This is what I see:

bash-5.0$ df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/sd2a  986M128M809M14%/
/dev/sd2l  168G5.2G155G 3%/home
/dev/sd2d  3.9G324M3.4G 9%/tmp
/dev/sd2f  5.8G5.1G432M92%/usr
/dev/sd2g  986M239M697M26%/usr/X11R6
/dev/sd2h 19.4G4.9G   13.5G26%/usr/local
/dev/sd2k  5.8G116M5.4G 2%/usr/obj
/dev/sd2j  1.9G2.0K1.8G 0%/usr/src
/dev/sd2e 15.3G   36.5M   14.5G 0%/var


>
> To convert "marketing capacity" for a drive (given in "decimal GB") into
> usable capacity in binary GB (some people call this GiB), use this
> calculation:
>
> (97696368+(1953504*(capacity-50)))/2048
>
> (The formula is from IDEMA LBA1-03 plus a conversion from 512-byte LBA
> blocks to GB)
>
> So for 250GB
>
> (97696368+(1953504*(250-50)))/2048 = 238475.1796875

Thank you. The issue is that in the bios I see two entries, the entry
that is listed as
"Samsung SSD 970 EVO Plus 250 GB (238476 MB)" is sometimes
automatically selected to boot, the boot process halts with a one line
"No active partition error. Then I have to get into bios to choose the line
that says "line No 1:  UEFI OS (samsung SSD EVO 970 Plus 250 GB)" This
is why I raised the 30 blocks / GB-MB issue.

>
> Then there's a little extra used for filesystem structures.
>
>
> > It started with the warning:  Not all of the space available to
> > /dev/nvme0n1 appears to be used, you can fix the GPT to use all the
> > space (an extra 30 blocks) or
> > continue with the current setting?
>
> 30 blocks is nothing. Leave this alone.

Yes, I will leave the 30 blocks alone.
>
> > Does this imply that the 232.89 GiB is OpenBSD area, but somehow with
> > "no active partition" which is perhaps the reason why there was an
> > error message during fetch that said /usr directory is low on disk
> > space ?
>
> You filled the partition holding /usr when you ran "make" in
> /usr/ports/x11/gnome. Remove the build files with "rm -r /usr/ports/pobj"
> (or remove /usr/ports completely if you don't need it).

Before removing I looked for "pobj" under /usr/ports but did not find it:

bash-5.0$ cd /usr/ports/
bash-5.0$ ls
CVS cad games   mathprint
Makefilechinese geo metaproductivity
README  comms   graphicsmiscsecurity
archivers   converters  infrastructure  multimedia  shells
astro   databases   inputmethodsnet sysutils
audio   devel   japanesenewstelephony
benchmarks  editors javaplan9   tests
biology education   korean  plist   textproc
books   emulators   langports.pub   www
bulkfonts   mailports.sec   x11

Is there a way of expanding the space in the /usr directory?

>
> The default auto-partitioning sizes do not give enough space to place
> ports under /usr and build anything other than the smallest ports.
>
>



Re: vmm/vmd disk issue

2021-03-09 Thread Mike Larkin
On Tue, Mar 09, 2021 at 11:20:30PM +0100, Jan Johansson wrote:
> Mike Larkin  wrote:
> > On Tue, Mar 09, 2021 at 09:38:57AM -0500, Ian Darwin wrote:
> > > On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
> > > > If I try to cp or dd the disk image on the host it fails
> > > >
> > > > dd if=disk.raw.old of=disk.raw.bak bs=1m
> > > > dd: disk.raw.old: Input/output error
> > > > 8858+0 records in
> > > > 8858+0 records out
> > > > 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
> > > >
> > > > The host show no other signs of failing hardware.
> > > >
> > > > Is this a software or a hardware error?
> > >
> > > Given that it gives an error outside the VM, it's likely hardware.
> > >
> >
> > Agreed. Sorta hard to fault vmd(8) if it's not even running.
>
> Since these are sparse files, could the vioblk(4) somehow write
> incorrect data that later will make it unreadable such as a
> pointer pointing into nothingness?
>

no

> The messages
>
> vmd[39543]: vioblk write error: Input/output error
> vmd[39543]: wr vioblk: disk write error
>
> was produced and 01:30 when all the 4 guests and the host all run
> the daily script (which makes backup and other maintenance tasks)
> if that could have any impact.
>
> Should there not be anything on the host logging errors to
> dmesg/syslog such as sd(4) or ahci(4)?
>
> (If it is not obvious my understanding of how the virtio/vioblk
> stuff hooks in to the disk stack is very limited)
>
> This drive was installed in august 2020 and if I recall correctly
> it was because of this issue. So I am thinkig cable or
> motherboard.
>
> If I decide to replace would it make sense to make this a
> softraid mirror (RAID1) to avoid or get better indication of this
> kind of problems in the future or would only add more parts that
> can break?
>
> I'am currently trying to provoke the drive from the host with
>
> dd if=/dev/random of=test.raw bs=1m count=17000
>
> then cp/dd and cmp to see if I can make it break for real.
>



Re: vmm/vmd disk issue

2021-03-09 Thread Dave Voutila


Jan Johansson writes:

> Mike Larkin  wrote:
>> On Tue, Mar 09, 2021 at 09:38:57AM -0500, Ian Darwin wrote:
>> > On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
>> > > If I try to cp or dd the disk image on the host it fails
>> > >
>> > > dd if=disk.raw.old of=disk.raw.bak bs=1m
>> > > dd: disk.raw.old: Input/output error
>> > > 8858+0 records in
>> > > 8858+0 records out
>> > > 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
>> > >
>> > > The host show no other signs of failing hardware.
>> > >
>> > > Is this a software or a hardware error?
>> >
>> > Given that it gives an error outside the VM, it's likely hardware.
>> >
>>
>> Agreed. Sorta hard to fault vmd(8) if it's not even running.
>
> Since these are sparse files, could the vioblk(4) somehow write
> incorrect data that later will make it unreadable such as a
> pointer pointing into nothingness?
>
> The messages
>
> vmd[39543]: vioblk write error: Input/output error
> vmd[39543]: wr vioblk: disk write error
>
> was produced and 01:30 when all the 4 guests and the host all run
> the daily script (which makes backup and other maintenance tasks)
> if that could have any impact.
>
> Should there not be anything on the host logging errors to
> dmesg/syslog such as sd(4) or ahci(4)?
>
> (If it is not obvious my understanding of how the virtio/vioblk
> stuff hooks in to the disk stack is very limited)
>

vmd(8) reads/writes to the disk image files (both raw and qcow2) using
pread(2)/pwrite(2) calls. The qcow2 handling is a bit more complex, but
they're still just calling pread/pwrite as far as I'm aware.

Have you run fsck(8) on your host?

> This drive was installed in august 2020 and if I recall correctly
> it was because of this issue. So I am thinkig cable or
> motherboard.
>
> If I decide to replace would it make sense to make this a
> softraid mirror (RAID1) to avoid or get better indication of this
> kind of problems in the future or would only add more parts that
> can break?
>
> I'am currently trying to provoke the drive from the host with
>
> dd if=/dev/random of=test.raw bs=1m count=17000
>
> then cp/dd and cmp to see if I can make it break for real.

I'd say maybe make sure you have backups of anything important first if
you're purposely going to break things. :-)

--
-Dave Voutila



Re: vmm/vmd disk issue

2021-03-09 Thread Dirk Coetzee
It maybe possible that disk IO is saturated. (i.e. more writes than the 
physical disk could handle).

-Original Message-
From: owner-m...@openbsd.org  On Behalf Of Jan Johansson
Sent: Wednesday, 10 March 2021 6:21 AM
To: misc@openbsd.org
Cc: Mike Larkin ; Ian Darwin 
Subject: Re: vmm/vmd disk issue

Mike Larkin  wrote:
> On Tue, Mar 09, 2021 at 09:38:57AM -0500, Ian Darwin wrote:
> > On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
> > > If I try to cp or dd the disk image on the host it fails
> > >
> > > dd if=disk.raw.old of=disk.raw.bak bs=1m
> > > dd: disk.raw.old: Input/output error
> > > 8858+0 records in
> > > 8858+0 records out
> > > 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
> > >
> > > The host show no other signs of failing hardware.
> > >
> > > Is this a software or a hardware error?
> >
> > Given that it gives an error outside the VM, it's likely hardware.
> >
>
> Agreed. Sorta hard to fault vmd(8) if it's not even running.

Since these are sparse files, could the vioblk(4) somehow write incorrect data 
that later will make it unreadable such as a pointer pointing into nothingness?

The messages

vmd[39543]: vioblk write error: Input/output error
vmd[39543]: wr vioblk: disk write error

was produced and 01:30 when all the 4 guests and the host all run the daily 
script (which makes backup and other maintenance tasks) if that could have any 
impact.

Should there not be anything on the host logging errors to dmesg/syslog such as 
sd(4) or ahci(4)?

(If it is not obvious my understanding of how the virtio/vioblk stuff hooks in 
to the disk stack is very limited)

This drive was installed in august 2020 and if I recall correctly it was 
because of this issue. So I am thinkig cable or motherboard.

If I decide to replace would it make sense to make this a softraid mirror 
(RAID1) to avoid or get better indication of this kind of problems in the 
future or would only add more parts that can break?

I'am currently trying to provoke the drive from the host with

dd if=/dev/random of=test.raw bs=1m count=17000

then cp/dd and cmp to see if I can make it break for real.


Classified as Confidential



Additional Chunks on RAID

2021-03-09 Thread Duncan Patton a Campbell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Howdy all?  

Does anyone know how to rebuild a raid1 with additional chunks?  
... that is without losing the "degraded" volume?  

Thanks,

Dhu

- -- 
Je suis Canadien. Ce n'est pas Francais ou Anglaise.  
 C'est une esp`ece de sauvage: ne obliviscaris, vix ea nostra voco;-) 
-BEGIN PGP SIGNATURE-

iQIcBAEBAgAGBQJgSAacAAoJEI6Vun3D6YUPvl4P/RI9Edah1EDCf0imzozkkLlR
g3vXuJkjCEokzc35ZgjjGs12gQM6A7n+D2BQP2BdcEIteM2yH2aAViwJ1Qblsu57
coXjg89uJPF7MRwj83W4qZdWEaK5IeeHyCVL8GZbGHOVRWM6CJ+4JBENfJ663mzq
v/9F0e1iknLBgIjGvlkTs5NUvwHbamQchEYE16Hakechy6Wq5/nRrl7TdhFqcfgj
XyBwqE1PiqJC4VhdiQDZni7HE01SWuDPFHaWluicucURBg/4TJJjsqrUnXdTcQRy
e6k0hSlz+187GX355yIe4Nv1utppG2qvXM+bvL1j/0DJeHBOTuU12upY9Xhp0XJz
p7bZkKc3oDa59UeswTcfFZMyR3JmjRL+F3EZiMDPg4N/WIwkHna8nYW0yeVh9pew
lpzUn/bMFCjiNTYML7dnfs7uejTKDjl3CkpPxD7JGKiPQGFVMgQ1EW4SZOkTXZaZ
6ejHl20Jzt35aeQW38lXKWcz2ekgdGiXotvxOVcBLHIbskG48+YZrByCaFGO3cTn
1FKDW+EvdHpbvjSZbzoUNprtjm/NcCVl7vNTn0R7or2SCSYoAuEt0iz0kGaMOduU
mUyYO7Vb1E42IzwGuDazunodA77ihF04tuDfEHHBY07wD8hMa6566xvmNMekfXCP
GYMLJYRoEI7MT4vANSKk
=cn4S
-END PGP SIGNATURE-



Re: vmm/vmd disk issue

2021-03-09 Thread Jan Johansson
Mike Larkin  wrote:
> On Tue, Mar 09, 2021 at 09:38:57AM -0500, Ian Darwin wrote:
> > On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
> > > If I try to cp or dd the disk image on the host it fails
> > >
> > > dd if=disk.raw.old of=disk.raw.bak bs=1m
> > > dd: disk.raw.old: Input/output error
> > > 8858+0 records in
> > > 8858+0 records out
> > > 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
> > >
> > > The host show no other signs of failing hardware.
> > >
> > > Is this a software or a hardware error?
> >
> > Given that it gives an error outside the VM, it's likely hardware.
> >
> 
> Agreed. Sorta hard to fault vmd(8) if it's not even running.

Since these are sparse files, could the vioblk(4) somehow write
incorrect data that later will make it unreadable such as a
pointer pointing into nothingness?

The messages

vmd[39543]: vioblk write error: Input/output error
vmd[39543]: wr vioblk: disk write error

was produced and 01:30 when all the 4 guests and the host all run
the daily script (which makes backup and other maintenance tasks)
if that could have any impact.

Should there not be anything on the host logging errors to
dmesg/syslog such as sd(4) or ahci(4)?

(If it is not obvious my understanding of how the virtio/vioblk
stuff hooks in to the disk stack is very limited)

This drive was installed in august 2020 and if I recall correctly
it was because of this issue. So I am thinkig cable or
motherboard.

If I decide to replace would it make sense to make this a
softraid mirror (RAID1) to avoid or get better indication of this
kind of problems in the future or would only add more parts that
can break?

I'am currently trying to provoke the drive from the host with

dd if=/dev/random of=test.raw bs=1m count=17000

then cp/dd and cmp to see if I can make it break for real.



Re: vmm/vmd disk issue

2021-03-09 Thread Mike Larkin
On Tue, Mar 09, 2021 at 09:38:57AM -0500, Ian Darwin wrote:
> On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
> > If I try to cp or dd the disk image on the host it fails
> >
> > dd if=disk.raw.old of=disk.raw.bak bs=1m
> > dd: disk.raw.old: Input/output error
> > 8858+0 records in
> > 8858+0 records out
> > 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
> >
> > The host show no other signs of failing hardware.
> >
> > Is this a software or a hardware error?
>
> Given that it gives an error outside the VM, it's likely hardware.
>

Agreed. Sorta hard to fault vmd(8) if it's not even running.

> > Is there some way to recover the guest disk image without a
> > complete reinstall?
>
> Depending on where the error is, you might get away with
> dd'ing with conv=noerror,sync, changing vm.conf to point
> to the new copy, and run fsck in the vm.
>
> And buy a new hard disk or SDD. Probably cheaper than your time
> to further diagnose it?
>



sometimes graphics is slow, with high Xorg CPU usage

2021-03-09 Thread Aaron Miller
Hi all,

For some time now, my -CURRENT system will occasionally get into a
state where graphics is slow to refresh and the Xorg uses ~50% of
CPU. I notice this in Firefox or GVim when repeatedly pressing
PgDn on a long site/file, and in Evolution (emails are slow to
load, and text input is laggy when composing a message).

Rebooting often fixes it temporarily. I suspect that it happens
after suspending, but I'm not entirely sure of that.

Any idea what is going on, or how I can fix it?

Below is the dmesg and Xorg logs.

Thanks,
Aaron Miller

> dmesg <==
OpenBSD 6.9-beta (GENERIC.MP) #366: Sun Feb 28 07:15:39 MST 2021
   
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.
MP
real mem = 16827916288 (16048MB)
avail mem = 16302538752 (15547MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xccbfd000 (65 entries)
bios0: vendor LENOVO version "N14ET37W (1.15 )" date 09/06/2016
bios0: LENOVO 20BSCTO1WW
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC ASF! HPET ECDT APIC MCFG SSDT SSDT
SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI
MSDM BATB FPDT UEFI DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3)
EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 798.29 MHz, 06-3d-
04
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,PCLMUL,D
TES64,MWAIT,DS-
CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE
4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAG
E1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI
1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTR
L,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 798.16 MHz, 06-3d-
04
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,PCLMUL,D
TES64,MWAIT,DS-
CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE
4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAG
E1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI
1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTR
L,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 798.16 MHz, 06-3d-
04
cpu2:
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,PCLMUL,D
TES64,MWAIT,DS-
CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE
4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAG
E1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI
1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTR
L,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 798.16 MHz, 06-3d-
04
cpu3:
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,PCLMUL,D
TES64,MWAIT,DS-
CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE
4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAG
E1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI
1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTR
L,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 3 (EXP1)
acpiprt3 at acpi0: bus 4 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus -1 (EXP6)
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
acpibat0 at acpi0: BAT0 model "45N1707" serial  3244 type LiP oem
"LGC"
acpiac0 at acpi0: AC unit offline
acpithinkpad0 at acpi0: version 1.0
tpm0 at acpi0 TPM_ addr 0xfed4/0x5000, device 0x104a rev
0x4e
"PNP0C14" at acpi0 not configured

Re: npppd(8) and PROXY_AUTHEN_CHALLENGE bad length with Juniper

2021-03-09 Thread Ryan Freeman
Hello,

On Tue, Mar 09, 2021 at 02:41:43PM +0900, YASUOKA Masahiko wrote:
> Hi,
> 
> I looked into the ICCN packets you sent me separately.  Its "Proxy Authen
> Challenge" length is 31 and "Proxy Authen Type" is PPP CHAP.  The
> message seems to comply RFC 2661.
> 
> Also what I said
> >> It's for CHAP or MSCHAPv1.  If MD5 is selected for PPP CHAP, the
> >> challenge length for CHAP is 16 octet.  The challenge for MSCHAPv1 is
> >> also 8 octet, but npppd doesn't support MSCHAv1 anyway.  So 24 must be
> >> enough for RFC 2661.
> 
> is false.  Length of callenge is "independent of the hash algorithm".
> 
> In RFC 1994 (PPP CHAP):
> |  The Challenge Value is a variable stream of octets.  The
> |  importance of the uniqueness of the Challenge Value and its
> |  relationship to the secret is described above.  The Challenge
> |  Value MUST be changed each time a Challenge is sent.  The length
> |  of the Challenge Value depends upon the method used to generate
> |  the octets, and is independent of the hash algorithm used.
> 
> it doesn't state the limit clearly.
> 
> I suppose 24 had been long enough for many implementations, but
> actually new Junipor is using 31-63
> 
> >> > Feb  8 11:42:53 edge9 npppd[86416]: l2tpd ctrl=5477 call=32713 Received 
> >> > bad ICCN: Attribute value is too long PROXY_AUTHEN_CHALLENGE 40 > 24
> >> > Feb  8 11:42:53 edge9 npppd[86416]: l2tpd ctrl=5477 call=32713 SendCDN 
> >> > result=ERROR_CODE/2 error=WRONG_LENGTH/2 messsage=none
> >> > Feb  8 11:42:54 edge9 npppd[86416]: l2tpd ctrl=5477 call=29504 Received 
> >> > bad ICCN: Attribute value is too long PROXY_AUTHEN_CHALLENGE 62 > 24
> >> > Feb  8 11:42:54 edge9 npppd[86416]: l2tpd ctrl=5477 call=29504 SendCDN 
> >> > result=ERROR_CODE/2 error=WRONG_LENGTH/2 messsage=none
> >> > Feb  8 11:43:01 edge9 npppd[86416]: l2tpd ctrl=5477 call=31527 Received 
> >> > bad ICCN: Attribute value is too long PROXY_AUTHEN_CHALLENGE 46 > 24
> >> > Feb  8 11:43:01 edge9 npppd[86416]: l2tpd ctrl=5477 call=31527 SendCDN 
> >> > result=ERROR_CODE/2 error=WRONG_LENGTH/2 messsage=none
> >> > Feb  8 11:43:06 edge9 npppd[86416]: l2tpd ctrl=5477 call=1626 Received 
> >> > bad ICCN: Attribute value is too long PROXY_AUTHEN_CHALLENGE 63 > 24
> >> > Feb  8 11:43:06 edge9 npppd[86416]: l2tpd ctrl=5477 call=1626 SendCDN 
> >> > result=ERROR_CODE/2 error=WRONG_LENGTH/2 messsage=none
> 
> So I suppose changing the following limit will solve the problem.
> 
>   #define MAX_CHALLENGE_LENGTH24
> 
> Also I found a Junipor's document,
> 
>   
> https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/challenge-length-edit-dynamic-profiles-chap.html
> 
> the max challenge length can be configured 63 at the maximum.
> 
> I'm thinking change the limit in npppd to 96.

I've completed testing a build of npppd with MAX_CHALLENGE_LENGTH set to 96:

Index: npppd/ppp.h
===
RCS file: /cvs/src/usr.sbin/npppd/npppd/ppp.h,v
retrieving revision 1.21
diff -u -p -r1.21 ppp.h
--- npppd/ppp.h 12 Aug 2017 11:20:34 -  1.21
+++ npppd/ppp.h 9 Mar 2021 19:17:33 -
@@ -82,7 +82,7 @@
 
 #defineMAX_USERNAME_LENGTH 256
 #defineMAX_PASSWORD_LENGTH 256
-#define MAX_CHALLENGE_LENGTH24
+#define MAX_CHALLENGE_LENGTH96
 
 #define INADDR_IPCP_OBEY_REMOTE_REQ0xL


With this in place, things are still working with our upstream's new
equipment!  This has also cleared up the "Proxy Authen Challenge is too
long" errors from layer=chap, and our sessions consistently establish
cleanly:

Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=lcp dialin-proxy 
user=...@pppoe.example.com auth-type=MD5-CHAP renegotiate=no
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=base logtype=Started 
tunnel=L2TP(1.2.3.4:1701)
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=lcp logtype=Opened 
mru=1460/1460 auth=MD5-CHAP magic=xx55f2ac/xx65f7d0
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=chap proto=chap 
logtype=Success username="...@pppoe.example.com" realm=PGS-DYNAMIC
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=ipcp IP Address peer=0.0.0.0 
our=5.6.7.8.
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=ipcp logtype=Opened 
ip=5.6.7.8 assignType=dynamic
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=base logtype=TUNNELSTART 
user="...@pppoe.example.com" duration=0sec layer2=L2TP 
layer2from=1.2.3.4:1701 auth=MD5-CHAP  ip=5.6.7.8 iface=pppac1 dialin_proxy=yes
Mar  8 23:00:45 edge9 npppd[9258]: ppp id=27 layer=base Using pipex=yes


Thank you again for your help and taking the time to look over the packet
captures.

-Ryan

Ryan Freeman
Senior Systems Administrator
Uniserve Communications
Suite 330 - 333 Terminal Avenue, Vancouver, BC V6A 4C1
Phone: 604.395.3905
Email:  ryan.free...@uniserveteam.com
www.uniserve.com



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread Miko
On Tue, Mar 09, 2021 at 02:45:17PM +0100, Jan Stary wrote:
> On Mar 09 10:36:13, sn03.gene...@gmail.com wrote:
> > On 3/9/21, Jan Stary  wrote:
> > > Why would you want to stop charging before being 100% charged?
> > >
> > 
> > Say you keep the battery plugged in overnight for charging. It charges
> > to 100%, and then stays so for 5 hours till you wake up in the morning.
> > 
> > It might not sound that horrifying right now, but wait till you hear the
> > next part.
> > 
> > According to a research,
> 
> What research?
> 
> > it has been found that, at the extremes of the
> > battery's charge capacity, it stays at _high tension_, causing it to
> > degrade quicker. The nearer the battery's charge is to an extreme, the
> > more tension it is under, and the faster shall it degrade.
> 
> I doubt that.
> Can you please point to the research that proves this?
> 
It primarily comes down to you wasting battery cycles, since chargers usually 
start charging again when the battery is >100% (even if it's just 
99.999%). The more cycles you waste, the faster your battery starts 
degrading.
Gee, I thought this was misc@, not pleasexplainhowbatterieswork@.



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread Henri Järvinen
On Tue, Mar 09, 2021 at 02:45:17PM +0100, Jan Stary wrote:
> On Mar 09 10:36:13, sn03.gene...@gmail.com wrote:
> > On 3/9/21, Jan Stary  wrote:
> > > Why would you want to stop charging before being 100% charged?
> > >
> > 
> > Say you keep the battery plugged in overnight for charging. It charges
> > to 100%, and then stays so for 5 hours till you wake up in the morning.
> > 
> > It might not sound that horrifying right now, but wait till you hear the
> > next part.
> > 
> > According to a research,
> 
> What research?
> 
> > it has been found that, at the extremes of the
> > battery's charge capacity, it stays at _high tension_, causing it to
> > degrade quicker. The nearer the battery's charge is to an extreme, the
> > more tension it is under, and the faster shall it degrade.
> 
> I doubt that.
> Can you please point to the research that proves this?
> 
> 

Not an research but several sources sais a same.
Here is one excample: 
https://www.notebookcheck.net/Lithium-Ion-Batteries-Charging-Guide-for-Maximum-Endurance.214714.0.html

-- 
Henri Järvinen



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread Ottavio Caruso

On 09/03/2021 05:25, Subhaditya Nath wrote:

And the actual work is done by something called the 'natacpi framework',
which is implemented by the linux kernel itself.


Which is what I said in my previous post.

--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread Ottavio Caruso

On 09/03/2021 04:53, s...@skolma.com wrote:

perhaps as your name suguests you may be located in the Indian sub continent, and Mains Power may be intermittent.. 


God, how patronizing is that?




--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



Re: vmm/vmd disk issue

2021-03-09 Thread Ian Darwin
On Tue, Mar 09, 2021 at 09:52:03AM +0100, Jan Johansson wrote:
> If I try to cp or dd the disk image on the host it fails
> 
> dd if=disk.raw.old of=disk.raw.bak bs=1m
> dd: disk.raw.old: Input/output error
> 8858+0 records in
> 8858+0 records out
> 9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)
> 
> The host show no other signs of failing hardware.
> 
> Is this a software or a hardware error?

Given that it gives an error outside the VM, it's likely hardware.
 
> Is there some way to recover the guest disk image without a
> complete reinstall?

Depending on where the error is, you might get away with
dd'ing with conv=noerror,sync, changing vm.conf to point
to the new copy, and run fsck in the vm.

And buy a new hard disk or SDD. Probably cheaper than your time
to further diagnose it?



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread Jan Stary
On Mar 09 10:36:13, sn03.gene...@gmail.com wrote:
> On 3/9/21, Jan Stary  wrote:
> > Why would you want to stop charging before being 100% charged?
> >
> 
> Say you keep the battery plugged in overnight for charging. It charges
> to 100%, and then stays so for 5 hours till you wake up in the morning.
> 
> It might not sound that horrifying right now, but wait till you hear the
> next part.
> 
> According to a research,

What research?

> it has been found that, at the extremes of the
> battery's charge capacity, it stays at _high tension_, causing it to
> degrade quicker. The nearer the battery's charge is to an extreme, the
> more tension it is under, and the faster shall it degrade.

I doubt that.
Can you please point to the research that proves this?



vmm/vmd disk issue

2021-03-09 Thread Jan Johansson
Hello!

A few times I have had problems with my guests freezing (no
console, no ssh) when reading a specific file and only a complete
reinstall seems to solve the problem.

This has happended with both raw and qcow2 disks and on both 6.7
and 6.8. I'm only using OpenBSD for the host and guests.

When the freeze happens the host logs these  messages six times

vmd[24266]: vioblk read error: Input/output error
vmd[24266]: vioblk: block read error, sector 23122496

I also found this a few days back that may be relevant

vmd[39543]: vioblk write error: Input/output error
vmd[39543]: wr vioblk: disk write error

If I try to cp or dd the disk image on the host it fails

dd if=disk.raw.old of=disk.raw.bak bs=1m
dd: disk.raw.old: Input/output error
8858+0 records in
8858+0 records out
9288286208 bytes transferred in 102.048 secs (91018010 bytes/sec)

The host show no other signs of failing hardware.

Is this a software or a hardware error?

Is there some way to recover the guest disk image without a
complete reinstall?

Thank you in advance,
Jan J



Re: How to set ThinkPad battery charge thresholds?

2021-03-09 Thread sub



‐‐‐ Original Message ‐‐‐
On Tuesday, March 9, 2021 7:30 AM, Ottavio Caruso 
 wrote:

> On 08/03/2021 17:35, Jean-Pierre de Villiers wrote:
>
> > Refer to sensorsd(8) and acpibat(4). Given those and related manual
> > pages I'm relatively certain you should be able to achieve this.
> > OpenBSD is well-known for its clear and extensive documentation so use
> > this to your advantage. The apropos(1) utility is your best friend :).
> > Your second and third best friends are the FAQ and the mailing list
> > archives.
> > I am working under the assumption that no proprietary blobs are
> > necessary to accomplish your goal. Otherwise, I am afraid you are out
> > of luck as OpenBSD does not and never will contain any such blobs.
> > They are "black boxes" and thus cannot be trusted.
> > Regards,
> > JP
> > On 21/03/08 07:05pm, Subhaditya Nath wrote:
> >
> > > I have a Thinkpad E495 that has Battery Charge threshold support. i.e.
> > > it can be set such that the battery starts charging at a specified
> > > amount of charge (say, 70%) and automatically stops charging at a
> > > specified charge (say, 80%). This feature is also available on Linux by
> > > using TLP (made by linrunner, his website is linrunner.de)
> > > The problem is, I searched for this option in OpenBSD, but I couldn't
> > > find it.
> > > It is a very crucial functionality for me. So, if somebody can please
> > > tell me where I can set it, I would be very very thankful.
> > > (Pardon my bad english, it's not my first language)
>
> acpibat, as it stands, doesn't and cannot set/manipulate battery charge
> threshold levels.
>
>
>


Hi Subhaditya,
nice to see another AMD ThinkPad #495 user.
I am writing from a T-495. although i have no direct openbsd technical advice 
for you, i thought i would ask about your reason for TLP ? often by 
understanding your requirements, the community may be able to offer alternate 
solutions.
perhaps as your name suguests you may be located in the Indian sub continent, 
and Mains Power may be intermittent.. and your looking to get through a days 
work.. or perhaps you want to maximise your Mobile work sitting in a park ? or 
perhaps you jsut really like 80% battery :)

it's my personal finding that TLP on linux since kernel 5.x does very little.. 
i am using right now Pop_OS! (because of citrix/MS-teams for work), and i get 
about 5-7 hours run time..
with OpenBSD i get about 5-6. (no citrix/MS-teams)
MS-Windows-10 to my chagrin, outperforms both bsd/linux reaching closer to 
10hrs.
so if battery runs times are important to you, you might have the wrong mix :(

-Sub.
 
-
>
> Ottavio Caruso
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?




Re: IPv6 NDP Confusion with PF enabled

2021-03-09 Thread Markus Wernig
On 3/8/21 11:05 PM, Antonino Sidoti wrote:

> There is no blocking showing up when I examine the pflog0, 

I would run tcpdump -n -i em0 icmp6 during /etc/netstart with and
without pf enabled. If you see a difference, that should help you find
out what to allow in your ruleset.

/m



malloc cache changes

2021-03-09 Thread Otto Moerbeek
Hi,

you might be interested in

https://marc.info/?l=openbsd-tech=161527759429295=2

Followup on tech@ please,

-Otto