Bug #12031
closedWireguard Package Produces Crash in 2.5.2
0%
Description
The Wireguard package produces a crash report in the dashboard in 2.5.2 after install. Here is the data:
Crash report begins. Anonymous machine information:
amd64
12.2-STABLE
FreeBSD 12.2-STABLE RELENG_2_5_2-n226652-8b3cd288327 pfSense
Crash report details:
PHP Errors:
[13-Jun-2021 00:16:55 Etc/UTC] PHP Warning: flock() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 324
[13-Jun-2021 00:16:55 Etc/UTC] PHP Warning: fclose() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 327
[13-Jun-2021 00:17:10 Etc/UTC] PHP Warning: flock() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 324
[13-Jun-2021 00:17:10 Etc/UTC] PHP Warning: fclose() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 327
Updated by Kris Phillips over 3 years ago
Issue continues to be present in June 17th 2.5.2 RC build
Updated by Marcello Marques over 3 years ago
Kris Phillips wrote:
Issue continues to be present in June 17th 2.5.2 RC build
It's already fixed in the latest version of package (v0.1.3), available at the author's site - try
pkg remove pfSense-pkg-WireGuard-0.1.1_1
pkg add https://github.com/theonemcdonald/pfSense-pkg-WireGuard/releases/download/v0.1.3/pfSense-pkg-WireGuard-0.1.3.txz
service wireguardd start
Also, a PR has been submitted by him to Netgate - if you don't want to mess with a manual install, it should be available at the official package repository soon.
Updated by Renato Botelho over 3 years ago
- Assignee set to Renato Botelho
I'll take care of this one
Updated by Marcello Marques over 3 years ago
Renato Botelho wrote:
I'll take care of this one
FWIW, I've been running 0.1.2 (over several minor revisions) and 0.1.3 for many days now, with absolutely no issues - seems quite stable.
Updated by Christian McDonald over 3 years ago
Hi all,
Yes this fix (along with a ton of other fixes) are in the current PR.
Updated by Marcello Marques over 3 years ago
Christian McDonald wrote:
Hi all,
Yes this fix (along with a ton of other fixes) are in the current PR.
Your work on this is very much appreciated, Christian - if you ever find yourself in Santos, Brazil, the beers are on me!
Updated by Renato Botelho over 3 years ago
- Status changed from New to Feedback
WireGuard package version 1.1.3 was merged into 2.6.0 and 2.5.2
Updated by Alhusein Zawi over 3 years ago
no crash report after installing WireGuard .
2.6.0.a.20210624.0100
WireGuard ver. 0.1.3
Updated by Kris Phillips over 3 years ago
Checked on 2.5.2 June 26th build. The updated Wireguard package is not merged into the branch repo currently it would appear as the package available is still 0.1.1_1.
Updated by Kris Phillips over 3 years ago
- Status changed from Feedback to Assigned
Correction: Wireguard is available in the internal test repo. It is not available on the public-facing repo. I was able to get the current version installed on 2.5.2.
However, there is a new problem of hard crashing of the service now. It appears there is a kernel dependency in the latest build. Here is the logs:
Jun 26 20:23:40 php 2203 /usr/local/pkg/wireguard/wg_service.inc: The command '/sbin/kldload 'if_wg.ko'' returned exit code '1', the output was 'kldload: an error occurred while loading module if_wg.ko. Please check dmesg(8) for more details.'
Jun 26 20:23:40 kernel KLD if_wg.ko: depends on kernel - not available or version mismatch
Jun 26 20:23:40 kernel linker_load_file: /boot/modules/if_wg.ko - unsupported file type
Updated by Christian McDonald over 3 years ago
I'm not seeing that on both my 2.5.2 and 2.6.0 boxes (both x86 obviously).
I have seen similar output from kld* when attempting to load a module for the incorrect architecture. Has something gotten crossed here?
Updated by Christian McDonald over 3 years ago
Did some sleuthing into Kris's error. This looks like something wrong with the build, not something specific in the package code itself.
Ref: https://forums.freebsd.org/threads/kld-load-depends-on-kernel-not-avail-or-version-mismatch.57644/
Updated by Renato Botelho over 3 years ago
Kris Phillips wrote:
Correction: Wireguard is available in the internal test repo. It is not available on the public-facing repo. I was able to get the current version installed on 2.5.2.
However, there is a new problem of hard crashing of the service now. It appears there is a kernel dependency in the latest build. Here is the logs:
Jun 26 20:23:40 php 2203 /usr/local/pkg/wireguard/wg_service.inc: The command '/sbin/kldload 'if_wg.ko'' returned exit code '1', the output was 'kldload: an error occurred while loading module if_wg.ko. Please check dmesg(8) for more details.'
Jun 26 20:23:40 kernel KLD if_wg.ko: depends on kernel - not available or version mismatch
Jun 26 20:23:40 kernel linker_load_file: /boot/modules/if_wg.ko - unsupported file type
I believe I know what is happening. Could you please force reinstallation of wireguard-kmod using `pkg install -f wireguard-kmod`, reboot, and check if fixes the problems?
Updated by Renato Botelho over 3 years ago
- Status changed from Assigned to Feedback
- Target version set to 2.5.2
- Affected Version set to 2.5.x
I've bumped package version so it is reinstalled during upgrade process. It was needed because we changed FreeBSD-src and all kmods must be rebuilt to match FreeBSD src
Updated by Christian McDonald over 3 years ago
Looks good here, will we get this cherry picked for 21.05?
Updated by Kris Phillips over 3 years ago
- Status changed from Feedback to Resolved
Confirmed fixed in 2.5.2 latest builds on 0.1.3_1. Crash is no longer present.