python3.9 generates high CPU load and kills Wireguard

Started by STRUBartacus, February 05, 2023, 06:08:38 PM

Previous topic - Next topic
Hello

On an APU2 I manage with OPNsense 23.1, python3.9 regularly generates high CPU load and subsequently causes the wireguard connections to die. A restart provides relief for a few days in each case.
Where could be the problem there?



Type
ps awwux| grep python
to see what that python process is doing.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Unfortunately, I have already restarted the box. I look then in about 5 days again. Thanks!

February 05, 2023, 07:37:25 PM #4 Last Edit: February 06, 2023, 12:13:56 AM by lawful_milieu
I enabled the new Unbound DNS reporting feature after upgrading to 23.1.

Reporting > Settings > Unbound DNS reporting

I'll try turning that off.

PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
51774 root         11 103    0   203M   128M CPU1     1 856:40  97.98% python3.9
99856 root          1  86    0    48M    36M CPU2     2 145:03  97.47% python3.9

~ # ps awwux| grep python
root          51774 333.6  1.6  208244  131132  -  R    13:45    856:41.37 /usr/local/bin/python3 /usr/local/opnsense/scripts/unbound/logger.py (python3.9)
root          99856  51.3  0.4   49248   36776  -  Rs   13:02    145:04.14 /usr/local/bin/python3 /usr/local/opnsense/scripts/netflow/flowd_aggregate.py (python3.9)


Update: Appears to have resolved the high CPU issue for me after checking a few hours later.

@lawful_milieu

You can try # opnsense-patch 02f44d902 (https://github.com/opnsense/core/commit/02f44d9024f0c9eb53ae2ade83f9ff522218014c) and restart Unbound. This should make a difference in CPU usage with unbound dns reporting enabled.