Bug 221167 - pthreads unstable after botched upgrade
Summary: pthreads unstable after botched upgrade
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: threads (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-threads (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-02 04:46 UTC by doctor
Modified: 2018-04-13 14:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doctor 2017-08-02 04:46:48 UTC
All right

1)  Up to 28 July 2017  I was able to compile a openssl 1.0.2 mightly release
with FIPS.

On 29 July , I get

f [ -n "libcrypto.so.1.0.0 libssl.so.1.0.0" ]; then  (cd ..; make libcrypto.so.1.0.0);  fi
[ -z "libcrypto" ] || /usr/local/bin/clang40 -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall -DOPENSSL_EXPERIMENTAL_JPAKE -DOPENSSL_EXPERIMENTAL_STORE -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -I/usr/local/ssl/fips-2.0/include -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -Iinclude  -DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso   /usr/local/ssl/fips-2.0/lib/fips_premain.c /usr/local/ssl/fips-2.0/lib/fipscanister.o  libcrypto.a 
/usr/lib/libpthread.so: undefined reference to `__sys_clock_nanosleep at FBSDprivate_1.0'
/usr/lib/libpthread.so: undefined reference to `__sys_fdatasync at FBSDprivate_1.0'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[2]: stopped in /usr/source/openssl-1.0.2-stable-SNAP-20170729
*** Error code 1

Stop.
make[1]: stopped in /usr/source/openssl-1.0.2-stable-SNAP-20170729/crypto
*** Error code 1

Stop.
make: stopped in /usr/source/openssl-1.0.2-stable-SNAP-20170729


Huh??

2)

Updating dns/bind911  with threads

checking for fseeko... yes
checking for static inline breakage... no
checking for size_t... (cached) yes
checking for ssize_t... (cached) yes
checking for uintptr_t... (cached) yes
checking for socklen_t... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for long long... yes
checking for uname... yes
checking for GCC noreturn attribute... yes
checking for struct lifconf... no
checking for kqueue... yes
checking epoll support... no
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking devpoll.h usability... no
checking devpoll.h presence... no
checking for devpoll.h... no
checking if unistd.h or sys/types.h defines fd_set... yes
checking whether byte ordering is bigendian... no
checking GeoIP.h usability... yes
checking GeoIP.h presence... yes
checking for GeoIP.h... yes
checking for library containing GeoIP_id_by_addr_gl... -lGeoIP
checking for library containing fabsf... -lm
checking for GeoIP support... yes
checking for GeoIP Country IPv6 support... yes
checking for GeoIP City IPv6 support... yes
checking for GSSAPI library... disabled
checking for random device... using "/dev/random"
checking for arc4random... (cached) yes
checking for arc4random_stir... yes
checking for arc4random_addrandom... yes
checking whether to build with thread support... yes
checking for gcc -pthread support... no
checking for pthread_create in -lpthread... no
checking for thread_create in -lthr... no
checking for pthread_create in -lc_r... no
checking for pthread_create in -lc... no
configure: error: "could not find thread libraries"
===>  Script "configure" failed unexpectedly.
Please report the problem to mat at FreeBSD.org [maintainer] and attach the
"/usr/ports/dns/bind911/work/bind-9.11.2/config.log" including the output of
the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/dns/bind911
*** Error code 1

Stop.
make: stopped in /usr/ports/dns/bind911


All right yet on my other server running a similar hardware configuration
no errors.

What gives?

Also, the FreBSD 11.0 -> 11.1 did not go as smoothly as expected.
Comment 1 Ed Maste freebsd_committer 2018-04-13 13:46:23 UTC
I'd suggest that you post to the freebsd-stable mailing list if this issue persists; you're more likely to get a timely response for questions about build failures and such there.

(Also, I haven't encountered the issues you reported here.)
Comment 2 Eric van Gyzen freebsd_committer 2018-04-13 14:52:03 UTC
Those two syscalls were added between 11.0 and 11.1.  It sounds like you have an 11.0 libc.  Try this:

$ objdump -T /lib/libc.so.7 | grep clock_nanosleep
00000000000e9a00 g    DF .text	0000000000000011  FBSDprivate_1.0 __sys_clock_nanosleep
000000000004cb10  w   DF .text	000000000000000e  FBSD_1.5    clock_nanosleep

$ objdump -T /lib/libc.so.7 | grep fdatasync
00000000000e99e0 g    DF .text	0000000000000011  FBSDprivate_1.0 __sys_fdatasync
00000000000e99e0  w   DF .text	0000000000000011  FBSDprivate_1.0 _fdatasync
000000000004ca20 g    DF .text	000000000000000b  FBSD_1.5    fdatasync

You should see output similar to the above.  If you see no output, you need to get /lib/libc.so.7 from 11.1.  Of course, there may be many other files out-of-sync, so you should take more complete measures to get your system into a known-good state.