Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Nuno Teixeira
Hi Shawn,

Thanks for let me know about iwlwifi driver status.
I will post at freebsd-wireless mailing soon about it.

Cheers,
Nuno Teixeira

Shawn Webb  escreveu no dia segunda, 1/08/2022
à(s) 18:10:

> On Mon, Aug 01, 2022 at 01:05:07AM +0100, Nuno Teixeira wrote:
> > Hello,
> >
> > I'm trying to setup a failover mode ethernet/wireless as shown in
> >
> https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
> > and I got a panic.
> >
> > /etc/rc.conf:
> > ---
> > ifconfig_re0="ether "
> > wlans_iwlwifi0="wlan0"
> > ifconfig_wlan0="WPA"
> > create_args_wlan0="country PT"
> > cloned_interfaces="lagg0"
> > ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
> > ---
> >
> > Any ideas of what's wrong?
> > BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...
>
> When I last talked to bz@, the combination of iwlwifi and lagg was
> reported as not supported. bz@ might need/want some help in that area.
>
> Thanks,
>
> --
> Shawn Webb
> Cofounder / Security Engineer
> HardenedBSD
>
>
> https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
>


Re: problem with bhyve, ryzen 5800x, freebsd guest

2022-08-01 Thread Vitaliy Gusev
Interesting enough. It would be nice if you find out what exactly triggered 
your VM to reset.

—
Vitaliy

> On 1 Aug 2022, at 17:39, Andriy Gapon  wrote:
> 
> On 2022-07-10 20:28, Gleb Smirnoff wrote:
>> On Thu, Jul 07, 2022 at 03:29:04PM +0300, Andriy Gapon wrote:
>> A> I have a strange issue with running an 'appliance' image based on
>> A> FreeBSD 12 in bhyve on a machine with Ryzen 5800x processor.
>> A>
>> A> The problem is that the guest would run for a while and then the host
>> A> would suddenly reset itself. It appears like a triple fault or
>> A> something with similar consequences.
>> A>
>> A> The time may be from a few dozens of minutes to many hours.
>> A>
>> A> Just to be clear, no such thing occurs if I do not run the guest.
>> A> Also, I have an older AMD system (pre-Zen), the problem does not happen
>> A> there.
>> A> A vanilla FreeBSD 12.3 installation that just sits idle also does not
>> A> cause the problem.
>> A>
>> A> Does anyone have an idea what the problem could be?
>> A> What workaround or diagnostics to try?
>> A> Anybody else seen something like this?
>> A>
>> A> Since it's the host that resets it would be hard to capture any traces.
>> I also run bhyve on Ryzen since late 2021 and never had such an issue.
>> But not FreeBSD 12, I run the head.
> 
> 
> Thank you everyone who responded. It seems that the problem was with some 
> BIOS configuration changes, probably related to the power settings.
> Once I reset everything to factory defaults (plus some minimum "safe" and 
> well-understood changes) the problem went away.
> It's really surprising that I saw it only with bhyve and only with the 
> particular kind of VMs. Perhaps there was a workload pattern that triggered a 
> hardware bug or overloaded some specific module.
> 
> Anyways, sorry for the noise and thank you for the help.
> 
> -- 
> Andriy Gapon
> 
> 
> https://standforukraine.com 
> https://razomforukraine.org 


Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Shawn Webb
On Mon, Aug 01, 2022 at 01:05:07AM +0100, Nuno Teixeira wrote:
> Hello,
> 
> I'm trying to setup a failover mode ethernet/wireless as shown in
> https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
> and I got a panic.
> 
> /etc/rc.conf:
> ---
> ifconfig_re0="ether "
> wlans_iwlwifi0="wlan0"
> ifconfig_wlan0="WPA"
> create_args_wlan0="country PT"
> cloned_interfaces="lagg0"
> ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
> ---
> 
> Any ideas of what's wrong?
> BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...

When I last talked to bz@, the combination of iwlwifi and lagg was
reported as not supported. bz@ might need/want some help in that area.

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc


signature.asc
Description: PGP signature


Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Mario Lobo
On Mon, Aug 1, 2022 at 1:30 PM Mario Lobo  wrote:

