From owner-freebsd-current@freebsd.org Sat Aug 18 13:19:05 2018 Return-Path: Delivered-To: freebsd-current@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 AD9F2106CC4F for ; Sat, 18 Aug 2018 13:19:05 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [176.74.240.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC2D9195C for ; Sat, 18 Aug 2018 13:19:05 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 4C84978CCC; Sat, 18 Aug 2018 15:18:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X8M7_Gd7RG0w; Sat, 18 Aug 2018 15:18:57 +0200 (CEST) Received: from [192.168.11.152] (unknown [192.168.11.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 877FE78CCB for ; Sat, 18 Aug 2018 15:18:57 +0200 (CEST) Subject: Fwd: Warnings about dlclose before thread exit. __cxa_thread_call_dtors References: <4b231ed8-f853-fb7e-06a7-b1bd57028ced@digiware.nl> To: freebsd current From: Willem Jan Withagen X-Forwarded-Message-Id: <4b231ed8-f853-fb7e-06a7-b1bd57028ced@digiware.nl> Message-ID: <6a57c77d-944d-166b-07a3-263aac8fe297@digiware.nl> Date: Sat, 18 Aug 2018 15:18:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4b231ed8-f853-fb7e-06a7-b1bd57028ced@digiware.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 13:19:05 -0000 Hi, I've sent the question below to the Ceph-devel list, asking if any recent changes would be able to cause this. But then of course this could stem from FreeBSD libs, and of ports.... So the question here is if anybody has gotten these "warnings" in other tools. --WjW -------- Forwarded Message -------- Subject: Warnings about dlclose before thread exit Date: Sat, 18 Aug 2018 14:46:35 +0200 From: Willem Jan Withagen To: Ceph Development Hi, I've have upgraded to FreeBSD ALPHA 12.0, but I don't think the errors them from there. Although they could be in one of the libs that came along with the upgrade. I'm getting these warnings during rbd and ceph (maybe even more) invocations that indicate that indicate a possible problem because: === It could be possible that a dynamically loaded library, use thread_local variable but is dlclose()'d before thread exit. The destructor of this variable will then try to access the address, for calling it but it's unloaded, so it'll crash. We're using __elf_phdr_match_addr() to detect and prevent such cases and so prevent the crash. === this is from : https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/cxa_thread_atexit_impl.c Now it could be that dlclose() and thread exit are just closed to one another. But still this is hard core embedded in libc already since 2017, so I'm sort of expecting that a recent change has caused this. And as indicated it is a possible cause for crashed, because thread_exit is going to clean up things that are no longer there. Now the 20 dollar question is: Where was this introduced?? Otherwise I'll have to try and throw my best gdb capabilities at it, and try to invoke an rbd call and see where it activates this warning. --WjW