Date: Tue, 28 Feb 2017 15:02:17 +0800 From: Iblis Lin <iblis@hs.ntnu.edu.tw> To: "Simon J. Gerraty" <sjg@juniper.net> Cc: freebsd-current@freebsd.org Subject: Re: bmake core dump Message-ID: <20170228070217.GD31394@abeing> In-Reply-To: <77715.1488263237@kaos.jnpr.net> References: <20170227101044.GB31394@abeing> <65586.1488222403@kaos.jnpr.net> <20170228034153.GC31394@abeing> <77715.1488263237@kaos.jnpr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 27, 2017 at 10:27:17PM -0800, Simon J. Gerraty wrote:
> Iblis Lin <iblis@hs.ntnu.edu.tw> 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
林峻頤
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170228070217.GD31394>
