From owner-freebsd-ports@freebsd.org Wed Oct 17 08:06:29 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89E8A10CC92A; Wed, 17 Oct 2018 08:06:29 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F28EE75474; Wed, 17 Oct 2018 08:06:28 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pg1-x52c.google.com with SMTP id t70-v6so12137542pgd.12; Wed, 17 Oct 2018 01:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nBWC+JmoHbYwaSfFgZEPmwRzziw1nHLT/sGMgFjnD0g=; b=e3b7M2MohTHGV2jpcO226YrkNYSvoVtCOxioPbJvH8rPJscp04visW2sui+pgoM5S9 OcUlI80tngO4gdfm82GXwYOddnW4h+NMLcopZhdoeiDnfoSdvGgb68UjQHUMq0FD0Wcg T2k4qEEqVyL2qOBEtHdHvIRND9xDo4tw8VlOuSkRvB//oT51zp2QW0q+1kAWialIiXrz /kHLLJ5BQ2O9dgwcjpFG8byfLKzLmW87sDAdLxN2JSbG7MZBwSAKk2uuF/Zmc8tg+bY3 vdQVbP8PSJB47SDCKFCBMlJkfifMKE3xPDzZoWNUa+uyKGiG76bwq8OvB6iLChG/WKil 0/eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=nBWC+JmoHbYwaSfFgZEPmwRzziw1nHLT/sGMgFjnD0g=; b=sVWt6+GUTkewo+VFRJcsx1Em3As4zjZmFNLz1WNTCoh+p+/O4ykq+2TXtIi5gKG7Ok hKu5tT9OrJm/qJo3WSw8/vfBlxLVI9B2j76wlaHrUxXL9aJMrmtN/2yxeM5kHAqtCOZ/ y2H6+NCIIYdL0cAtaupmAoyJRTgMM0mfpZ80dHhywOcJOOmJPHqJVxstLDz5jTdoWvQ3 GZ9co1fxcyWBzET5K1CPEl3fGIMJpQoeA6ho4Nl9Zfd4ingiCmDzHyvx/+4DxLl7HMxj Wt1E7otSKa5sKm72/oY+BTGDUj+m9TjoTFUhYwPHw0L+TDFkdJSH/jwvcGe2Cilx3+0f RrAg== X-Gm-Message-State: ABuFfoj7Rl+xg6GuTck5Y9irWQTtvBUp3eFDAUWb2+9q9agSraFVIK0M VqhHK1CzFdntMtg6A0eYnx/Nc7LxlKM= X-Google-Smtp-Source: ACcGV61b03W2cXoHmF08lmsGDIP6E5WVs8d0fudccKUhVvh+3jdMqGlI4Uh0Dx/0c/kXoKz9cIbQzw== X-Received: by 2002:a62:2bc2:: with SMTP id r185-v6mr25536034pfr.21.1539763587627; Wed, 17 Oct 2018 01:06:27 -0700 (PDT) Received: from [192.168.1.105] ([103.103.242.159]) by smtp.gmail.com with ESMTPSA id s2-v6sm21769861pfk.133.2018.10.17.01.06.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 01:06:27 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: Git segfaulting in libcrypto.so when trying to clone. To: Brennan Vincent , freebsd-current@freebsd.org, FreeBSD Ports List References: <5bc6e70a.1c69fb81.44a22.37b8SMTPIN_ADDED_MISSING@mx.google.com> From: Kubilay Kocak Message-ID: <149d6485-54a2-4d8b-99cb-aac6a3e52c33@FreeBSD.org> Date: Wed, 17 Oct 2018 19:06:23 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:63.0) Gecko/20100101 Thunderbird/63.0 MIME-Version: 1.0 In-Reply-To: <5bc6e70a.1c69fb81.44a22.37b8SMTPIN_ADDED_MISSING@mx.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2018 08:06:29 -0000 On 17/10/2018 6:34 pm, Brennan Vincent wrote: > This also happens in the stock `git` installed from `pkg`, but I have installed it also from `/usr/ports` so I could enable debug symbols and get a proper stacktrace. > > When cloning any https repo (or at least the ones from github that I tried), git segfaults in `git-remote-https`, and the core dump shows the following stack trace: > > * frame #0: 0x000000080081f36c libc.so.7`strcmp at strcmp.S:46 > frame #1: 0x0000000800d04f1d libcrypto.so.8`lh_insert [inlined] getrn(lh=, data=0x00000008013aba20) at lhash.c:434 > frame #2: 0x0000000800d04ebb libcrypto.so.8`lh_insert(lh=0x0000000801359480, data=0x00000008013aba20) at lhash.c:207 > frame #3: 0x0000000800d0f05e libcrypto.so.8`OBJ_NAME_add(name=0x0000000000000000, type=, data="m\x04") at o_names.c:202 > frame #4: 0x000000080120ab8d libcrypto.so.9`openssl_add_all_ciphers_int at c_allc.c:83 > frame #5: 0x000000080120a4b9 libcrypto.so.9`ossl_init_add_all_ciphers_ossl_ [inlined] ossl_init_add_all_ciphers at init.c:216 > frame #6: 0x000000080120a4b4 libcrypto.so.9`ossl_init_add_all_ciphers_ossl_ at init.c:205 > frame #7: 0x000000080064de28 libthr.so.3`_pthread_once(once_control=0x000000080128a3b0, init_routine=(libcrypto.so.9`ossl_init_add_all_ciphers_ossl_ at init.c:205)) at thr_once.c:97 > frame #8: 0x0000000801209b69 libcrypto.so.9`CRYPTO_THREAD_run_once(once=, init=) at threads_pthread.c:113 > frame #9: 0x0000000801209f67 libcrypto.so.9`OPENSSL_init_crypto(opts=2097228, settings=0x0000000000000000) at init.c:611 > frame #10: 0x000000080052982d libssl.so.9`OPENSSL_init_ssl(opts=2097152, settings=) at ssl_init.c:197 > frame #11: 0x0000000800525cb4 libssl.so.9`SSL_CTX_new(meth=0x0000000800b0d1d0) at ssl_lib.c:2883 > frame #12: 0x00000008004a4a92 libcurl.so.4`___lldb_unnamed_symbol655$$libcurl.so.4 + 2722 > frame #13: 0x00000008004a935f libcurl.so.4`___lldb_unnamed_symbol671$$libcurl.so.4 + 271 > frame #14: 0x000000080045b455 libcurl.so.4`___lldb_unnamed_symbol59$$libcurl.so.4 + 405 > frame #15: 0x00000008004661ca libcurl.so.4`___lldb_unnamed_symbol136$$libcurl.so.4 + 154 > frame #16: 0x000000080047c436 libcurl.so.4`___lldb_unnamed_symbol259$$libcurl.so.4 + 934 > frame #17: 0x000000080047bf0e libcurl.so.4`curl_multi_perform + 222 > frame #18: 0x000000000026a519 git-remote-https`step_active_slots at http.c:1293 > frame #19: 0x000000000026a596 git-remote-https`run_active_slot(slot=0x00000008012fa4c0) at http.c:1314 > frame #20: 0x000000000026a9f8 git-remote-https`run_one_slot(slot=0x00000008012fa4c0, results=0x00007fffffffe0f8) at http.c:1509 > frame #21: 0x000000000026dc6a git-remote-https`http_request(url="https://github.com/emacs-lsp/lsp-mode/info/refs?service=git-upload-pack", result=0x00007fffffffe298, target=0, options=0x00007fffffffe1f0) at http.c:1793 > frame #22: 0x000000000026ac5b git-remote-https`http_request_reauth(url="https://github.com/emacs-lsp/lsp-mode/info/refs?service=git-upload-pack", result=0x00007fffffffe298, target=0, options=0x00007fffffffe1f0) at http.c:1869 > frame #23: 0x000000000026ac1c git-remote-https`http_get_strbuf(url="https://github.com/emacs-lsp/lsp-mode/info/refs?service=git-upload-pack", result=0x00007fffffffe298, options=0x00007fffffffe1f0) at http.c:1910 > frame #24: 0x0000000000264fbd git-remote-https`discover_refs(service="", for_push=0) at remote-curl.c:385 > frame #25: 0x0000000000263ca2 git-remote-https`get_refs(for_push=0) at remote-curl.c:465 > frame #26: 0x000000000026361a git-remote-https`cmd_main(argc=3, argv=0x00007fffffffe470) at remote-curl.c:1369 > frame #27: 0x00000000002707d7 git-remote-https`main(argc=3, argv=0x00007fffffffe470) at common-main.c:45 > frame #28: 0x000000000026311b git-remote-https`_start(ap=, cleanup=) at crt1.c:76 Hi Brennan, git gets its HTTP/HTTPS/etc support via curl, so it's likely an issue there. > Note in particular that we jump from `libcrypto.so.9` to `libcrypto.so.8`... that seems wrong to me, but I'm not an expert. There have been many instances in the past where software (from ports/packages) ends up linked against *both* OpenSSL from base and OpenSSL from ports, due to various issues. This is probably a similar issue. The same problem can occur for anything that base provides, that can also be provided by ports, gssapi, ncurses, readline, among others come to mind. > `/lib/libcrypto.so.8` and `/lib/libcrypto.so.9` both exist for me. If both exist in base, that's interesting (and probably a problem). I only have libcrypto.so.8 on a recent (month old) CURRENT build. The openssl port (which curl can use) provides libcrypto.so.9 (in /usr/local/lib) > I can't reproduce this on a pristine install of 12.0-ALPHA10. > Some more system information might prove useful: - FreeBSD version issue is reproducible on (uname -a) - Output of ldd /usr/local/bin/curl - Using quarterly or latest packages? - What exact version (PORTVERSION/PORTREVISION) of the package / port? - Contents of /etc/make.conf, in particular, any value of DEFAULT_VERSIONS=ssl (if set) A cursory search of our Bugzilla doesn't come up with any other similar reports for either git or curl ./koobs