Bug 12491

Summary: IPsec and OpenVPN GUI crash with HTTP error 500 in Core Update 151 (testing)
Product: IPFire Reporter: Peter Müller <peter.mueller>
Component: ---Assignee: Assigned to nobody - feel free to grab it and work on it <nobody>
Status: CLOSED FIXED QA Contact: Peter Müller <peter.mueller>
Severity: Crash    
Priority: Will affect all users CC: fkienker, matthias.fischer, michael.tremer
Version: 2Keywords: Blocker
Hardware: all   
OS: All   
Attachments: Patch for Core 151 (.../config/rootfiles/core/151/update.sh).

Description Peter Müller 2020-10-09 19:06:30 UTC
In the current version of testing Core Update 151, both IPsec and OpenVPN GUI are crashing with an HTTP error 500 - Apache error logs indicate a missing Perl module:

Can't locate Net/DNS/RR/NXT.pm in @INC (you may need to install the Net::DNS::RR::NXT module) (@INC contains: /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.30.0 /usr/lib/perl5/5.30.0/x86_64-linux-thread-multi /usr/lib/perl5/5.30.0) at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/RR.pm line 86.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/RR.pm line 131.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Packet.pm line 15.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Packet.pm line 15.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/Base.pm line 20.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/Base.pm line 20.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver.pm line 19.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver.pm line 22.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS.pm line 37.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS.pm line 37.
Compilation failed in require at /srv/web/ipfire/cgi-bin/vpnmain.cgi line 22.
BEGIN failed--compilation aborted at /srv/web/ipfire/cgi-bin/vpnmain.cgi line 22.
[Fri Oct 09 21:01:44.748923 2020] [cgid:error] [pid 3431:tid 130094501447232] [client 10.xxx.xxx.xxx:58266] End of script output before headers: vpnmain.cgi, referer: https://xxx:444/
Can't locate Net/DNS/RR/NXT.pm in @INC (you may need to install the Net::DNS::RR::NXT module) (@INC contains: /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.30.0 /usr/lib/perl5/5.30.0/x86_64-linux-thread-multi /usr/lib/perl5/5.30.0) at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/RR.pm line 86.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/RR.pm line 131.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Packet.pm line 15.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Packet.pm line 15.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/Base.pm line 20.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/Base.pm line 20.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver.pm line 19.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS/Resolver.pm line 22.
Compilation failed in require at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS.pm line 37.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi/Net/DNS.pm line 37.
Compilation failed in require at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 26.
BEGIN failed--compilation aborted at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 26.
[Fri Oct 09 21:04:06.310681 2020] [cgid:error] [pid 3431:tid 130094148347456] [client 10.xxx.xxx.xxx:58308] End of script output before headers: ovpnmain.cgi, referer: https://xxx:444/

This is a show-stopper.
Comment 1 Peter Müller 2020-10-09 19:25:38 UTC
This might have been introduced in https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=5f1039dda984ed3a06da95ba7d9248b759cf9125 .
Comment 2 Matthias Fischer 2020-10-10 00:19:02 UTC
Ouch. This was me.

Could adding 'Net-DNS-SEC 0.06' be sufficient?
Comment 3 Matthias Fischer 2020-10-10 00:50:00 UTC
Correction:

The last version of 'Net-DNS-SEC' seems to be 1.18 (found here: https://www.net-dns.org/download/), but 1.18 doesn't contain required 'NXT.pm' module (anymore).

Furthermore, the latest 'NET-DNS' is now 1.27. I updated to 1.25.

If NET-DNS-SEC is really needed, I would need some advise how to handle this.
Comment 4 Matthias Fischer 2020-10-10 09:37:00 UTC
I took a look at the changelog for Net-DNS 1.27.

Changes since 1.25:

**** 1.27 Sep 11, 2020

Fix rt.cpan.org #133203

	Net::DNS::RR::LOC erroneously strips non default values from
	string representation


**** 1.26 Aug 6, 2020

	Add HTTPS/SVCB packages.

Fix rt.cpan.org #132921

	EDNS OPT handling
...

Details for #133203 => https://rt.cpan.org/Public/Bug/Display.html?id=133203

Perhaps it would be better to go straight to Net-DNS 1.27?

What I'm still not sure about: how to handle "Can't locate Net/DNS/RR/NXT.pm..."?
Comment 5 Michael Tremer 2020-10-10 11:40:24 UTC
Can you try deleting /usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/Net/DNS on your system?

The module seems to have moved to a new location and maybe this is loading half of the old module and half of the new one?!

This actually has quite a high priority because it is a release blocker.
Comment 6 Fred Kienker 2020-10-10 14:34:52 UTC
I can confirm deleting 

/usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/Net/DNS 

AND

/usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/Net/DNS.pm

resolves this problem.
Comment 7 Matthias Fischer 2020-10-10 17:31:44 UTC
Ok, I give up. ;-)

Then this mess was only cause by old remaining files from 'Net-DNS 0.47'!? Great.

In this case, adding something like:

HOST_ARCH="$(uname -m)"
rm -rfv \
 /usr/lib/perl5/site_perl/5.30.0/$HOST_ARCH-linux-thread-multi/Net/DNS

and

rm -fv \
 /usr/lib/perl5/site_perl/5.30.0/$HOST_ARCH-linux-thread-multi/Net/DNS.pm

to '.../rootfiles/config/core/151/update.sh' should be enough.

Correct?

Conclusion:
I should've kept my old 32bit testing machine instead of installing it completely new for this.
Comment 8 Matthias Fischer 2020-10-10 22:50:28 UTC
One more glitch:

HOST_ARCH="$(uname -m)" works on 64bit, but not for my testmaschine. I get "i686", but directory is named "i586-linux-thread-multi".

@Fred:
I can confirm - GUI is running again.
Comment 9 Matthias Fischer 2020-10-11 16:26:58 UTC
Created attachment 786 [details]
Patch for Core 151 (.../config/rootfiles/core/151/update.sh).
Comment 10 Michael Tremer 2020-10-12 10:23:25 UTC
(In reply to Matthias Fischer from comment #9)
> Created attachment 786 [details]
> Patch for Core 151 (.../config/rootfiles/core/151/update.sh).

This looks good. Could you please post it to the list?
Comment 11 Matthias Fischer 2020-10-12 15:37:32 UTC
Done:

...
From: Matthias Fischer <matthias.fischer@ipfire.org>
Message-ID: <b31992d1-0543-a994-95bf-a631a34e5a74@ipfire.org>
Date: Sun, 11 Oct 2020 18:29:43 +0200
...

"I also added it here. Please find attached an updated 'update.sh' plus a
proposed patch for Core 151 for .../config/rootfiles/core/151'.

I didn't want to push this to the 'master' branch and something like
https://git.ipfire.org/?p=ipfire-2.x.git;a=shortlog;h=refs/heads/core151
doesn't exist yet."

Did you get it?
Comment 12 Matthias Fischer 2020-10-14 18:03:20 UTC
=> https://patchwork.ipfire.org/patch/3524/
Comment 13 Michael Tremer 2020-10-14 21:40:03 UTC
Thank you. Merged.