From owner-freebsd-toolchain@freebsd.org Tue Mar 15 12:19:25 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA4FEAD0234 for ; Tue, 15 Mar 2016 12:19:25 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C78DD197 for ; Tue, 15 Mar 2016 12:19:25 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: by mailman.ysv.freebsd.org (Postfix) id C6655AD0233; Tue, 15 Mar 2016 12:19:25 +0000 (UTC) Delivered-To: toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5FB1AD0232 for ; Tue, 15 Mar 2016 12:19:25 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (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 90C62196 for ; Tue, 15 Mar 2016 12:19:25 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 46A0D153430 for ; Tue, 15 Mar 2016 13:19:17 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CFHWErR1Syov; Tue, 15 Mar 2016 13:19:14 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:74da:8ef4:6da7:d3d2] (unknown [IPv6:2001:4cb8:3:1:74da:8ef4:6da7:d3d2]) by smtp.digiware.nl (Postfix) with ESMTP id 3E058153416 for ; Tue, 15 Mar 2016 12:41:15 +0100 (CET) To: toolchain@freebsd.org From: Willem Jan Withagen Subject: Crash in ostream < Date: Tue, 15 Mar 2016 12:41:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 12:19:26 -0000 Hi, While running Ceph tools I get a crash in fr 10 #10 0x00000000016d82ca in FileStore::omap_get_values(coll_t const&, ghobject_t const&, std::__1::set, std::__1::allocator >, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > > > const&, std::__1::map, std::__1::allocator >, ceph::buffer::list, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, ceph::buffer::list> > >*) () (gdb) l 95 int preload_erasure_code() 96 { 97 string plugins = g_conf->osd_erasure_code_plugins; 98 stringstream ss; 99 int r = ErasureCodePluginRegistry::instance().preload( 100 plugins, 101 g_conf->erasure_code_dir, 102 &ss); 103 if (r) 104 derr << ss.str() << dendl; (gdb) 105 else 106 dout(10) << ss.str() << dendl; 107 return r; 108 } 109 All of this seems to be inlined since I'm not able to get at ss or r #8 0x0000000000e16145 in std::__1::char_traits::length (__s=0x0) at /usr/include/c++/v1/string:640 640 static inline size_t length(const char_type* __s) {return strlen(__s);} Looking at the strlen implementation in /usr/srcs/head/src/lib/libc/string/strlen.c shows that strlen does not take 0x0 as pointer, so when we get here with __s = 0x0 all is lost. So I tried running it through 3.7, but since this is in the libraries with the bintools/os, I'd expect both versions to crash on this. Now the question I have to solve: is it the compiler/toolset/libraries is it a bug in the ceph code. --WjW