Solved glib - undefined symbol pthread_setname_np@FBSD_1.6

My machines are configured to update over night and for the most part they do without issue. However, this am, packages were updated, but it appears an important library is broken or at least isn't quite right as none of my Xorg applications want to run (terminal, file manager, chromium, firefox, etc.).

Checking my logs, I see that glib was upgraded from 2.66.4_1 to 2.66.7. I tried reinstalling glib, downgrading glib (unable to find the old version 2.66.4_1), installing some pthread libraries, all to no avail.

I'm hesitant to go to the ports and try building 2.66.4_1 there assuming I can revert to that version.

How can I get this working again?

Lastly:
Did I configure something incorrectly? Is it a bad idea to automatically update packages overnight especially if I'm not leveraging boot environments to ensure I have a stable system to roll back to?
 
FBSD_1.6 refers to FreeBSD 13.0. Did you accidentally install 13 packages on 12.2?


Is it a bad idea to automatically update packages overnight especially if I'm not leveraging boot environments to ensure I have a stable system to roll back to?
I never do this, I like to keep control when, where and what gets updated. So I update by hand and would only attempt to install automatically if/when I ran the updates on a test system first. It's always possible things break, having production systems blindly do automatic updates is just tempting fate.
 
I just ran freebsd-update upgrade -r 12.2 as I have been on 12.1 and am rebooting...
Ah, still on 12.1 doesn't help of course. Still odd though, why it refers to a symbol that's supposedly for FreeBSD 13.0.
 
SirDice what is the "correct" way to keep my system up-to-date if I want to accept the risk of unattended consequences?

I run this nightly:

pkg update
pkg upgrade -y

freebsd-update fetch install

Aside from the commands above, I think what I should do is check if there are updates, and then if there are, create a new BE, boot into that, then apply the updates. If anything goes awry, then I can easily switch BE's.
 
Ah, still on 12.1 doesn't help of course. Still odd though, why it refers to a symbol that's supposedly for FreeBSD 13.0.
If you check in /usr/src/lib/libc/Versions.def on 12.1 it says:
Code:
# This is our first version; it depends on no other.
# This version was first added to 7.0-current.
FBSD_1.0 {
};

# This version was first added to 8.0-current.
FBSD_1.1 {
} FBSD_1.0;

# This version was first added to 9.0-current.
FBSD_1.2 {
} FBSD_1.1;

# This version was first added to 10.0-current.
FBSD_1.3 {
} FBSD_1.2;

# This version was first added to 11.0-current.
FBSD_1.4 {
} FBSD_1.3;

# This version was first added to 12.0-current.
FBSD_1.5 {
} FBSD_1.4;

# This version was first added to 13.0-current.
FBSD_1.6 {
} FBSD_1.5;

# This is our private namespace.  Any global interfaces that are
# strictly for use only by other FreeBSD applications and libraries
# are listed here.  We use a separate namespace so we can write
# simple ABI-checking tools.
#
# Please do NOT increment the version of this namespace.
FBSDprivate_1.0 {
} FBSD_1.6;

So the symbol linkage is correct as packages get built. However, as you said, the OP's approach to updating is fraught with danger and I am surprised this hasn't bitten him in the backside before.
 
Why do you want to open the screen door and let all the bugs come in? Then you have to spend hours with bug spray and swatters trying to get rid of them all.

Look, I have great respect for the porters and developers, but bugs happen and unless you're experiencing something bad with a package, you're best to leave your system and your packages in a stable state. If there's some amazing update that you need, then get it, otherwise leave well enough alone (IMHO).

If you love living on the edge, then updating FreeBSD is 'safer' than updating packages every day. Some packages get built, then there's an oops moment and it's rebuilt because of a regression or some bug. If you pick this bug up in your daily ad-hoc updates, the result is your posting here and the wasting of your time.

FreeBSD updates (points) are rarely going to see anything but bug fixes and maybe some tweaks; anything more dramatic is left for a major release.
 
Hi Mark,

Thanks for your analogy. So, if I understand correctly, then I really should drop the pkg update and pkg upgrade commands and instead just use freebsd-update? That works for me, I don't need the latest and greatest, just something that works day in and day out. Hopefully I can learn in the process of what I should do.
 
I am having this same problem. Upgraded to 12.2 p4, and did a pkg update/upgrade, and it showed a kernel mismatch. I said to ignore it, and I think I've installed packages for 13 by accident, as now many gui applications no longer work. At least one of them is throwing the same error as above.

