libkmod2.0-udeb is not linked with pthreads

Bug #1723042 reported by Dimitri John Ledkov
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kmod (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

libkmod2.0-udeb is not linked with pthreads

When running udevadm in d-i the following happens:

udevadm: Relink `/lib/libkmod.so.2' with `/lib/libpthread.so.0' for IFUNC symbol `system'

Maybe libkmod2.0 needs a rebuild and/or fix up?

Changed in kmod (Ubuntu):
milestone: none → ubuntu-17.10
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kmod (Ubuntu):
status: New → Confirmed
Revision history for this message
lplewa (lplewa) wrote :

This issue affects the PMDK project - https://github.com/pmem/issues/issues/806

Minimal reproduction:
$ cat test.c
#include <libkmod.h>

int foo() {
 kmod_ref((void *)0);
 return 0;
}
cat main.c
void foo (void);
int main () {
 foo();
 return 0;
}
$ gcc -fPIC -c -o test.o test.c
$ gcc -shared -fPIC -o libfoo.so test.o -lc -lkmod
$ gcc -L. -o main.o main.c -lfoo -pthread
$ LD_LIBRARY_PATH=. ./main.o
./main.o: Relink `/lib/x86_64-linux-gnu/libkmod.so.2' with `/lib/x86_64-linux-gnu/libpthread.so.0' for IFUNC symbol `system'

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for the reproducer.

I cannot reproduce this on Bionic 18.04, however:

andreas@nsnx:~/x$ cat test.c
#include <libkmod.h>

int foo() {
 kmod_ref((void *)0);
 return 0;
}
andreas@nsnx:~/x$ cat main.c
void foo (void);
int main () {
 foo();
 return 0;
}
andreas@nsnx:~/x$ gcc -fPIC -c -o test.o test.c
andreas@nsnx:~/x$ gcc -shared -fPIC -o libfoo.so test.o -lc -lkmod
andreas@nsnx:~/x$ gcc -L. -o main.o main.c -lfoo -pthread
andreas@nsnx:~/x$ LD_LIBRARY_PATH=. ./main.o
andreas@nsnx:~/x$ l
total 72K
drwxr-xr-x 2 andreas andreas 7 abr 25 10:05 .
drwx-----x 78 andreas andreas 157 abr 25 10:04 ..
-rwxr-xr-x 1 andreas andreas 7,7K abr 25 10:05 libfoo.so
-rw-r--r-- 1 andreas andreas 52 abr 25 10:04 main.c
-rwxr-xr-x 1 andreas andreas 8,1K abr 25 10:05 main.o
-rw-r--r-- 1 andreas andreas 69 abr 25 10:03 test.c
-rw-r--r-- 1 andreas andreas 1,4K abr 25 10:05 test.o

Could you please verify on your end that it works in 18.04?

Changed in kmod (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oh, wait, did you say udeb?

I tried with a normal deb:
ii libkmod2:amd64 24-1ubuntu3 amd64 libkmod shared library

Revision history for this message
lplewa (lplewa) wrote :

I didn't notice that this bug is about udeb package. We are using ubuntu 17.10, and normal "deb" kmod.
$ dpkg -l | grep kmod
ii kmod 24-1ubuntu2 amd64 tools for managing Linux kernel modules
ii libkmod-dev:amd64 24-1ubuntu2 amd64 libkmod development files
ii libkmod2:amd64 24-1ubuntu2 amd64 libkmod shared library

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

17.10 is going to be EOL soon (july 2018, see https://wiki.ubuntu.com/), do you really need this on that platform? 18.04 is going to be released tomorrow and is our next LTS version.

Revision history for this message
lplewa (lplewa) wrote :

in this case we will switch to 18.04 when it will be released.

Thanks for your support.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks. I will mark this bug as fix released then since it's working in 18.04, due out tomorrow.

Changed in kmod (Ubuntu):
status: Incomplete → Fix Released
milestone: ubuntu-17.10 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.