OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: putt1ck on July 24, 2019, 12:08:19 PM

Title: [Solved] Tar segfault upgrading to 19.7
Post by: putt1ck on July 24, 2019, 12:08:19 PM
Hi

Trying to upgrade to 19.7 from 19.1.10_1. Having unlocked the upgrade I get web UI output of

***GOT REQUEST TO UPGRADE***
Fetching packages-19.7-OpenSSL-amd64.tar: ... done
Extracting packages-19.7-OpenSSL-amd64.tar...***DONE***


and CLI output of:

Proceed with this action? [19.7/y/N]: 19.7

Fetching packages-19.7-OpenSSL-amd64.tar: ... done
Extracting packages-19.7-OpenSSL-amd64.tar...Segmentation fault (core dumped)

*** OPNsense.ourpack.eu: OPNsense 19.1.10_1 (amd64/OpenSSL) ***



Locating the downloaded file and manually running tar -xf successfully extracts the contents.

Any ideas?
Title: Re: Tar segfault upgrading to 19.7
Post by: franco on July 25, 2019, 08:19:10 PM
Can you run the verbose command instead?

#opnsense-update -ur 19.7 -V


Thanks,
Franco
Title: Re: Tar segfault upgrading to 19.7
Post by: putt1ck on August 12, 2019, 09:50:33 AM
From the fetch start:

Fetching packages-19.7-OpenSSL-amd64.tar: .+ mkdir -p /var/cache/opnsense-update/70569
+ opnsense-fetch -a -T 30 -q -o /var/cache/opnsense-update/70569/packages-19.7-OpenSSL-amd64.tar.sig https://pkg.opnsense.org/FreeBSD:11:amd64/19.1/sets/packages-19.7-OpenSSL-amd64.tar.sig
.+ opnsense-fetch -a -T 30 -q -o /var/cache/opnsense-update/70569/packages-19.7-OpenSSL-amd64.tar https://pkg.opnsense.org/FreeBSD:11:amd64/19.1/sets/packages-19.7-OpenSSL-amd64.tar
...+ [ -n -V ]
+ opnsense-verify -q /var/cache/opnsense-update/70569/packages-19.7-OpenSSL-amd64.tar
+ echo ' done'
done
+ [ '' '=' -b ]
+ [ '' '=' -k ]
+ [ '' '=' -k ]
+ [ -n '' -a -z -u ]
+ [ -p '=' -P -a -z -u ]
+ [ -p '=' -p -a -n -u ]
+ echo -n 'Extracting packages-19.7-OpenSSL-amd64.tar...'
Extracting packages-19.7-OpenSSL-amd64.tar...+ rm -rf /var/cache/opnsense-update/.sets.pending/packages-19.7
+ mkdir -p /var/cache/opnsense-update/.sets.pending/packages-19.7
+ pkg-static clean -qya
Segmentation fault (core dumped)


Running pkg-static manually, with no switches/commands also returns a segfault. This may be related to the health check returning the error
/usr/local/lib/libpkg.so.4: version LIBPKG_1.4 required by /usr/local/sbin/pkg not defined?
Title: Re: Tar segfault upgrading to 19.7
Post by: putt1ck on August 17, 2019, 06:07:32 AM
Anybody any ideas how to solve this issue?
Title: Re: Tar segfault upgrading to 19.7
Post by: putt1ck on December 19, 2019, 11:09:13 AM
Just spending some time investigating this issue and noting that many (most, all?) of the files on the affected system are date stamped "Jul 13" - is it possible the upgrade completed as such but failed to mark itself as complete?
Title: Re: Tar segfault upgrading to 19.7
Post by: franco on December 19, 2019, 02:51:53 PM
The tar went through, but not "pkg-static" which is installed by package manager's own package "pkg" which is a static library so that missing shared objects are not a problem (as per your health check).

It would rather indicate that the file system integrity has an issue, maybe in relation to the installed operating system files being somehow damaged or unavailable.

Usually the following fixes it:

# pkg bootstrap -f


Cheers,
Franco
Title: Re: Tar segfault upgrading to 19.7
Post by: putt1ck on December 20, 2019, 11:19:03 AM
Awesome, that fixed it :)
Title: Re: [Solved] Tar segfault upgrading to 19.7
Post by: franco on December 22, 2019, 09:47:25 AM
Yay, great to hear 8)