Any advice on how to downgrade my packages to 12.2?
 
Something is weird here, cause I have symbol version 1.6 on 12.2:
Code:
$ objdump -TC /usr/lib/libpthread.so | grep pthread_setname_np
000000000000e0f0  w   DF .text	00000000000002a7  FBSD_1.6    pthread_setname_n

$ freebsd-version -ku
12.2-RELEASE-p3
12.2-RELEASE-p3
 
Yeah, I think it was added some time during 12.2 even though the wiki page says it's for 13.0. Everybody that seems to have this problem appears to have an older 12.x kernel and/or userland and is installing recent 12.2 packages.

This looks like the cause: https://svnweb.freebsd.org/base?view=revision&revision=340607

I suspect the FBSDprivate_1.0 shouldn't have been changed here. Only the addition of FBSD1.6 with the dependency on FBSD1.5. It then found it's way into 12.2-RELEASE.
 
Do you have a custom kernel? Then you need to upgrade it yourself. Post the output of freebsd-version -uk.
I don't. I have a few additional kernel modules loaded, stuff like if_epair, nvidia, pefs, cuse, snd_uaudio, and pf. But I don't think any of that should matter.

I ran the same command as above objdump -TC /usr/lib/libpthread.so | grep pthread_setname_np and got the exact same output. Checked uname -a and my version and everything. Somewhere betwee 12.2 p1 and 12.2 p4 this occurred (I haven't upgraded since p1).

I still don't know how to fix this. Firefox and telegram-desktop in particular aren't working for me, throwing the same error about the undefined symbol related to 13.0.
 
I ran the same command as above objdump -TC /usr/lib/libpthread.so | grep pthread_setname_np and got the exact same output.
Are you sure about that? If it indeed shows FBSD_1.6, you DO have the symbol in the required version. Then check again whether your error message indeed complains about THAT symbol, cause that really doesn't make sense.

throwing the same error about the undefined symbol related to 13.0.
As already clarified, it isn't necessarily related to 13.0 but was introduced with 12.2
 
Someone should update some docs to avoid selling weird-colored fish.
It's the drugs man... :D

Somewhere betwee 12.2 p1 and 12.2 p4 this occurred
That's a clue. But I've gone through all the changes in releng/12.2 (not that many actually) between p1 and p4. And nothing related seems to have changed with regards to the kernel or userland. So I'm more leaning towards some changes in the ports tree that happened around that time frame that might be involved. I don't think it's specific to devel/glib20 as I've seen others with a similar error. Maybe some (global) compiler setting was changed, I don't know. I'm drawing blanks at the moment.
 
Well, in terms of WTF, I'd order it like this:

0. Adding a new symbol version with a new major release (yep, that's the expected one)
1. Adding a new symbol version with a new minor release
2. Adding a new symbol version with a new patchlevel

Definitely unwilling to believe (2) ever happened ;)
 
Ok, great research! Then I still have a theory in mind that maybe, individual symbols jumped to FBSD_1.6 (from whatever they were before) with the release of 12.2. This would explain the trouble some people run into with packages built for/on 12.2 when still having a 12.1 userland. Then the solution would still be simple: upgrade.

Of course, this could *also* happen with patchlevels, but then my head would explode…
 
I suppose it's time for me to describe in a bit more detail what I am experiencing.

I upgraded host from 12.2-p1 to 12.2-p4 , where I run xorg/i3wm, but all GUI stuff is done in jails. I deleted my GUI jail_template, re-installed, updated, and added the packages. Process looks something like this (0kde being the name of the gui jail template):

Code:
zfs create zroot/jails/0kde
bsdinstall jail /jails/0kde
jail -c 0kde
freebsd-update -b /jails/0kde fetch install
jexec -l -U root 0kde /bin/csh
pkg update

And here I come to the first error/clue:
Code:
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[0kde] Installing pkg-1.16.3...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1202000
- running kernel: 1201000
Ignore the mismatch and continue? [y/N]:
I have updated both jail and host, the output of uname -a for both is: FreeBSD 0kde 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC amd64

I have also tried rebooting (of course). Ignoring the mismatch, I continue, installing nvidia-driver, xorg, qt5, gtk, falkon, firefox, telegram-desktop, libreoffice, etc...

Upon starting a GUIjail based on the template, I am able to open Falkon, xcalc, and a limited set of GUI applications. However, when attempting to run Firefox, Libreoffice, and Telegram-desktop, here are my errors (from inside the jail "corporate"):
Code:
corporate@corporate:~ % telegram-desktop

(process:81310): Telegram-WARNING **: 17:50:20.769: GTK integration was disabled on build or in runtime. This will lead to clipboard issues and a lack of some features (like Auto-Night Mode or system window controls layout).
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-corporate'
Telegram-Message: 17:50:20.977: You can disable tray icon counter with TDESKTOP_DISABLE_TRAY_COUNTER and make it look better if it is monochrome.
ld-elf.so.1: /usr/local/lib/libglib-2.0.so.0: Undefined symbol "pthread_setname_np@FBSD_1.6"
corporate@corporate:~ % firefox
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=0.369654) [GFX1-]: No GPUs detected via PCI
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: No GPUs detected via PCI (t=0.369654) |[1][GFX1-]: glxtest: process failed (received signal 11) (t=0.36984) [GFX1-]: glxtest: process failed (received signal 11)
ld-elf.so.1: /usr/local/lib/libglib-2.0.so.0: Undefined symbol "pthread_setname_np@FBSD_1.6"
corporate@corporate:~ % libreoffice
ld-elf.so.1: /usr/local/lib/libreoffice/program/libuno_sal.so.3: Undefined symbol "pthread_setname_np@FBSD_1.6"
corporate@corporate:~ %
And here is the output from running the command that Zirias provided. Inside the jail, I get no return, but from host, I get the following:
Code:
root@dom0:~ # objdump -TC /usr/lib/libpthread.so | grep pthread_setname_np
000000000000e0f0  w   DF .text  00000000000002a7  FBSD_1.6    pthread_setname_np
Finally, I have one more error which might be relevant, as regarding upgrading the 0kde the gui template. When doing so, I am unable to install some of the packages related to blacklisted certs/ssl. I put this at the end, because I'm not sure if it's relevant, but just in case...
Code:
root@dom0:~ # freebsd-update -b /jails/0kde fetch install
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 12.2-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
The following files will be added as part of updating to
12.2-RELEASE-p4:
/etc/ssl/blacklisted/2c543cd1.0
/etc/ssl/blacklisted/2e4eed3c.0
/etc/ssl/blacklisted/480720ec.0
/etc/ssl/blacklisted/7d0b38bd.0
/etc/ssl/blacklisted/8867006a.0
/etc/ssl/blacklisted/ad088e1d.0
/etc/ssl/blacklisted/b204d74a.0
/etc/ssl/blacklisted/ba89ed3b.0
/etc/ssl/blacklisted/c089bbbd.0
/etc/ssl/blacklisted/e2799e36.0
/etc/ssl/certs/3fb36b73.0
/usr/share/certs/blacklisted/GeoTrust_Global_CA.pem
/usr/share/certs/blacklisted/GeoTrust_Primary_Certification_Authority.pem
/usr/share/certs/blacklisted/GeoTrust_Primary_Certification_Authority_-_G3.pem
/usr/share/certs/blacklisted/GeoTrust_Universal_CA.pem
/usr/share/certs/blacklisted/GeoTrust_Universal_CA_2.pem
/usr/share/certs/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem
/usr/share/certs/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem
/usr/share/certs/blacklisted/thawte_Primary_Root_CA.pem
/usr/share/certs/blacklisted/thawte_Primary_Root_CA_-_G2.pem
/usr/share/certs/blacklisted/thawte_Primary_Root_CA_-_G3.pem
/usr/share/certs/trusted/NAVER_Global_Root_Certification_Authority.pem
Installing updates...install: /jails/0kde//usr/share/certs/blacklisted/GeoTrust_Global_CA.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/GeoTrust_Primary_Certification_Authority.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/GeoTrust_Primary_Certification_Authority_-_G3.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/GeoTrust_Universal_CA.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/GeoTrust_Universal_CA_2.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/thawte_Primary_Root_CA.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/thawte_Primary_Root_CA_-_G2.pem: No such file or directory
install: /jails/0kde//usr/share/certs/blacklisted/thawte_Primary_Root_CA_-_G3.pem: No such file or directory
install: /jails/0kde//usr/share/certs/trusted/NAVER_Global_Root_Certification_Authority.pem: No such file or directory
Scanning /jails/0kde/usr/local/share/certs for certificates...
pwd_mkdb: /jails/0kde/etc/master.passwd: No such file or directory
done.
root@dom0:~ #

Sorry for providing such a long descrption, but I just want to make sure I'm not on a red herring, or having missed some obvious step. Thank you very much for your help.
 
Back
Top