From owner-freebsd-current@freebsd.org Tue Feb 28 07:02:24 2017 Return-Path: Delivered-To: freebsd-current@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 1F714CF1AC8 for ; Tue, 28 Feb 2017 07:02:24 +0000 (UTC) (envelope-from iblis@hs.ntnu.edu.tw) Received: from mail.hs.ntnu.edu.tw (mail.hs.ntnu.edu.tw [140.131.149.3]) (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 DD347DB5 for ; Tue, 28 Feb 2017 07:02:23 +0000 (UTC) (envelope-from iblis@hs.ntnu.edu.tw) Received: by mail.hs.ntnu.edu.tw (Postfix, from userid 800) id 571031C6444; Tue, 28 Feb 2017 15:02:19 +0800 (CST) Received: from abeing (IP-215-9.cs.nctu.edu.tw [140.113.215.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: iblis@hs.ntnu.edu.tw) by mail.hs.ntnu.edu.tw (Postfix) with ESMTPSA id 203781C6410; Tue, 28 Feb 2017 15:02:19 +0800 (CST) Date: Tue, 28 Feb 2017 15:02:17 +0800 From: Iblis Lin To: "Simon J. Gerraty" Cc: freebsd-current@freebsd.org Subject: Re: bmake core dump Message-ID: <20170228070217.GD31394@abeing> References: <20170227101044.GB31394@abeing> <65586.1488222403@kaos.jnpr.net> <20170228034153.GC31394@abeing> <77715.1488263237@kaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <77715.1488263237@kaos.jnpr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-Bogosity: Ham, tests=bogofilter, spamicity=0.412797, version=1.2.4 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 28 Feb 2017 07:02:24 -0000 On Mon, Feb 27, 2017 at 10:27:17PM -0800, Simon J. Gerraty wrote: > Iblis Lin wrote: > > Accutally, I made it core dump via a julia script. > > Please checkout this code > > I'm not familiar with juila, in most scripting languages > cmd = `/usr/bin/make -f - -V MAKE_ENV` > would run that command and assign the output to cmd. > The make instance would be reading from stdin which is rather unknown at > that point. Accutally, the backtick is a syntax sugar in julia to construct a Cmd object. it's not being executed at that point. FYI: julia> cmd = `ls /nonexists` `ls /nonexists` julia> run(cmd) ls: /nonexists: No such file or directory ERROR: failed process: Process(`ls /nonexists`, ProcessExited(1)) [1] Stacktrace: [1] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66 [2] macro expansion at ./REPL.jl:97 [inlined] [3] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73 julia> typeof(cmd) Cmd > > Could you perhaps run that with ktrace? > > Eg. > > ktrace -i -t cnis -f /var/tmp/make.kt whatever command you ran > kdump -m 128 -f /var/tmp/make.kt > /var/tmp/make.kd > > that would show what make is actually reading > I uploaded the ktrace to the gist: https://gist.github.com/iblis17/0beff3e1b4fcb7eac9df5889cd3ddde7#file-make-kd-L2733-L2853 -- Iblis Lin 林峻頤