Child process pid=##### terminated abnormally: Bus error

After I have installed updates today pkg began to throw the error in subject and dump its core (static does the same).
So I cannot install any packages or make install any ports.
Any ideas how to fix this?

FreeBSD somehost 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
 
Code:
# pkg-static -d update
DBG(1)[32401]> pkg initialized
Updating FreeBSD repository catalogue...
DBG(1)[32401]> PkgRepo: verifying update for FreeBSD
DBG(1)[32401]> Pkgrepo, begin update of '/var/db/pkg/repo-FreeBSD.sqlite'
DBG(1)[32401]> Request to fetch pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/meta.conf[/URL]
DBG(1)[32401]> opening libfetch fetcher
DBG(1)[32401]> Fetch > libfetch: connecting
DBG(1)[32401]> Fetch: fetching from: [URL]http://pkgmir.geo.freebsd.org/FreeBSD:13:amd64/quarterly/meta.conf[/URL] with opts "i"
DBG(1)[32401]> Request to fetch pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.pkg[/URL]
DBG(1)[32401]> opening libfetch fetcher
DBG(1)[32401]> Fetch > libfetch: connecting
DBG(1)[32401]> Fetch: fetching from: [URL]http://pkgmir.geo.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg[/URL] with opts "i"
DBG(1)[32401]> Request to fetch pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.txz[/URL]
DBG(1)[32401]> opening libfetch fetcher
DBG(1)[32401]> Fetch > libfetch: connecting
DBG(1)[32401]> Fetch: fetching from: [URL]http://pkgmir.geo.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz[/URL] with opts "i"
FreeBSD repository is up to date.
All repositories are up to date.
 
Last edited by a moderator:
Maybe if you remove "pkg-static" using pkg del pkg it will download it again the next time you try to install a package. But better to wait for someone else to confirm this.
 
That did it. Installed some package w/o error.
Thanks a lot!

Do we know/are we able to find out what the problem was?
 
It just did it again, as I was making a port:

===> Registering installation for libtextstyle-0.21 as automatic
Installing libtextstyle-0.21...
Child process pid=19098 terminated abnormally: Bus error
*** Error code 138

Went to the VM and found that its screen is covered in

vm_fault: pager read error, pid ##### (pkg-static)

I never had this issue until 13 came up. Will have to scrap it and use other options.
 
try
Code:
mv /var/db/pkg/local.sqlite  /var/db/pkg/local.sqlite.bak
echo .dump |sqlite3 /var/db/pkg/local.sqlite.bak |sqlite3 /var/db/pkg/local.sqlite
 
just read the pkg(8) about pkg-static

pkg-static is a statically linked variant of pkg typically only used for the initial installation of pkg.

Edit:
if pkg(8) failed to execute due to some lib mismatch then pkg-static can be used to reinstall pkg otherwise you can't use pkg delete -f pkg as it will also fail. So you have to use pkg-static or /usr/sbin/pkg (7) to bootstrap pkg(8)
 
Back
Top