Solved pkg killed it self twice, once because no internet, the second time reason unknown

Your added value on this thread = none. bye bye troll.

Nah.

The troll in me would tell you to delete your account and go back to Linux - since you're displaying characteristics of that community. But that wouldn't be a constructive thing to do, would it?

Re-read my last few posts (and other similar posts) in this thread a few months from now and self reflect. You'll thank us later.
 
Plus, that has happened in :

Code:
freebsd-version -kru 
14.3-RELEASE-p2 
14.3-RELEASE-p2 
14.3-RELEASE-p2[/COLOR]
82 packages in totals were not reinstalled.

pkg never said that it was going to remove them but reinstall them and fail to do so and also fail to warn the user about that failure.

That is not a behaviour one should expect from a so call stable tool for managing packages.

To resume the situation : pkg fail in a release version of FreeBSD where there is no port and binaries mixed up and were the user followed pkg is prompt saying the following package will be removed 1 packages, the following packages will be upgraded, the following package will be reinstalled, do you wish to proceed ? y/n
no hard thinking was necessary there.
 
Plus, that has happened in :

freebsd-version -kru
14.3-RELEASE-p2
14.3-RELEASE-p2
14.3-RELEASE-p2

82 packages in totals were not reinstalled.

pkg never said that it was going to remove them but reinstall them and fail to do so and also fail to warn the user about that failure.

That is not a behaviour one should expect from a so call stable tool for managing packages.

It's not. Do you have a console log?

Or do you have one from a new one? What happens now when you try?
 
It's not. Do you have a console log?

Or do you have one from a new one? What happens now when you try?
I was just checking the log because so far the only thing I did with the log is to grep the uninstalled package. But looking at the log I see, and I remember that on October 7 I did upgrade pkg is version, minimize the windows I forgot it and later disconnect the internet and at around 3 am that night pkg killed itself, the next day, I connect to the session and re-run pkg update and at one point it killed itself again but don't know why, and without me noticing, I tough the upgrade was finish, so I reboot. Re-run the command pkg update upgrade and reboot again, that's when I noticed that packages were missing. And it's consistent with time, my first post was the 8 October, at 19h48.

Code:
7 22:29:21 pkg[79337]: pkg upgraded: 2.2.2 -> 2.3.1
Oct  8 03:56:06 kernel: pid 79705 (pkg), jid 0, uid 0, was killed: failed to reclaim memory
Oct  8 16:10:12 org.kde.kded.smart[95999]: Detected locale "C" with character encoding "US-ASCII", which is not UTF-8. Qt depends on a
UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more informa
tion.
Oct  8 17:32:51 kscreenlocker_greet[84692]: in _pam_exec(): pam_sm_setcred: pam_get_authtok(): authentication token not available
Oct  8 17:51:47 pkg[136]: blas-3.12.1 installed
Oct  8 17:51:47 pkg[136]: botan3 upgraded: 3.8.1 -> 3.9.0

Oct  8 17:56:48 kernel: pid 136 (pkg), jid 0, uid 0, was killed: failed to reclaim memory
Oct  8 17:56:49 kernel: pid 61203 (firefox), jid 0, uid 1001, was killed: failed to reclaim memory
Oct  8 17:56:49 kernel: pid 16072 (wine64.bin), jid 0, uid 1001, was killed: failed to reclaim memory
Oct  8 17:56:49 kernel: pid 2444 (okular), jid 0, uid 1001, was killed: failed to reclaim memory
Oct  8 18:45:40 reboot[5714]: rebooted by free

Oct  8 18:54:59 nextdns[1616]: Connected [2a07:a8c0::]:443 (con=253ms tls=1090ms, TCP, TLS13)
Oct  8 18:56:23 pkg[2034]: pkg reinstalled: 2.3.1 -> 2.3.1
 
Oct  8 19:14:16 reboot[17547]: rebooted by free
 
Since I moved to quarterly packages a week ago, I had one run of "pkg upgrade" that would leave me with botched desktop. Pkg wanted to upgrade nvidia-kmod, new version is a mismatch for my nvidia-driver, so I had nvidia-driver marked for removal; thus I didn't upgrade then, but waited a day or two, and then pkg reported upgrade for nvidia-driver package and no packages marked for removal.
 
FWIW I did a pkg upgrade yesterday on my 14.3R box and everything seems to have worked ok. Maybe it depends on what packages are present? Or the number of packages? Anyway it appears I got lucky, everything seems to be working just the same after the upgrade. That was on a thinkpad with intel graphics. It upgraded 'pkg' itself as the first step in the process.

As I was watching the messages scrolling up the screen I did notice it seemed to be removing and reinstalling the same package more than once, I think I saw libreoffice being removed and re-installed more than once, perhaps that's just a multiple versions thing? But it's all there and working at the end, there doesn't seem to be anything missing. In fact the upgrade went very smoothly.

This is what I have now

$ pkg info | wc -l
692
$ freebsd-version -kru
14.3-RELEASE-p3
14.3-RELEASE-p3
14.3-RELEASE-p4
 
