Profiling & debugging on FreeBSD: loadable modules, profiler output, threads

Michal Pasternak michal at pasternak.w.lub.pl
Sun May 30 10:28:01 PDT 2004


Hi,

I need to debug some software, written in Python (with threads), which uses
dynamically loadable modules, written in C. 

FreeBSD version is 5.2.1-RC. 

All Python modules are compiled with "-g -pg", so is the python binary. 

By default, "-g -pg -pthread" doesn't seem to link libc to Python binary
(modules complain about missing 'strftime' on load). Any other combination
of options, than "-g -pg -lc_r -lc -pthread" causes Python binary to dump
core with sig 10 at start (with never ending _pthread_self calls in
backtrace).

Even if python.gmon is created, it contains only an information about calls
to '__fpsetreg'. 

My sysctl kern.debug.threads is 1. 

kdump output seems to reveal:

 88107 python2p3 NAMI  "python2p3.gmon"
 88107 python2p3 RET   open 5

... but only at the *end* of the log (shouldn't it be open some time earlier)?

I'd appreciate any help in this matter. I need this working by yesterday.

Thanks,
-- 
Michal Pasternak :: http://pasternak.w.lub.pl :: http://winsrc.sf.net

"Frankly, any company would look bad if their corporate e-mail was available
for anyone to read," -- Jim Dose of Ritual Entertainment. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040530/e9868e52/attachment-0001.bin


More information about the freebsd-questions mailing list