Re: Recovering from as identical as faulty backup disk..

2023-03-24 Thread Daniele B.
Beyond the reporting problem of the disk in OpenBSD I'm going ahead with my 
analysis.

I'm performing an H3 test and H5 test on the CRC disk (backup #2) by a copy 
machine.

H3 test result is successful. I'm waiting for H5 test result and I am enough 
curious.

It shouldnt be a problem of disk capacity as attaching the same disk around 
three weeks
ago I didnt get the CRC advise.. further than not receiving any destination 
error by the copy
machine.

A CRC error caused by a bit-to-bit copy problem is strange enough.. and the 
source should be fine
as the 3rd backup is intact too.

For honesty I need to say that I hear clearly my first disk time-to-time having 
a mechanical glitch that
reoccurs from an age, like a typo of the typical regenerated drives...
I don't want that this *typo* manifested itself during the last second backup 
causing the CRC..

Let's see what are the H5 results..


-- Daniele Bonini

Mar 24, 2023 17:47:36 Daniele Bonini :

> 
> I checked backup #3 disk and faulty partition is perfectly intact.
> 
> So I came back to the faulty backup #2 disk and reattached it obtaining
> a slight different console output:
> 
> https://5md.at/l/obcons1
> 
> in this sense: I dont only receive the CRC error (on sd1, that it has
> same UID) but this time (after the fss_chk) I see the sd3 device just
> attached correctly too.
> 
> As said above, as the console CRC problem popup just after I inserted
> backup #2 disk I expect there is problem on that disk and there is a
> problem in OpenBSD caused by the same UID of the two disks. This
> statement comes confirmed from the fact that when I inserted backup #3
> disk all apparently was fine.
> 
> 
> -- Daniele Bonini
> 



Re: gdb segfaults setting breakpoint on a Rust test

2023-03-24 Thread Luke A. Call
Thank you!

On 2023-03-24 14:10:50-0600, Todd C. Miller  wrote:
> On Fri, 24 Mar 2023 13:10:08 -0600, "Luke A. Call" wrote:
> 
> > Hi.  When I run this on the binary of a test in my Rust
> > application, then run these commands in gdb, I get the following output
> > which ends with Segmentation Fault:
> 
> The in-tree gdb is old, you should try the egdb package instead.
> 
>  - todd
> 



Re: gdb segfaults setting breakpoint on a Rust test

2023-03-24 Thread Todd C . Miller
On Fri, 24 Mar 2023 13:10:08 -0600, "Luke A. Call" wrote:

> Hi.  When I run this on the binary of a test in my Rust
> application, then run these commands in gdb, I get the following output
> which ends with Segmentation Fault:

The in-tree gdb is old, you should try the egdb package instead.

 - todd



gdb segfaults setting breakpoint on a Rust test

2023-03-24 Thread Luke A. Call
Hi.  When I run this on the binary of a test in my Rust
application, then run these commands in gdb, I get the following output
which ends with Segmentation Fault:


nemodel-ac769fda48f1a333
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "amd64-unknown-openbsd7.2"...
(gdb) start
Breakpoint 1 at 0x30f9e4
Starting program:
/home/lacall/proj/om/core/target/debug/deps/onemodel-ac769fda48f1a333 
Breakpoint 1 at 0xb6d041be9e4
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be
2) [in module /usr/libexec/ld.so]
0x0b6d041be9e4 in main () from
/home/lacall/proj/om/core/target/debug/deps/onemodel-ac769fda48f1a333
(gdb) dir /home/lacall/proj/om/core/src/
Source directories searched: /home/lacall/proj/om/core/src:$cdir:$cwd
(gdb) dir /home/lacall/proj/om/core/src/model
Source directories searched:
/home/lacall/proj/om/core/src/model:/home/lacall/proj/om/core/src:$cdir:$cwd
(gdb) dir /home/lacall/proj/om/core/src/controllers 
Source directories searched:
/home/lacall/proj/om/core/src/controllers:/home/lacall/proj/om/core/src/model:/home/lacall/proj/om/core/src:$cdir:$cwd
(gdb) b util.rs:1057
Segmentation fault
@:~/<...>/target/debug/deps
$

I'm on obsd 7.2 stable and am not a C programmer, unfortunately.

If, prior to setting the breakpoint, I just do the "run" command, it
successfully runs the test to completion (which shows an intentional 
test failure for now).

Luke Call

Here is /var/run/dmesg.boot (dmesg itself is just messages about my
usb mouse attaching/detaching).

uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
wsmouse0 detached
ums0 detached
uhidev0 detached
uhidev0 at uhub0 port 4 configuration 1 interface 0 "Logitech USB Optical 
Mouse" rev 2.00/72.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
wsmouse0 detached
ums0 detached
uhidev0 detached
uhidev0 at uhub0 port 4 configuration 1 interface 0 "Logitech USB Optical 
Mouse" rev 2.00/72.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
syncing disks... done
OpenBSD 7.2 (GENERIC.MP) #7: Sat Feb 25 14:07:58 MST 2023

r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16029159424 (15286MB)
avail mem = 15525961728 (14806MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xebf90 (49 entries)
bios0: vendor American Megatrends Inc. version "204" date 11/20/2014
bios0: ASUSTeK COMPUTER INC. X550ZA
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG MSDM HPET UEFI SSDT SSDT CRAT SSDT 
SSDT SSDT SSDT
acpi0: wakeup devices LOM_(S4) SBAZ(S4) ECIR(S4) OHC1(S4) EHC1(S4) OHC2(S4) 
EHC2(S4) OHC3(S4) EHC3(S4) OHC4(S4) XHC0(S4) XHC1(S4) ODD8(S3) GLAN(S4) 
LID_(S5) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 16 (boot processor)
cpu0: AMD A10-7400P Radeon R6, 10 Compute Cores 4C+6G, 2496.19 MHz, 15-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,ITSC,FSGSBASE,BMI1,XSAVEOPT
cpu0: 16KB 64b/line 4-way D-cache, 96KB 64b/line 3-way I-cache
cpu0: 2MB 64b/line 16-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 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 17 (application processor)
cpu1: AMD A10-7400P Radeon R6, 10 Compute Cores 4C+6G, 2495.35 MHz, 15-30-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,ITSC,FSGSBASE,BMI1,XSAVEOPT
cpu1: 16KB 64b/line 4-way D-cache, 96KB 64b/line 3-way I-cache
cpu1: 2MB 64b/line 16-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 18 (application processor)
cpu2: AMD A10-7400P Radeon R6, 10 Compute Cores 4C+6G, 2495.35 MHz, 15-30-01
cpu2: 

Re: Possible to handle fiber WAN connection with OpenBSD using PCIe card?

2023-03-24 Thread Kaya Saman
Just responding to this for completeness as I have some more information 
on my side


On 3/24/23 07:21, Stuart Henderson wrote:

On 2023-03-23, Kaya Saman  wrote:

Unfortunately I haven't been well for a long time hence the delay in
upgrade and at first found it a little difficult but the way forward
after a bit of reading around was to go to 7.1-release then 7.2 and
finally jump back to Current which I believe is called Beta now? (unless
I missed something or am confusing)

The main release cycle is -current, -beta, , -current - this
hasn't changed. (The "no suffix" includes a few snapshots prior to an
actual finished release, and that's the stage we are at right now).



Ah ok I see, I also understand what has happened in the meantime... no 
problem. I'll see if I really need to upgrade to current again as right 
now Beta seems to be doing everything I need





Unfortunately right now I'm a little panicked because my (new) ISP will
provide me with either a Huwei or Nokia device which seem to be very
basic in functionality and don't seem to support RFC 1483 bridging which
I'm using currently for my VDSL2 connection. I've read the manual for
the Nokia which I was suggested that they "thought" would be able to do
what I want it to do, but it doesn't seem possible.

IIRC you're UK based aren't you? Which ISP?

If the ISP is using Openreach's FTTP you will need to use their ONT
which will act as a bridge, then you use your own or an ISP-provided
router connected over ethernet. Typically it's PPPoE though the backhaul
supports plain ethernet and some ISPs (notably Sky) use it, normally
with DHCP. The ONT is not user-configurable and you have to use it.

Non-Openreach-based vary. If you're lucky you might get pppoe out of the
ONT and be able to connect your own router (likely with at least some of
the ISPs selling CityFibre-based lines). Some others are often much more
locked down - if you're lucky you might get to put their kit in bridge
mode, if not you might be behind a NAT router and can't do anything
about it. (Some don't even let you make changes to even things as simple
as wifi SSID yourself and you need to get them to do it for you).
I haven't seen any that will let you connect to the incoming fibre
directly.


I'm wondering if anyone knows if one can get a PCIe card... possibly
Intel chipset will be best that can take an SFP or SFP+ module to
accommodate what I assume currently is an SC/APC LR connection which I
can feed directly to OpenBSD? - again I'm just basing this according to
the manual as I don't have any fiber experience at all.

You can get various cards that will take SFP/SFP+. You can get GPON SFPs.
But you can't enrol a custom router in the provider's provisioning system
that sets up crypto keys etc (GPON is a shared medium; other subscribers
will get the same light carrying your connection and encryption is used
so they can't see your packets).

As far as your connection is concerned the demarc is pretty much always
the ethernet port on either the provider's ONT or their supplied router.




Just got off a lengthy phone call with Tier2 tech support at G-Net, 
which was a lot of fun!! It's so rare to talk in technical terms with 
someone and have them understand you.



Apparently their take is that everything up to and including 1Gb/s must 
be handled by their own ONT... which is in fact a transparent RFC 1483 
network bridge. The only difference comes for 10Gb/s customers which get 
a dedicated Cisco WAN switch with SFP+ module. I'm not sure if they 
service speeds up to 100Gb/s but I can only imagine high throughput data 
centers (especially those with high bit rate streaming services) will 
need them.



In terms of connection to their network: it is not handled by PPPoE or 
even DHCP. DHCP is used for dynamically allocated customers such as 
those on residential packages only, so no static IP reservation system 
in place. I am told no credentials either



Currently there is a little confusion in how to setup the block of IP 
addresses as I have had to upgrade to a block of 16. Right now my 
connection gets a single IPv4 address through ipcp with the rest of the 
IP addresses being handled in PF through NAT/PAT mappings. I have 
forgotten how it is handled but I am willing to bet that my current ISP 
is forwarding those addresses in static routes??


I am wondering if it will be similar except for the gateway IP address 
which will need to be provisioned on the WAN facing ethernet interface 
along with default 0 dot quaded route, or if I'm going to have to create 
sub interfaces for the rest of the provisioned IP addresses?? I am told 
that out of the 16 addresses I loose 3 - network, broadcast, gateway , 
so I should have 13 addresses to play around with.


I guess I'll have to figure things out on Monday once the installation 
is complete.



You could say right now I'm excited but nervous at the same time :-S


Kaya



Re: Running Bugzilla in httpd - 'Pg' is not a valid choice for $db_driver in localconfig

2023-03-24 Thread Omar Polo
On 2023/03/24 18:06:03 +0800, Werner Boninsegna  wrote:
> Hello,
> 
> fake /dev/random means I created a file with a string of text such as 
> "1234567890". This was a workaround to get the application running.

...

> Your suggestion is to chroot into /var/www and run "MAKEDEV random" ?

If you really must run bugzilla, you'd be way better off by just
running slowcgi outside the chroot. (i.e. slowcgi -p /)

There are various way to do so, from the simplest

% doas rcctl set slowcgi flags -p /

to running a separate slowcgi service with that flag set.

Then, and just for the archive, please don't "fake" /dev/random or
whatever it means!  Sometimes "faking" /dev/null with an empty file
for the chroot is enough (like it is for cvsweb), but otherwise create
a real device.  You can even use a mfs over /var/www/dev to avoid
having to mount /var/www without `nodev'.  (I won't provide a recipe
for it but if you read mount_mfs(8), MAKEDEV(8), mknod(8) and fstab(5)
you should be able to do it.)

Or even better: don't force something that's not designed to be ran in
a chroot into it; it's a battle not worth fighting for.



Re: Running Bugzilla in httpd - 'Pg' is not a valid choice for $db_driver in localconfig

2023-03-24 Thread Werner Boninsegna

Hello,

fake /dev/random means I created a file with a string of text such as 
"1234567890". This was a workaround to get the application running.


Your suggestion is to chroot into /var/www and run "MAKEDEV random" ?

I will give it a try.

Werner

On 3/24/2023 3:27 PM, Stuart Henderson wrote:

On 2023-03-23, Werner Boninsegna  wrote:

Please note that I had to "fake" /dev/random, as I couldn't figure out
how to set such a device in the chroot environment.

I have no idea what a "fake" /dev/random looks like but that sounds a
lot less safe than running the cgi script outside the chroot.

To create a real device node, use the MAKEDEV script or run mknod(8)
by hand.






Re: Recovering from as identical as faulty backup disk..

2023-03-24 Thread Daniele B.
Hi Jan,

Sorry for the missing clarifications on my settings.

>> Why would another disk have the same UID and how is that obvious?

I use hardware copy machines for all my storage devices, since 2012.

>> Your problem is a HW failure, not a clash of names.

What I mean is when I try to insert the the backup disk together
with the original one OpenBSD behave like the CRC problem is
of the original disk, no terminal output when I insert it, no terminal
output to advise about the error, only the given message in the console
when I enter X.

Obviously is my first time to get into this kind of CRC situations in so many 
years
so I can't confirm if last patches has anything to deal with it.

P.S: I'm gently advising about an OpenBSD problem, I'm not here
to make an utterine accordance on my settings.



-- Daniele Bonini

Mar 24, 2023 08:18:52 Jan Stary :

> On Mar 24 04:34:42, my2...@aol.com wrote:
>> sd1(umass0:1:0) Check Condition (error 0x70) on opcode 0x2a
>>    SENSE KEY: Aborted Command 
>>  ASC/ASCQ: information Unit iuCRC Error Detected
>> 
>> sd1 was the original disk which the second backup disk was copy from.
>> And obviously the faulty sd3 had the same UID of sd1.
> 
> Why would another disk have the same UID and how is that obvious?
> Your problem is a HW failure, not a clash of names.
> 
>> Apart my the physical problem of the identical bit-by-bit copy
> 
> So how did you make that copy?
> Just dd sd1c onto sd3c? Why?
> 
>> 2) The CRC problem of sd3 is passed to sd1
> 
> What do you mean by that?
> 
>> I then rebooted on the backup disk and fix the fss prb to solve my
>> situation but frankly the system could be more helpful and less error
>> prone in these kind of emergency situations.
> 
> You could also make normal backups.



Re: Running Bugzilla in httpd - 'Pg' is not a valid choice for $db_driver in localconfig

2023-03-24 Thread Stuart Henderson
On 2023-03-23, Werner Boninsegna  wrote:
> Please note that I had to "fake" /dev/random, as I couldn't figure out
> how to set such a device in the chroot environment.

I have no idea what a "fake" /dev/random looks like but that sounds a
lot less safe than running the cgi script outside the chroot.

To create a real device node, use the MAKEDEV script or run mknod(8)
by hand.




Re: Possible to handle fiber WAN connection with OpenBSD using PCIe card?

2023-03-24 Thread Stuart Henderson
On 2023-03-23, Kaya Saman  wrote:
> Unfortunately I haven't been well for a long time hence the delay in 
> upgrade and at first found it a little difficult but the way forward 
> after a bit of reading around was to go to 7.1-release then 7.2 and 
> finally jump back to Current which I believe is called Beta now? (unless 
> I missed something or am confusing)

The main release cycle is -current, -beta, , -current - this
hasn't changed. (The "no suffix" includes a few snapshots prior to an
actual finished release, and that's the stage we are at right now).

> Unfortunately right now I'm a little panicked because my (new) ISP will 
> provide me with either a Huwei or Nokia device which seem to be very 
> basic in functionality and don't seem to support RFC 1483 bridging which 
> I'm using currently for my VDSL2 connection. I've read the manual for 
> the Nokia which I was suggested that they "thought" would be able to do 
> what I want it to do, but it doesn't seem possible.

IIRC you're UK based aren't you? Which ISP?

If the ISP is using Openreach's FTTP you will need to use their ONT
which will act as a bridge, then you use your own or an ISP-provided
router connected over ethernet. Typically it's PPPoE though the backhaul
supports plain ethernet and some ISPs (notably Sky) use it, normally
with DHCP. The ONT is not user-configurable and you have to use it.

Non-Openreach-based vary. If you're lucky you might get pppoe out of the
ONT and be able to connect your own router (likely with at least some of
the ISPs selling CityFibre-based lines). Some others are often much more
locked down - if you're lucky you might get to put their kit in bridge
mode, if not you might be behind a NAT router and can't do anything
about it. (Some don't even let you make changes to even things as simple
as wifi SSID yourself and you need to get them to do it for you).
I haven't seen any that will let you connect to the incoming fibre
directly.

> I'm wondering if anyone knows if one can get a PCIe card... possibly 
> Intel chipset will be best that can take an SFP or SFP+ module to 
> accommodate what I assume currently is an SC/APC LR connection which I 
> can feed directly to OpenBSD? - again I'm just basing this according to 
> the manual as I don't have any fiber experience at all.

You can get various cards that will take SFP/SFP+. You can get GPON SFPs.
But you can't enrol a custom router in the provider's provisioning system
that sets up crypto keys etc (GPON is a shared medium; other subscribers
will get the same light carrying your connection and encryption is used
so they can't see your packets).

As far as your connection is concerned the demarc is pretty much always
the ethernet port on either the provider's ONT or their supplied router.




Re: Recovering from as identical as faulty backup disk..

2023-03-24 Thread Jan Stary
On Mar 24 04:34:42, my2...@aol.com wrote:
> sd1(umass0:1:0) Check Condition (error 0x70) on opcode 0x2a
>SENSE KEY: Aborted Command  
>  ASC/ASCQ: information Unit iuCRC Error Detected
> 
> sd1 was the original disk which the second backup disk was copy from.
> And obviously the faulty sd3 had the same UID of sd1.

Why would another disk have the same UID and how is that obvious?
Your problem is a HW failure, not a clash of names.

> Apart my the physical problem of the identical bit-by-bit copy

So how did you make that copy?
Just dd sd1c onto sd3c? Why?

> 2) The CRC problem of sd3 is passed to sd1

What do you mean by that?

> I then rebooted on the backup disk and fix the fss prb to solve my
> situation but frankly the system could be more helpful and less error
> prone in these kind of emergency situations.

You could also make normal backups.