From owner-freebsd-dtrace@freebsd.org Tue Dec 20 18:28:24 2016 Return-Path: Delivered-To: freebsd-dtrace@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 C7F04C89BC0 for ; Tue, 20 Dec 2016 18:28:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 807A01D20; Tue, 20 Dec 2016 18:28:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id u25so5147441qki.2; Tue, 20 Dec 2016 10:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lkIt8QxcoDIWHcTKOvmY0NGoE9CSDWQPBBrjKuxcY0U=; b=FRGj+tlWwe9V5IVu2eLTx5oRJam0epddk1nEnh26RFvvx+Mfo5nCVnEKRjGrxiRiIr th/kwr6ZWy95Ax48ZJzyGJ9yfkGmlheiDkuBbcoNcDBhryx9AncXqhH1S6QJhsjJ7iCc cU4DhRB0Db1VorOC78uOu+Y8A+oIEcmx8onU/eTzSVgjHscs3CytUfoKkfzyVKqkFObN VIWUAK2P5axe5VLZj8EGzqut0TriDlHtYVJjmEpbUXvMHPX3X6kBCJgz47iG9I93qMrg 54OfDsHdoncIfV7V9Uolv3a9KJ+y/7n4hBRZP0zBHriiKX/3uGuATNZSn7wx6aiw8bK7 6O1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=lkIt8QxcoDIWHcTKOvmY0NGoE9CSDWQPBBrjKuxcY0U=; b=KEq4Vm7SdGzeF0o85dsKFLRiH0W4815Nb+99tgapQio2ALMhj8tbOkILocUftcP4/3 Pq2+kcOU49VfvKMn7pG9n1as/iTjGyIJqood51SA5zpK3GFfENCivo5jtJKNxPjm085h HokPfMldWL5kblI0UTUDd4jixd8w+kYkRzINQvzR5BDRnUFEAmWHFVvOTwUQM73q4YH4 UYZioDg6yDS/D85EwcSKylQco1KM4PX6VMRz9ybbVhHRscSgGEGIEkfLd1jmU8xk2XZa Mq5fxVNiwLcv2IdF+20ZQpe8+gb5NdLoKzLEdZLiWqZM0ljUs8ULNSmmm3e+4/KEkjmO mUrg== X-Gm-Message-State: AIkVDXLXppjWOY6w08zRdweTwLV1Mes+sM+JXQPkUnvTNPrPm2hvgCjVTq2LmToq4Kf7Vw== X-Received: by 10.55.156.131 with SMTP id f125mr742776qke.177.1482258503443; Tue, 20 Dec 2016 10:28:23 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id m30sm13568586qta.7.2016.12.20.10.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 10:28:22 -0800 (PST) Sender: Mark Johnston Date: Tue, 20 Dec 2016 10:34:16 -0800 From: Mark Johnston To: Hiroki Sato Cc: rm@joyent.com, freebsd-dtrace@freebsd.org, swills@FreeBSD.org Subject: Re: malformed symbol Message-ID: <20161220183416.GA58737@wkstn-mjohnston.west.isilon.com> References: <20161215.075124.1459885758696268380.hrs@allbsd.org> <6b0842f5-46e8-e90e-0cc6-ec0cbe74669a@joyent.com> <20161219005342.GA57753@wkstn-mjohnston.west.isilon.com> <20161220.043229.1880233551388576235.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161220.043229.1880233551388576235.hrs@allbsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 18:28:24 -0000 On Tue, Dec 20, 2016 at 04:32:29AM +0900, Hiroki Sato wrote: > Mark Johnston wrote > in <20161219005342.GA57753@wkstn-mjohnston.west.isilon.com>: > > ma> On Wed, Dec 14, 2016 at 02:56:12PM -0800, Robert Mustacchi wrote: > ma> > On 12/14/16 14:51 , Hiroki Sato wrote: > ma> > > This was reproducible on 11.x and 12.x, not on 10.x. Could anyone > ma> > > try this and let me know if this is reproducible on your 11.x or 12.x > ma> > > box? I guess this is a regression of symbol rewrite routine such as > ma> > > s/__/-/ in the dtrace utility while I have not investigated the > ma> > > details yet. Or am I missing something here? > ma> > > ma> > We've seen something similar on illumos that corresponds with newer > ma> > binutils versions (2.26). See https://www.illumos.org/issues/6653. > ma> > ma> I wrote a hacky patch[1] which modifies libdtrace such that it appends > ma> the modified symbol name to the strtab instead of modifying the original > ma> name, and updates the symbol to point to the new entry. It seems to > ma> address the issue. > ma> > ma> I then wondered why we update the strtab in the first place. The code > ma> uses the modified string to look up the probe corresponding to the > ma> relocation that designates the probe site. Why can't we copy the symbol > ma> name to a buffer, call strhyphenate() on that, and use it for the lookup > ma> instead? Once the probe sites are recorded in the DOF, we shouldn't care > ma> about the symbol name. I implemented this too[2] and haven't hit any > ma> problems with some quick testing. > ma> > ma> [1] https://people.freebsd.org/~markj/patches/libdtrace_symname_swizzle.diff > ma> [2] https://people.freebsd.org/~markj/patches/libdtrace_symname_swizzle2.diff > > Thank you. I tried [2] and it worked well. If it has no regression > it looks better to me. Thanks! I committed a modified version of [2] as r310332.