Charlie Miller
2006-Nov-15 17:08 UTC
[dtrace-discuss] entry does not match any probes for linked library
Hello. I was trying to run a simple trace based on the pid provider on the firefox binary that comes with Solaris and am getting an error. First: see which libraries are linked in: [i]bash-3.00# ldd /usr/lib/firefox/firefox-bin | head[/i] libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 [b] libmozjs.so => /usr/lib/firefox/libmozjs.so libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] libplc4.so => /usr/lib/mps/libplc4.so libnspr4.so => /usr/lib/mps/libnspr4.so libpthread.so.1 => /usr/lib/firefox/../libpthread.so.1 libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 libX11.so.4 => /usr/lib/firefox/../libX11.so.4 Then, write the D program: [i]bash-3.00# more libc.d[/i] pid$target:libmozjs.so::entry, pid$target:libxpcom_core.so::entry, pid$target:a.out::entry { @[probefunc] = count(); } Then, run it: [i]bash-3.00# dtrace -s libc.d -c "/usr/lib/firefox/firefox-bin -UILocale C -contentLocale C"[/i] dtrace: failed to compile script libc.d: line 1: probe description pid3629:libmozjs.so::entry does not match any probes If I remove the line with libmozjs.so (and leave in libxpcom_core.so) from libc.d, it works as expected. Any ideas on what is going on here and how to get probes inside libmozjs.so? Thanks!!!! Charlie This message posted from opensolaris.org
Ananth Shrinivas
2006-Nov-15 18:50 UTC
[dtrace-discuss] entry does not match any probes for linked library
Hi Charlie, Add the -Z flag to your command line. The dtrace(1M) man page should offer more details. Ananth Charlie Miller wrote:> Hello. I was trying to run a simple trace based on the pid provider on the firefox binary that comes with Solaris and am getting an error. > > First: see which libraries are linked in: > [i]bash-3.00# ldd /usr/lib/firefox/firefox-bin | head[/i] > libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 > libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 > [b] libmozjs.so => /usr/lib/firefox/libmozjs.so > libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] > libplc4.so => /usr/lib/mps/libplc4.so > libnspr4.so => /usr/lib/mps/libnspr4.so > libpthread.so.1 => /usr/lib/firefox/../libpthread.so.1 > libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 > libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 > libX11.so.4 => /usr/lib/firefox/../libX11.so.4 > > Then, write the D program: > [i]bash-3.00# more libc.d[/i] > pid$target:libmozjs.so::entry, > pid$target:libxpcom_core.so::entry, > pid$target:a.out::entry > { > @[probefunc] = count(); > } > > Then, run it: > [i]bash-3.00# dtrace -s libc.d -c "/usr/lib/firefox/firefox-bin -UILocale C -contentLocale C"[/i] > dtrace: failed to compile script libc.d: line 1: probe description pid3629:libmozjs.so::entry does not match any probes > > If I remove the line with libmozjs.so (and leave in libxpcom_core.so) from libc.d, it works as expected. > > Any ideas on what is going on here and how to get probes inside libmozjs.so? > > Thanks!!!! > > Charlie > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Charlie Miller
2006-Nov-15 18:52 UTC
[dtrace-discuss] Re: entry does not match any probes for linked
Yes! That totally worked. It not only started up, but did in fact set probes in that library. Thanks for the quick reply! Charlie This message posted from opensolaris.org
Adam Leventhal
2006-Nov-15 20:17 UTC
[dtrace-discuss] entry does not match any probes for linked library
See the end of this thread: http://www.opensolaris.org/jive/thread.jspa?threadID=18083&tstart=0 Assuming you''re running post-BrandZ bits, you''re probably hitting this bug: 6493158 pid provider having problems matching module names Adam On Wed, Nov 15, 2006 at 09:08:02AM -0800, Charlie Miller wrote:> Hello. I was trying to run a simple trace based on the pid provider on the firefox binary that comes with Solaris and am getting an error. > > First: see which libraries are linked in: > [i]bash-3.00# ldd /usr/lib/firefox/firefox-bin | head[/i] > libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 > libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 > [b] libmozjs.so => /usr/lib/firefox/libmozjs.so > libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] > libplc4.so => /usr/lib/mps/libplc4.so > libnspr4.so => /usr/lib/mps/libnspr4.so > libpthread.so.1 => /usr/lib/firefox/../libpthread.so.1 > libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 > libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 > libX11.so.4 => /usr/lib/firefox/../libX11.so.4 > > Then, write the D program: > [i]bash-3.00# more libc.d[/i] > pid$target:libmozjs.so::entry, > pid$target:libxpcom_core.so::entry, > pid$target:a.out::entry > { > @[probefunc] = count(); > } > > Then, run it: > [i]bash-3.00# dtrace -s libc.d -c "/usr/lib/firefox/firefox-bin -UILocale C -contentLocale C"[/i] > dtrace: failed to compile script libc.d: line 1: probe description pid3629:libmozjs.so::entry does not match any probes > > If I remove the line with libmozjs.so (and leave in libxpcom_core.so) from libc.d, it works as expected. > > Any ideas on what is going on here and how to get probes inside libmozjs.so? > > Thanks!!!! > > Charlie > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Dan Mick
2006-Nov-17 01:24 UTC
[dtrace-discuss] entry does not match any probes for linked library
but....presumably there are entry points in libmozjs.so; allowing dtrace to continue without probes doesn''t answer the question "why can''t it find libmozjs probe points". Charlie, IIRC, I had this problem with a binary that dynamically loaded its shared objects; maybe something is causing the .so to lazy-load (I''m not up on all the linker options that could do that), and so it''s not present when dtrace looks for it? I think there are LD env flags that can change the ld.so.1 behavior, maybe to remove the lazy-loading. Ananth Shrinivas wrote:> Hi Charlie, > > Add the -Z flag to your command line. The dtrace(1M) man page should > offer more details. > > Ananth > > Charlie Miller wrote: >> Hello. I was trying to run a simple trace based on the pid provider >> on the firefox binary that comes with Solaris and am getting an error. >> >> First: see which libraries are linked in: >> [i]bash-3.00# ldd /usr/lib/firefox/firefox-bin | head[/i] >> libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 >> libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 >> [b] libmozjs.so => /usr/lib/firefox/libmozjs.so >> libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] >> libplc4.so => /usr/lib/mps/libplc4.so >> libnspr4.so => /usr/lib/mps/libnspr4.so >> libpthread.so.1 => /usr/lib/firefox/../libpthread.so.1 >> libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 >> libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 >> libX11.so.4 => /usr/lib/firefox/../libX11.so.4 >> >> Then, write the D program: >> [i]bash-3.00# more libc.d[/i] >> pid$target:libmozjs.so::entry, >> pid$target:libxpcom_core.so::entry, >> pid$target:a.out::entry >> { >> @[probefunc] = count(); >> } >> >> Then, run it: >> [i]bash-3.00# dtrace -s libc.d -c "/usr/lib/firefox/firefox-bin >> -UILocale C -contentLocale C"[/i] >> dtrace: failed to compile script libc.d: line 1: probe description >> pid3629:libmozjs.so::entry does not match any probes >> >> If I remove the line with libmozjs.so (and leave in libxpcom_core.so) >> from libc.d, it works as expected. >> >> Any ideas on what is going on here and how to get probes inside >> libmozjs.so? >> >> Thanks!!!! >> >> Charlie >> >> >> This message posted from opensolaris.org >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Rod Evans
2006-Nov-17 01:29 UTC
[dtrace-discuss] entry does not match any probes for linked library
Dan Mick wrote:> Charlie, IIRC, I had this problem with a binary that dynamically loaded > its shared objects; maybe something is causing the .so to lazy-load (I''m > not up on all the linker options that could do that), and so it''s not > present when dtrace looks for it?ldd(1) forces the loading of all dependencies, whether they are defined lazy or not. ldd(1) -L switches to "lazy" mode. Of course, unless you actually perform any relocations, no lazy loadable objects will be loaded. Try ldd -Ld, and then ldd -Lr to see how relocations trigger lazy loads.> I think there are LD env flags that can change the ld.so.1 behavior, > maybe to remove the lazy-loading.User Commands ld.so.1(1) LD_NOLAZYLOAD, LD_NOLAZYLOAD_32, and LD_NOLAZYLOAD_64 Dependencies that are labeled for lazy loading are not loaded into memory until explicit reference to the dependency has been made. See the -z lazyload option of ld(1). When LD_NOLAZYLOAD is set to any non-null value, the runtime linker ignores a dependencies lazy loading label and loads the dependency immediately. -- Rod.
Charlie Miller
2006-Nov-17 03:05 UTC
[dtrace-discuss] Re: entry does not match any probes for linked library
For the record, (although I''m not sure what this means) I get: bash-3.00# ldd [b]-Ld [/b]/usr/lib/firefox/firefox-bin | grep firefox libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 libc.so.1 => /usr/lib/firefox/../libc.so.1 [b] libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] bash-3.00# ldd [b]-Lr[/b] /usr/lib/firefox/firefox-bin | grep firefox libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 libc.so.1 => /usr/lib/firefox/../libc.so.1 [b] libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 [b] libmozjs.so => /usr/lib/firefox/libmozjs.so[/b] libX11.so.4 => /usr/lib/firefox/../libX11.so.4 libm.so.2 => /usr/lib/firefox/../libm.so.2 This message posted from opensolaris.org
Dan Mick
2006-Nov-17 03:11 UTC
[dtrace-discuss] Re: entry does not match any probes for linked library
well: when I run ldd -L on firefox-bin, I get only libc, and when I remove the -L, I get a lot (58) more...that says to me that most of the .so''s are lazy-loading, and so I''d try running with the LD_NOLAZYLOAD env var set. Charlie Miller wrote:> For the record, (although I''m not sure what this means) I get: > bash-3.00# ldd [b]-Ld [/b]/usr/lib/firefox/firefox-bin | grep firefox > libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 > libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 > libc.so.1 => /usr/lib/firefox/../libc.so.1 > [b] libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] > > bash-3.00# ldd [b]-Lr[/b] /usr/lib/firefox/firefox-bin | grep firefox > libCrun.so.1 => /usr/lib/firefox/../libCrun.so.1 > libCstd.so.1 => /usr/lib/firefox/../libCstd.so.1 > libc.so.1 => /usr/lib/firefox/../libc.so.1 > [b] libxpcom_core.so => /usr/lib/firefox/libxpcom_core.so[/b] > libgdk-x11-2.0.so.0 => /usr/lib/firefox/../libgdk-x11-2.0.so.0 > libgtk-x11-2.0.so.0 => /usr/lib/firefox/../libgtk-x11-2.0.so.0 > [b] libmozjs.so => /usr/lib/firefox/libmozjs.so[/b] > libX11.so.4 => /usr/lib/firefox/../libX11.so.4 > libm.so.2 => /usr/lib/firefox/../libm.so.2 > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
[i]dmick wrote: well: when I run ldd -L on firefox-bin, I get only libc, and when I remove the -L, I get a lot (58) more...that says to me that most of the .so''s are lazy-loading, and so I''d try running with the LD_NOLAZYLOAD env var set.[/i] When I set this enviroment variable, it does probe all the libraries, even without the -Z flag. This is, in fact, a better approach, since with this way dtrace says the number of probes used (with -Z it doesn''t say how many probes there are in the libraries it can''t find) Thanks for your help! This message posted from opensolaris.org