OPNsense Forum

English Forums => Zenarmor (Sensei) => Topic started by: rfc805 on May 16, 2023, 08:25:19 pm

Title: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: rfc805 on May 16, 2023, 08:25:19 pm
I don't have too much information to really provide on this.  However, when performing the upgrade to 23.1.7 today, it reached upgrading Zenarmor/os-sensei to 1.13.  At this point it gave a message that it was saving state as it was running, and then "Waiting for PIDs: ..." - at this point the opnsense system went entirely unreachable and stopped forwarding traffic entirely.  After waiting for several minutes in this state, I had to use out of band console to go in and kill all eastpect processes, at which point the OPNsense system functioned again.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on May 16, 2023, 09:59:49 pm
True, I had this several times: installing Zenarmor kills LAN connections. I had to use the console to install it properly (just in case, I have reinstalled it).
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: TritonB7 on May 18, 2023, 04:55:05 pm
I am running into a similar issue. Out of curiosity, what type of interface/nic are you using?
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on May 19, 2023, 06:48:27 am
Various:

- a computer with Intel Corporation 82576 Gigabit Network Connection( rev 01) and Intel Corporation Ethernet Connection I217-V (rev 05) and Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
- a Proxmox with Intel Corporation 82576 Gigabit Network Connection (rev 01) available through PCI devices (no qemu plugin installed)
- APU2 with Intel(R) I210 Flashless (Copper)

So, it happened everytime I had to update Zenarmor to the present version.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: sy on May 19, 2023, 06:58:41 am
Hi All,

What is the output of /tmp/zenarmor_update.log? Do you use Suricata as well?
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: rfc805 on May 19, 2023, 08:01:40 pm
I do use Suricata as well,  but obviously on different interfaces.

There is no such log file on my host, only a zenarmor_updates.json
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: mb on May 19, 2023, 08:11:21 pm
Quick question: were you upgrading from 23.1.6 or from an earlier OPNsense version?

This seems netmap-related and I wonder if you were upgrading from an earlier version of OPNsense where the netmap emulated fixes were not there...
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on May 20, 2023, 03:11:26 pm
No, I don't use Suricata.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: rfc805 on May 22, 2023, 02:51:49 pm
I was upgrading from 23.1.6
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: fxsaddict on May 22, 2023, 08:55:55 pm
I have à similar issue. Don’t upgrade. This is Bullshit.
Everything down.
I don’t use suricat.
I have a protection i7
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: fxsaddict on May 22, 2023, 08:57:14 pm
23-7-1
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: mb on May 23, 2023, 03:13:22 am
@rfc805, @almodovaris, @TritonB7

Can you reach out to Zenarmor support? Use the "Bug Report" screen on the upper right hand corner of the screen - in case you're not familiar.

Make sure you send all OPN/Zenarmor config and logs.

This looks pretty much like another netmap thing. We want to investigate further.

Thanks.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on May 23, 2023, 05:40:44 pm
Sorry, I have meanwhile uninstalled Zenarmor, deleted all its folders, and then reinstalled it (on all machines). So, I guess logs no longer contain that information. Just that you know, on Proxmox I use now emulated netmap driver.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: TritonB7 on May 24, 2023, 02:03:59 am
@rfc805, @almodovaris, @TritonB7

Can you reach out to Zenarmor support? Use the "Bug Report" screen on the upper right hand corner of the screen - in case you're not familiar.

Make sure you send all OPN/Zenarmor config and logs.

This looks pretty much like another netmap thing. We want to investigate further.

Thanks.

I did submit a Bug Report earlier this month along with config and logs. I'm using an Intel x550-t2 and i350t4v2, same issue with both cards.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: fxsaddict on May 29, 2023, 09:56:15 am
update:
i receive an answer from helpdesk:
Thanks for reaching out and letting us know about the problem.
 "
Is the FW reachable? Can you try to stop Zenarmor packet Engine by runnig the command "service eastpect stop" on the console as root? Then please change the deployment mode to emulated driver in Configuration - General - Deployment Mode - L3 Routed mode with netmap emulated driver on GUI.
"
I start a new post because i was unable to reinstall zenarmor
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: rfc805 on June 02, 2023, 04:36:49 pm
Submitted a bug, got a blow off "we can't reproduce, go away" response.  Meh - think it's best to just avoid using Zenarmor in the future.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: sy on June 02, 2023, 06:14:39 pm
Hi,

Can you share the ticket ID? It could be a misunderstanding. We try to solve the issue via remote session if we can not reproduce it.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: rfc805 on June 02, 2023, 06:35:39 pm
How would you solve the issue via a remote session for an upgrade failure?  Doesn't make much sense in the approach. 

