FS#73776 - [glibc] Programs needing pthread_yield can't run with new glibc 2.35

Attached to Project: Community Packages
Opened by Curtis (foxcm2000) - Sunday, 13 February 2022, 17:50 GMT
Last edited by freswa (frederik) - Sunday, 13 February 2022, 19:36 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
freswa (frederik)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Earlier versions of glibc provided the pthread_yield function (https://man7.org/linux/man-pages/man3/pthread_yield.3.html) This function has been deprecated, but older programs rely on it, and in my case that means Age of Wonders 3 under Steam that will not run with the newest glibc (lib32-glibc to be precise) packages.

If glibc absolutely has to not include pthread_yield anymore either because it's not in there or for security then I'll look for a work-around, but if it is possible to compile glibc with pthread_yield then it could help with compatibility in these older applications.


Additional info:
* package version: glibc 2.35 (64 and 32 bit versions)

* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
Install glibc 2.35
Run any program requiring pthread_yield and it will fail.
This task depends upon

Closed by  freswa (frederik)
Sunday, 13 February 2022, 19:36 GMT
Reason for closing:  Won't fix
Comment by freswa (frederik) - Sunday, 13 February 2022, 18:32 GMT
The function is still there, it has been moved from libpthread to libc:

commit c2fd60a5861efef48252f5cc7efc70e1d8a0da9a
Author: Florian Weimer <fweimer@redhat.com>
Date: Mon May 3 09:23:17 2021 +0200

nptl: Move pthread_yield into libc, as a compatibility symbol

And deprecate it in <pthread.h>, redirecting it to sched_yield
for the time being.

The symbol was moved using scripts/move-symbol-to-libc.py.

No GLIBC_2.34 symbol version is added because of the compatibility
symbol status.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Comment by Curtis (foxcm2000) - Sunday, 13 February 2022, 18:51 GMT
Interesting, so I'm trying to figure out why this library from the game can't find the symbol. It's a library called "libiggy_linux.so" and here's its ldd output:

ldd ./libiggy_linux.so
linux-gate.so.1 (0xf7f6f000)
libm.so.6 => /usr/lib32/libm.so.6 (0xf7ce5000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7cc7000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf7a97000)
/usr/lib/ld-linux.so.2 (0xf7f71000)

No direct reference to libpthread in there, but I know that libpthread is part of the libc package.

Let me know if there are any other debug commands I can run to track this down or if there's an environment variable I can set to get the application to see the right library and we can close this out.

Edit: running "nm" against the libraries, I can confirm that the libiggy_linux.so references pthread_yield but doesn't define it ("U") and that the newest version of glibc.so.6 does in fact define pthread_yield (00174a30 T pthread_yield@GLIBC_2.2). So now I'm just more confused!



Comment by freswa (frederik) - Sunday, 13 February 2022, 19:35 GMT
I don't think we can do much about this issue. If you think we can do something on the package level, please feel free to request to open this issue again.

Loading...