>
>
> On Mon, Aug 1, 2022, 11:01 Nuno Teixeira  wrote:
>
>> Hi,
>>
>> Something is wrong about getting ether and wlan mac adresses.
>> dmesg shows the same address:
>> ---
>> iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x351
>> iwlwifi0: base HW address: 6c:6a:77:df:09:21
>> (...)
>> re0:  port
>> 0x3000-0x30ff mem 0xb4204000-0xb4204fff,0xb420-0xb4203fff at device 0.0
>> on pci3
>> re0: Ethernet address: 6c:6a:77:df:09:21
>> ---
>> and ifconfig shows:
>> ---
>> re0: flags=8802 metric 0 mtu 1500
>>
>> options=8209b
>> ether 6c:6a:77:df:09:21
>> media: Ethernet autoselect (100baseTX )
>> status: active
>> nd6 options=29
>> lo0: flags=8049 metric 0 mtu 16384
>> options=680003
>> inet6 ::1 prefixlen 128
>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
>> inet 127.0.0.1 netmask 0xff00
>> groups: lo
>> nd6 options=21
>> wlan0: flags=8843 metric 0 mtu
>> 1500
>> ether 6c:6a:77:df:09:21
>> inet 192.168.1.74 netmask 0xff00 broadcast 192.168.1.255
>> groups: wlan
>> ssid MEO-3637C0 channel 1 (2412 MHz 11g) bssid 00:06:91:36:37:c0
>> regdomain ETSI country PT authmode WPA2/802.11i privacy ON
>> deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
>> protmode CTS wme roaming MANUAL
>> parent interface: iwlwifi0
>> media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
>> status: associated
>> nd6 options=29
>> ---
>>
>> I disabled wireless at bios and same mac address for ethernet.
>> I don't see a possibility of both cards sharing same mac address...
>>
>> Cheers
>>
>> Mario Lobo  escreveu no dia segunda, 1/08/2022 à(s)
>> 13:15:
>>
>>>
>>> On Sun, Jul 31, 2022, 21:05 Nuno Teixeira  wrote:
>>>
 Hello,

 I'm trying to setup a failover mode ethernet/wireless as shown in
 https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
 and I got a panic.

 /etc/rc.conf:
 ---
 ifconfig_re0="ether "
 wlans_iwlwifi0="wlan0"
 ifconfig_wlan0="WPA"
 create_args_wlan0="country PT"
 cloned_interfaces="lagg0"
 ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
 ---

 Any ideas of what's wrong?
 BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...

 Thanks in advance,
 Nuno Teixeira

>>>
>>> Hi.
>>>
>>> For this to work, you'll have to clone your wifi MAC to your eth MAC.
>>>
>>
> Your lagg0 interface is missing.
>
>>
Here is my ifconfig:

[~]>ifconfig
re0: flags=8843 metric 0 mtu 1500
options=80088
ether f8:94:c2:26:f3:54
hwaddr fc:45:96:fb:3d:82
media: Ethernet autoselect (1000baseT )
status: active
nd6 options=21
lo0: flags=8049 metric 0 mtu 16384
options=680003
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff00
groups: lo
nd6 options=21
vboxnet0: flags=8802 metric 0 mtu 1500
ether 0a:00:27:00:00:00
media: Ethernet autoselect
status: active
nd6 options=21
wlan0: flags=8c43 metric 0
mtu 1500
ether f8:94:c2:26:f3:54
groups: wlan
ssid "" channel 1 (2412 MHz 11g)
regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
deftxkey UNDEF powersavemode CAM powersavesleep 100 txpower 30
bmiss 10 scanvalid 60 protmode CTS wme roaming MANUAL
parent interface: iwm0
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
nd6 options=21
lagg0: flags=8843 metric 0 mtu 1500
ether f8:94:c2:26:f3:54
inet6 fe80::fa94:c2ff:fe26:f354%lagg0 prefixlen 64 scopeid 0x5
inet 10.17.12.215 netmask 0xff00 broadcast 10.17.12.255
laggproto failover lagghash l2,l3,l4
laggport: re0 flags=5
laggport: wlan0 flags=0<>
groups: lagg
media: Ethernet autoselect
status: active
nd6 options=21

And here is my rc.conf:

ifconfig_wlan0="mode autoselect WPA powersave up"
wlans_iwm0="wlan0"
wpa_supplicant_enable="YES"
wpa_supplicant_program="/usr/local/sbin/wpa_supplicant"
wpa_supplicant_flags="-dd"
ifconfig_re0="media 1000baseTX mediaopt full-duplex up"
ifconfig_re0="ether f8:94:c2:26:f3:54"
ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
cloned_interfaces="lagg0"
-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!]


Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Mario Lobo
On Mon, Aug 1, 2022, 11:01 Nuno Teixeira  wrote:

> Hi,
>
> Something is wrong about getting ether and wlan mac adresses.
> dmesg shows the same address:
> ---
> iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x351
> iwlwifi0: base HW address: 6c:6a:77:df:09:21
> (...)
> re0:  port
> 0x3000-0x30ff mem 0xb4204000-0xb4204fff,0xb420-0xb4203fff at device 0.0
> on pci3
> re0: Ethernet address: 6c:6a:77:df:09:21
> ---
> and ifconfig shows:
> ---
> re0: flags=8802 metric 0 mtu 1500
>
> options=8209b
> ether 6c:6a:77:df:09:21
> media: Ethernet autoselect (100baseTX )
> status: active
> nd6 options=29
> lo0: flags=8049 metric 0 mtu 16384
> options=680003
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
> inet 127.0.0.1 netmask 0xff00
> groups: lo
> nd6 options=21
> wlan0: flags=8843 metric 0 mtu 1500
> ether 6c:6a:77:df:09:21
> inet 192.168.1.74 netmask 0xff00 broadcast 192.168.1.255
> groups: wlan
> ssid MEO-3637C0 channel 1 (2412 MHz 11g) bssid 00:06:91:36:37:c0
> regdomain ETSI country PT authmode WPA2/802.11i privacy ON
> deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
> protmode CTS wme roaming MANUAL
> parent interface: iwlwifi0
> media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
> status: associated
> nd6 options=29
> ---
>
> I disabled wireless at bios and same mac address for ethernet.
> I don't see a possibility of both cards sharing same mac address...
>
> Cheers
>
> Mario Lobo  escreveu no dia segunda, 1/08/2022 à(s)
> 13:15:
>
>>
>> On Sun, Jul 31, 2022, 21:05 Nuno Teixeira  wrote:
>>
>>> Hello,
>>>
>>> I'm trying to setup a failover mode ethernet/wireless as shown in
>>> https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
>>> and I got a panic.
>>>
>>> /etc/rc.conf:
>>> ---
>>> ifconfig_re0="ether "
>>> wlans_iwlwifi0="wlan0"
>>> ifconfig_wlan0="WPA"
>>> create_args_wlan0="country PT"
>>> cloned_interfaces="lagg0"
>>> ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
>>> ---
>>>
>>> Any ideas of what's wrong?
>>> BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...
>>>
>>> Thanks in advance,
>>> Nuno Teixeira
>>>
>>
>> Hi.
>>
>> For this to work, you'll have to clone your wifi MAC to your eth MAC.
>>
>
Your lagg0 interface is missing.

>


Re: pkg: Newer FreeBSD version for package... but why?

2022-08-01 Thread Andriy Gapon

On 2022-07-13 21:33, John Baldwin wrote:

On 7/13/22 3:17 AM, Andriy Gapon wrote:

On 2022-07-13 13:09, Michael Gmelin wrote:



On Wed, 13 Jul 2022 10:29:06 +0300
Andriy Gapon  wrote:


# uname -U
1400063

# uname -K
1400063

# pkg upgrade
Updating FreeBSD repository catalogue...
Fetching packagesite.pkg: 100%    5 MiB   4.8MB/s    00:01
Processing entries:   0%
Newer FreeBSD version for package zyre:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1400063
- running kernel: 1400051
Ignore the mismatch and continue? [y/N]:

Does anyone know why this would happen?
Where does pkg get its notion of the running kernel version?



If I'm reading the sources correctly, it's determining the OS version
by looking at the elf headers of various files in this order:

  getenv("ABI_FILE")
  /usr/bin/uname
  /bin/sh

So I would assume that `file /usr/bin/uname` shows 1400051 on your
system.


Thank you very much!  That's it:
# file /usr/bin/uname
/usr/bin/uname: ELF 32-bit LSB executable, ARM, EABI5 version 1
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1,
FreeBSD-style, for FreeBSD 14.0 (1400051), stripped


You can point it to checking another file by setting ABI_FILE[0] in the
environment or ignore the check by setting IGNORE_OSVERSION (like
advised). The "running kernel:" label seems a bit misleading.


Indeed.

Now the next thing (for me) to research is why the binaries were built
"for FreeBSD 14.0 (1400051)" when the source tree has 1400063 and uname
-U also reports 1400063.
FWIW, this was a cross-build, maybe that played a role too.


If you do a NO_CLEAN=yes build, we don't relink binaries just because
crt*.o changed (where the note is stored).



I see.  It was a NO_CLEAN build indeed.
Thanks.

--
Andriy Gapon


https://standforukraine.com
https://razomforukraine.org



Re: problem with bhyve, ryzen 5800x, freebsd guest

2022-08-01 Thread Andriy Gapon

On 2022-07-10 20:28, Gleb Smirnoff wrote:

