Jesus Cea
2011-Dec-03 19:16 UTC
[dtrace-discuss] Spurious and inconsistente "does not match any probes"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Working in the development of Python DTrace probes, I am launching the tests using dtrace with the "-c" command. Lately, and inconsistently, I am getting "does not match any probes" error. The only change in the sourcecode is the addition of a completely unrelated global variable in the sourcecode. Doing "dtrace -l -n "python\$target:::" -c ./python" I get the error "dtrace: invalid probe specifier python$target:::: probe description python6961::: does not match any probes". But launching the python interpreter manually with "./python" and then doing "dtrace -l -n "python*:::"", I get the right answer: """ ID PROVIDER MODULE FUNCTION NAME 60946 python7293 libpython3.3m.so.1.0 PyEval_EvalFrameEx function-entry 60947 python7293 libpython3.3m.so.1.0 PyEval_EvalFrameEx function-return 60948 python7293 libpython3.3m.so.1.0 _PyObject_GC_Malloc gc-done 60949 python7293 libpython3.3m.so.1.0 PyGC_Collect gc-done 60950 python7293 libpython3.3m.so.1.0 gc_collect gc-done 60951 python7293 libpython3.3m.so.1.0 _PyObject_GC_Malloc gc-start 60952 python7293 libpython3.3m.so.1.0 PyGC_Collect gc-start 60953 python7293 libpython3.3m.so.1.0 gc_collect gc-start 60954 python7293 libpython3.3m.so.1.0 subtype_dealloc instance-delete-done 60955 python7293 libpython3.3m.so.1.0 subtype_dealloc instance-delete-start 60956 python7293 libpython3.3m.so.1.0 PyType_GenericAlloc instance-new-done 60957 python7293 libpython3.3m.so.1.0 PyType_GenericAlloc instance-new-start 60958 python7293 libpython3.3m.so.1.0 PyEval_EvalFrameEx line """ What are you doing wrong?. If I rollback a single line change in the sourcecode, completely unrelated to dtrace (an "unsigned int XXXX constant;" at global level), things work as expected. Help!. I am running Solaris 10 update 10. Adding "-Z" flag doesn''t help. No changes. - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTtp1pJlgi5GaxT1NAQIPCgP/RApvAsk1Zq9Xf7vZlRbKFGNCrxxpBsxn nBW3sBtPkQ3GIFxC6CXllcqM0RSK7VbPMGa1o7rWi2N0pQHWQECMPI6E9yw31BR9 Men6EqtsLSjT73QMiNlaUmwEDXONbGHfW8KlySb5HROZ6B4o6qrInzC2BAOZDDIs NyGE5slIz08=5u2t -----END PGP SIGNATURE-----
Robert Harris
2011-Dec-03 19:39 UTC
[dtrace-discuss] Spurious and inconsistente "does not match any probes"
Hi, Can you mail me a working and a non-working copy of your python? Robert On 3 Dec 2011, at 19:16, Jesus Cea wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Working in the development of Python DTrace probes, I am launching the > tests using dtrace with the "-c" command. Lately, and inconsistently, > I am getting "does not match any probes" error. > > The only change in the sourcecode is the addition of a completely > unrelated global variable in the sourcecode. > > Doing "dtrace -l -n "python\$target:::" -c ./python" I get the error > "dtrace: invalid probe specifier python$target:::: probe description > python6961::: does not match any probes". > > But launching the python interpreter manually with "./python" and then > doing "dtrace -l -n "python*:::"", I get the right answer: > > """ > ID PROVIDER MODULE FUNCTION NAME > 60946 python7293 libpython3.3m.so.1.0 > PyEval_EvalFrameEx function-entry > 60947 python7293 libpython3.3m.so.1.0 > PyEval_EvalFrameEx function-return > 60948 python7293 libpython3.3m.so.1.0 > _PyObject_GC_Malloc gc-done > 60949 python7293 libpython3.3m.so.1.0 > PyGC_Collect gc-done > 60950 python7293 libpython3.3m.so.1.0 > gc_collect gc-done > 60951 python7293 libpython3.3m.so.1.0 > _PyObject_GC_Malloc gc-start > 60952 python7293 libpython3.3m.so.1.0 > PyGC_Collect gc-start > 60953 python7293 libpython3.3m.so.1.0 > gc_collect gc-start > 60954 python7293 libpython3.3m.so.1.0 > subtype_dealloc instance-delete-done > 60955 python7293 libpython3.3m.so.1.0 > subtype_dealloc instance-delete-start > 60956 python7293 libpython3.3m.so.1.0 > PyType_GenericAlloc instance-new-done > 60957 python7293 libpython3.3m.so.1.0 > PyType_GenericAlloc instance-new-start > 60958 python7293 libpython3.3m.so.1.0 > PyEval_EvalFrameEx line > """ > > What are you doing wrong?. If I rollback a single line change in the > sourcecode, completely unrelated to dtrace (an "unsigned int XXXX > constant;" at global level), things work as expected. > > Help!. > > I am running Solaris 10 update 10. > > Adding "-Z" flag doesn''t help. No changes. > > - -- > Jesus Cea Avion _/_/ _/_/_/ _/_/_/ > jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ > jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/ > . _/_/ _/_/ _/_/ _/_/ _/_/ > "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ > "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ > "El amor es poner tu felicidad en la felicidad de otro" - Leibniz > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQCVAwUBTtp1pJlgi5GaxT1NAQIPCgP/RApvAsk1Zq9Xf7vZlRbKFGNCrxxpBsxn > nBW3sBtPkQ3GIFxC6CXllcqM0RSK7VbPMGa1o7rWi2N0pQHWQECMPI6E9yw31BR9 > Men6EqtsLSjT73QMiNlaUmwEDXONbGHfW8KlySb5HROZ6B4o6qrInzC2BAOZDDIs > NyGE5slIz08> =5u2t > -----END PGP SIGNATURE----- > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Jesus Cea
2011-Dec-04 03:36 UTC
[dtrace-discuss] Spurious and inconsistent "does not match any probes"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/12/11 20:39, Robert Harris wrote:> Can you mail me a working and a non-working copy of your python?Do this: 1. Clone my mercurial repository: <"hg clone https://hg.jcea.es/cpython-2011/">. 2. "hg up -r 2a7dedf6a65e". 3. Do "./configure --enable-shared --with-dtrace". 4. Do "make". 5. Do "LD_LIBRARY_PATH=current_PATH". 6. ''dtrace -l -n "python\$target:::" -c "./python -V"'' works correctly. 7. Edit "Objects/unicodeobject.c". Go to line 49 and add the following two lines: """ unsigned int dtrace_unicode_utf8_offset offsetof(PyCompactUnicodeObject, utf8); unsigned int dtrace_unicode_utf8_length_offset offsetof(PyCompactUnicodeObject, utf8_length); """ 8. Do "make". 9. ''dtrace -l -n "python\$target:::" -c "./python -V"'' fails. 10. Edit "Objects/unicodeobject.c" again and comment those two lines you just added. 11. Do "make". 12. ''dtrace -l -n "python\$target:::" -c "./python -V"'' works. 13. Try to comment & uncomment those two lines and check several times. When the lines are present, dtrace fails to locate the probes. When the lines are commented, dtrace works. I know that this doesn''t make sense at all... I am using GCC 4.6.2, with this conf: """ Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i386-pc-solaris2.10/4.6.2/lto-wrapper Target: i386-pc-solaris2.10 Configured with: ../gcc-4.6.2/configure --with-gnu-as - --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared - --enable-languages=c,c++,fortran,objc,obj-c++,go Thread model: posix gcc version 4.6.2 (GCC) """ The target is 32 bits. If you are not able to reproduce the problem for any reason (maybe a different GCC, no mercurial installed, whatever), I can send you the two precompiled versions. ZIP compressed each version is around 2.5 MB, so 5MB in total (mime encoded for email would be 6.7MB). Worse yet, if I merge the changes in python mainline to my branch, the newly compiled python has the probes (I can list the probes in a already running python process), but dtrace can''t find them in ''dtrace - -c "./python -V"'' either. Messy and I can''t explain it neither, of course know how to solve it. PS: I need to add those to global variables because "PyCompactUnicodeObject" struct memory representation between GCC and DTRACE are different. This is a bug to address in a future message. I needed TWO days to diagnose this, but it is not the point now :-). - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTtrqoJlgi5GaxT1NAQIJegP+PtTxeDrUS/XPV4J9o/v0sd6yJ/QN2GOY Sffr7AC3mEvwKYfaC6bOmvqKp7Qu/d3FH3tAONOqZs7X8IgUZ9QW5NocTgAZF1uk UZDO2bb5solxtds8Ik92Lw/54gLyJgRsVeBaOIHifSF2yp/rKTa0pZEp7UtXw6J2 adJV6Eb1e3Y=ZKOC -----END PGP SIGNATURE-----