Bug #12031
closed
Wireguard Package Produces Crash in 2.5.2
Added by Kris Phillips over 3 years ago.
Updated over 3 years ago.
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
Issue continues to be present in June 17th 2.5.2 RC build
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.
- Assignee set to Renato Botelho
I'll take care of this one
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.
Hi all,
Yes this fix (along with a ton of other fixes) are in the current PR.
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!
- Status changed from New to Feedback
WireGuard package version 1.1.3 was merged into 2.6.0 and 2.5.2
no crash report after installing WireGuard .
2.6.0.a.20210624.0100
WireGuard ver. 0.1.3
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.
- 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
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?
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?
- 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
Looks good here, will we get this cherry picked for 21.05?
- Status changed from Feedback to Resolved
Confirmed fixed in 2.5.2 latest builds on 0.1.3_1. Crash is no longer present.
Also available in: Atom
PDF