I understand it as a general policy to troubleshooting, but can't see how it's relevant for this one.

It's also a bit of an uncomfortable approach with a firewall device.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 13, 2023, 11:43:29 am
I cannot get crash dumps, but every time I reinstall Zenarmor I get a kernel panic after Application category migration... done.

Panic happens each and every time I install Zenarmor, even if I had cleaned its every trace before reinstalling it.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: beki on June 14, 2023, 03:11:06 pm
Hi Almodovaris,

Could you share the kernel panic message and the zenarmor* files under /tmp/ folder with the Zenarmor team?

Bests
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: jclendineng on June 14, 2023, 04:33:49 pm
Had this as well, intel nics.  This has happened on these nics for over a year, I did reach out to support who did offer to remote in, which is hard to do when interfaces are all down ;) I uninstalled, but have you tried emulated mode? Ive heard emulated is pretty stable now...
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 14, 2023, 07:05:36 pm
This happens before eastpect is even started.

I get a kernel panic and OPNsense reboots. There is nothing about kernel panic in /tmp. /tmp is volatile. If you show me how to capture Proxmox console, I can share the output, there are many pages of errors.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 14, 2023, 07:31:55 pm
Okay, made /tmp and /var stick. Still no logs in /usr/local/sensei/support/crash_dumps or /var/crash.

Nothing interesting in /tmp either. Nor in /var/log .
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 14, 2023, 09:05:16 pm
https://youtu.be/dRZDPivYrDA

At 01:30 begins the action.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: sy on June 15, 2023, 12:15:31 am
Hi,

It is crashing when tries to stop the engine. Can you try to remove /usr/local/sensei folder and kill all easpect process?
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 15, 2023, 02:11:16 pm
Already did that, several times. I had reinstalled Zenarmor after deleting its every folder and rebooting OPNsense before installing it. I still had the same crash.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: sy on June 15, 2023, 03:37:41 pm
Hi,

Is there a chance to share screen video during the fresh install. In the previous video it was crashing while tries to stop Zenarmor engine. I wonder what is the cause of crash in fresh install.


Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 15, 2023, 05:00:16 pm
Done.

https://youtu.be/QB4WGX-qnh8

Action begins at 01:40.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: mb on June 15, 2023, 07:55:41 pm
Hi @almodovaris,

Thanks for the video. It was very helpful in understanding what's going on.

It looks like the crash is indeed caused by the 'sysctl' binary while trying to update net.inet.ip.intr_direct_queue_maxlen sysctl value.

Although the crash is not directly caused by zenarmor per se; something along the package install path seems to be triggering an operating system bug leading to an OS panic.

We're trying to reproduce this on our environment.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 16, 2023, 01:26:43 am
Well, it's not hard to reproduce on an APU2E4.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 16, 2023, 09:07:06 am
Now it's even worse: simply accessing https://192.168.1.1/system_advanced_sysctl.php crashes OPNsense (you do have to enter username and password if asked).

If it matters, I have OPNsense 23.1.9_19-amd64.

kernel and base are 23.1.8_5.

Oddly enough, getting rid of maxlen from config.xml does not solve the problem.

Even
Code: [Select]
# sysctl -a
crashes the system.

Reverting to stable 22.1.8 base and kernel, sysctl -a no longer crashes my system. And reinstalling Zenarmor no longer crashes my system. Please note that the crash happened also on stable versions, I think that removing maxlen from config.xml solved the problem for 23.1.8 base and kernel.

For the record, that tunable was set as default.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 17, 2023, 07:08:20 pm
I've checked:

opnsense-update -zbr 23.1.8_5 is safe;
opnsense-update -zkr dbg-23.1.8_5 isn't safe.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: franco on June 17, 2023, 07:57:26 pm
The last stable version base/kernel is 23.1.8. If you install random snapshots (opnsense-update -z) I'm unsure what you are trying to achieve...

If this is a FreeBSD 13 issue it's probably going to happen all the time since we don't alter code that is relevant here.


Cheers,
Franco
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 17, 2023, 09:05:45 pm
Let's put it this way: I have an addiction, I'm addicted to updates.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: franco on June 19, 2023, 10:56:00 am
Cowbell vibes, but I digress...

Ok, fair enough. You might want to try FreeBSD 13.2?

# opnsense-update -zbkr 23.7.d

It's unlikely an upstream fix will automatically find its way to 13.1/23.1 nowadays.


Cheers,
Franco
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: almodovaris on June 19, 2023, 11:41:59 am
23.7.d works okay.
Title: Re: OPNsense upgrade failure with Zenarmor (23.1.7)
Post by: franco on June 20, 2023, 09:03:24 am
Ok, that's nice to hear.


Cheers,
Franco