Hello, I use FreeBSD 10-STABLE. When security/openssl built with ASM flag enabled, it lead to random segfaults in each application which linked with libcrypto.so or libssl.so. At least dovecot2, exim, uwsgi, php5-openssl. For example "git" which linked with /usr/local/lib/libcrypto.so.8: openssl-1.0.2_14 with ASM flag enabled: # git pull git-remote-https: environment corrupt; missing value for SUDO_GID error: Could not set GIT_DIR to '.git' git-remote-https: environment corrupt; missing value for SUDO_GID Already up-to-date. openssl-1.0.2_14 without ASM flag enabled: # git pull Already up-to-date. uwsgi won't start with the similar error. exim segfaults when starting child process of mail delivery. Thank you!
unable to reproduce on FreeBSD 10.3 amd64 Make sure after changing options to have old openssl ports deinstalled and rebuild clean: cd /usr/ports/security/openssl && make clean all test [...] OpenSSL 1.0.2h 3 May 2016 built on: reproducible build, date unspecified platform: BSD-x86_64 options: bn(64,64) md2(int) rc4(8x,char) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: cc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall -O2 -pipe -g -fstack-protector -fno-strict-aliasing -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM OPENSSLDIR: "/usr/local/openssl" Please rebuild the apps using this, and see is the problem vanish.
(In reply to Dirk Meyer from comment #1) I ran: cd /usr/ports/security/openssl && make clean all test ...but the problem still exisis. uwsgi failes to start. In log file I see: !!! uWSGI process 52102 got Segmentation Fault !!! I'm trying to understand why uwsgi process doesn't create core dump when it segfaults. Coredumps are enabled: # sysctl -a | grep core kern.corefile: /var/tmp/%U.%N.core kern.nodump_coredump: 1 kern.coredump: 1 kern.capmode_coredump: 1 kern.sugid_coredump: 1 kern.coredump_pack_vmmapinfo: 1 kern.coredump_pack_fileinfo: 1 debug.ncores: 5 debug.elf32_legacy_coredump: 1 debug.elf64_legacy_coredump: 1
upstream the asm option is no longer supported for amd64 The options was now removed from the port.
It looks like the following happened: Build with non-ASM ports OpenSSL indirectly via e.g. git. User trying out OpenSSL ASM option, breaking ABI. User reverting to non-ASM option, ABI restored. It's likely that this isn't a bug.