On Thu, Jul 07, 2022 at 03:29:04PM +0300, Andriy Gapon wrote:
A> I have a strange issue with running an 'appliance' image based on
A> FreeBSD 12 in bhyve on a machine with Ryzen 5800x processor.
A>
A> The problem is that the guest would run for a while and then the host
A> would suddenly reset itself.  It appears like a triple fault or
A> something with similar consequences.
A>
A> The time may be from a few dozens of minutes to many hours.
A>
A> Just to be clear, no such thing occurs if I do not run the guest.
A> Also, I have an older AMD system (pre-Zen), the problem does not happen
A> there.
A> A vanilla FreeBSD 12.3 installation that just sits idle also does not
A> cause the problem.
A>
A> Does anyone have an idea what the problem could be?
A> What workaround or diagnostics to try?
A> Anybody else seen something like this?
A>
A> Since it's the host that resets it would be hard to capture any traces.

I also run bhyve on Ryzen since late 2021 and never had such an issue.
But not FreeBSD 12, I run the head.



Thank you everyone who responded.  It seems that the problem was with 
some BIOS configuration changes, probably related to the power settings.
Once I reset everything to factory defaults (plus some minimum "safe" 
and well-understood changes) the problem went away.
It's really surprising that I saw it only with bhyve and only with the 
particular kind of VMs.  Perhaps there was a workload pattern that 
triggered a hardware bug or overloaded some specific module.


Anyways, sorry for the noise and thank you for the help.

--
Andriy Gapon


https://standforukraine.com
https://razomforukraine.org



Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Nuno Teixeira
Hi,

Something is wrong about getting ether and wlan mac adresses.
dmesg shows the same address:
---
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x351
iwlwifi0: base HW address: 6c:6a:77:df:09:21
(...)
re0:  port
0x3000-0x30ff mem 0xb4204000-0xb4204fff,0xb420-0xb4203fff at device 0.0
on pci3
re0: Ethernet address: 6c:6a:77:df:09:21
---
and ifconfig shows:
---
re0: flags=8802 metric 0 mtu 1500

options=8209b
ether 6c:6a:77:df:09:21
media: Ethernet autoselect (100baseTX )
status: active
nd6 options=29
lo0: flags=8049 metric 0 mtu 16384
options=680003
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff00
groups: lo
nd6 options=21
wlan0: flags=8843 metric 0 mtu 1500
ether 6c:6a:77:df:09:21
inet 192.168.1.74 netmask 0xff00 broadcast 192.168.1.255
groups: wlan
ssid MEO-3637C0 channel 1 (2412 MHz 11g) bssid 00:06:91:36:37:c0
regdomain ETSI country PT authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
protmode CTS wme roaming MANUAL
parent interface: iwlwifi0
media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
status: associated
nd6 options=29
---

I disabled wireless at bios and same mac address for ethernet.
I don't see a possibility of both cards sharing same mac address...

Cheers

Mario Lobo  escreveu no dia segunda, 1/08/2022 à(s) 13:15:

>
> On Sun, Jul 31, 2022, 21:05 Nuno Teixeira  wrote:
>
>> Hello,
>>
>> I'm trying to setup a failover mode ethernet/wireless as shown in
>> https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
>> and I got a panic.
>>
>> /etc/rc.conf:
>> ---
>> ifconfig_re0="ether "
>> wlans_iwlwifi0="wlan0"
>> ifconfig_wlan0="WPA"
>> create_args_wlan0="country PT"
>> cloned_interfaces="lagg0"
>> ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
>> ---
>>
>> Any ideas of what's wrong?
>> BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...
>>
>> Thanks in advance,
>> Nuno Teixeira
>>
>
> Hi.
>
> For this to work, you'll have to clone your wifi MAC to your eth MAC.
>
>>


Re: Failover Mode between ether/wlan panics

2022-08-01 Thread Mario Lobo
On Sun, Jul 31, 2022, 21:05 Nuno Teixeira  wrote:

> Hello,
>
> I'm trying to setup a failover mode ethernet/wireless as shown in
> https://docs.freebsd.org/en/books/handbook/book/#networking-lagg-wired-and-wireless
> and I got a panic.
>
> /etc/rc.conf:
> ---
> ifconfig_re0="ether "
> wlans_iwlwifi0="wlan0"
> ifconfig_wlan0="WPA"
> create_args_wlan0="country PT"
> cloned_interfaces="lagg0"
> ifconfig_lagg0="up laggproto failover laggport re0 laggport wlan0 DHCP"
> ---
>
> Any ideas of what's wrong?
> BTW, no kernel dump and I have dumpdev="AUTO" in /etc/rc.conf...
>
> Thanks in advance,
> Nuno Teixeira
>

Hi.

For this to work, you'll have to clone your wifi MAC to your eth MAC.

>