Since I moved to quarterly packages a week ago, I had one run of "pkg upgrade" that would leave me with botched desktop. Pkg wanted to upgrade nvidia-kmod, new version is a mismatch for my nvidia-driver, so I had nvidia-driver marked for removal; thus I didn't upgrade then, but waited a day or two, and then pkg reported upgrade for nvidia-driver package and no packages marked for removal.
One more for the books!

Yeah, the dependency resolution mechanism employed by pkg(8) seems to result in some interesting decisions. I use amdgpu, but I'm not willing to risk ending up with a version mismatch if I use pre-compiled packages, certainly not when a GPU driver is involved. Too many gotchas. Would be nice if that was solved in one go, like ZFS solved my partitioning headaches back when FreeBSD first came out with it in 2017...
 
Maybe it depends on what packages are present? Or the number of packages? Anyway it appears I got lucky, everything seems to be working just the same after the upgrade
Well, there are quite a few gotchas mentioned in the thread. A big one is running -RELEASE - tagged FreeBSD... Also, checking portsfallout.com for the specific repo that is enabled in
/etc/pkg/FreeBSD.conf ... switching repos is also problematic.

I'd suggest reading through this entire thread, and maybe make a troubleshooting list of all the gotchas in there. And then maybe compile a troubleshooting guide. I actually did that kind of thing in the past.

That's because being able to help people is about recognizing the stumbling blocks and being on alert for them. I think that's just a more effective way to help than just being flabbergasted at somebody's lack of ability. Hella applicable in technical support.
 
daily root /usr/sbin/pkg backup -d /var/backups/pkg-backup-$(date +\%Y\%m\%d).pkg && find /var/backups/pkg-backup-*.pkg -mtime +30 -delete I set this line in crontab so next time I'll just restore pkg's database and reinstall everything.
 
That's because being able to help people is about recognizing the stumbling blocks and being on alert for them. I think that's just a more effective way to help than just being flabbergasted at somebody's lack of ability. Hella applicable in technical support.
Umm.. flabbergasted? I was just reporting that it worked for me, and so sometimes it works. Wasn't denying the OP had problems...
don't know where you picked up 'flabbergasted' from.
 
Umm.. flabbergasted? I was just reporting that it worked for me, and so sometimes it works. Wasn't denying the OP had problems...
don't know where you picked up 'flabbergasted' from.
Yeah, 'flabbergasted' is probably not the best term to use, it's just that I'm seeing a bit of a disconnect between between successful use cases and unsuccessful ones. Being able to help people is realizing what it actually takes to bridge that disconnect.
 
Well, I was just adding another data point, as a sanity check. I won't bother next time. I don't know where you got "flabbergasted at somebody's lack of ability" from.
 
Well, I was just adding another data point. I won't bother next time. I don't know where you got "flabbergasted at somebody's lack of ability" from.
A bit like walking into a bar without realizing that there's a specific etiquette to follow. Some people know to try to cooperate and learn, some don't. Most bar regulars are usually just flabbergasted at the audacity of the new patron who just doesn't know how to behave.
 
There's a daily 411.pkg-backup periodic(8) that backs up the package database. Look in /var/backups/.
Is this those pkg.sql.xyz ???

Code:
ls /var/backups/
aliases.bak             gpart.da0.bak           group.bak               master.passwd.bak       pkg.sql.xz.2            pkg.sql.xz.6
boot.da0p2.bak          gpart.da1.bak           group.bak2              master.passwd.bak2      pkg.sql.xz.3            pkg.sql.xz.7
boot.da1.bak            gpart.da1.bak2          kern.geom.conftxt.bak   pkg.sql.xz              pkg.sql.xz.4
boot.da1p2.bak          gpart.nda0.bak          kern.geom.conftxt.bak2  pkg.sql.xz.1            pkg.sql.xz.5
 
As the fist person that introduced beadm(8) based ZFS Boot Environments to FreeBSD ... how could I help here?

Me - before each upgrade I create new ZFS Boot Environment ... and then continue ... and whenever something goes south I just rollback.

You can as well use ZFS Boot Environments with UFS using this - https://vermaden.wordpress.com/2021/04/02/ufs-boot-environments/


Hope that helps.

Regards,
vermaden
 
Last edited:
I mean, the error message should be clear enough, no?

You ran out of RAM+swapspace.
I'm very tired of these assumptions : why should it be clear for me, I mean it's clear that it wasn't because I didn't interpret it. Is it so difficult to just explain things rather than boasting like that and make one feel like he is a complete idiot? What is so difficult in saying to someone that the phrase there mean that you went out of ram and the system just started to randomly close process ?
 
I'm very tired of these assumptions : why should it be clear for me, I mean it's clear that it wasn't because I didn't interpret it. Is it so difficult to just explain things rather than boasting like that and make one feel like he is a complete idiot? What is so difficult in saying to someone that the phrase there mean that you went out of ram and the system just started to randomly close process ?
Basically, it looks like you ran out of RAM and swap space.

That actually happens to me from time to time, as well, even when I do all the commands correctly.

I normally just reboot the machine and try again, sometimes several times before things get unstuck.
 
You could try running the pkg upgrade from a console if you're using a desktop environment like gnome or kde. After booting don't log into the GUI, just hit ctrl-alt-F2 to get a terminal, log in as root and run the upgrade there. That should save a bit of memory.
 
Back
Top