NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53590: DTrace fbt_getargdesc() fails with "Unknown function"



The following reply was made to PR kern/53590; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: christos%zoulas.com@localhost (Christos Zoulas)
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/53590: DTrace fbt_getargdesc() fails with "Unknown function"
Date: Tue, 11 Sep 2018 22:55:59 +0300

 Christos Zoulas wrote:
 > You need a fully modular kernel for dtrace to work, otherwise the ctf
 > tables overflow and you only get the bupkis symbol.
 
 Looks like you are talking about the CTF typeid overflow issue discussed in
 https://mail-index.netbsd.org/tech-kern/2017/10/13/msg022436.html , but I
 believe that is a different problem.  My GENERIC kernels don't even have
 enough type entries to overflow the table:
 
 netbsd-8.0# ctfdump /netbsd | grep "total number of types"
   total number of types               = 617
 
 netbsd-current# ctfdump /netbsd | grep "total number of types"
   total number of types               = 816
 
 More to the point, this PR is about a lack of function entries, not
 type entries.  The GENERIC kernel in the 8.0 release and in the latest
 daily build both have only a single dummy function in the "Functions"
 section of the ctfdump output:
 
 - Functions ------------------------------------------------------------------
 
   [19881] FUNC (_debugsym_dummyfunc) returns: 608 args: (683)
 
 - Types ----------------------------------------------------------------------
 
 Same thing when I build a release myself using "build.sh release".
 However, if I manually build a kernel using "build.sh kernel.gdb=GENERIC",
 that not only builds a (huge) netbsd.gdb, but also overwrites the netbsd
 (without the .gdb suffix) from "build.sh release" with an only slightly
 larger one (27 megabytes instead of 26), and that one *does* include
 CTF function entries, 34956 of them, including one for vmem_alloc:
 
 # ctfdump netbsd|grep vmem_alloc
   [33669] FUNC (vmem_alloc) returns: 1 args: (29302, 1791, 29301, 29303)
 
 It seems to me this 27-megabyte kernel having the CTF function entries
 is what releases ought to install by default, not the 26-megabyte
 kernel lacking them.
 
 And until both that and the typeid overflow issue have been fixed,
 the HOWTO at https://wiki.netbsd.org/tutorials/how_to_enable_and_run_dtrace/
 needs to be changed to give instructions that actually work.
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index