Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Syscall tracing: (5 Items)
   
Syscall tracing  
Hi,

I'm trying to trace a problem I'm seeing with a resource manager.

Background:
In the iomsg handler function, the io_msg_t message that is passed to it sometimes has a msg_hdr.i.combine_len field of 
zero or an unexpected msg_hdr.i.mgrid value.
I suspect this is either from memory corruption in the client or the server (ResMgr), but it's not clear for me where 
corruption of this header is really happening.

Now I would like to either
a) some sort of ptrace the client process to see what it is sending
or
b) do a kernel trace that is triggered after the Client's "syscall" has returned unsuccessfully, as a post-trigger, i.e.
 the ring buffer stops recording when the user pulls the trigger.

Concerning a) there seems to be dtrace, but it doesn't seem really usable yet. (?)

Concerning b), there is lots of info about the instrumented kernel, that you can inject user specified events, etc etc..
. but this all seems to me more like an overview, I haven't found any real examples on how post-triggering is done (can 
it be done?), or how filters can be installed. Also this seems a bit of overkill just for finding out what data is 
actually sent using MsgSend...

Any suggestions?

Thanks,
 Marc
Re: Syscall tracing  
"strace" I meant to write, instead of "ptrace"...
Re: Syscall tracing  
by the way... this is on PPC... which probably rules out dtrace, anyway (?)
AW: Syscall tracing  
go for:
http://www.qnx.com/developers/docs/6.4.1/instr_en/instr/about.html
to start, it shows all you need

If you have tracelogger running in ring mode you may stop recording with
TraceEvent(_NTO_TRACE_STOP);
TraceEvent(_NTO_TRACE_FLUSHBUFFER);

this only stops recording, you will have to terminate tracelogger
 $ slay tracelogger
before accessing the log file.

if logger wrapped the ring you're loosing process names in your log file, so an additional pidin will help to read the 
log

I guess you will need to run tracelogger in wide mode (-w) to get more data on your MsgSnd calls (not all the data is 
logged!)

HTH
/hp



-----Ursprüngliche Nachricht-----
Von:	Marc Roessler [mailto:community-noreply@qnx.com]
Gesendet:	Do 17.12.2009 17:31
An:	ostech-core_os
Cc:	
Betreff:	Syscall tracing

Hi,

I'm trying to trace a problem I'm seeing with a resource manager.

Background:
In the iomsg handler function, the io_msg_t message that is passed to it sometimes has a msg_hdr.i.combine_len field of 
zero or an unexpected msg_hdr.i.mgrid value.
I suspect this is either from memory corruption in the client or the server (ResMgr), but it's not clear for me where 
corruption of this header is really happening.

Now I would like to either
a) some sort of ptrace the client process to see what it is sending
or
b) do a kernel trace that is triggered after the Client's "syscall" has returned unsuccessfully, as a post-trigger, i.e.
 the ring buffer stops recording when the user pulls the trigger.

Concerning a) there seems to be dtrace, but it doesn't seem really usable yet. (?)

Concerning b), there is lots of info about the instrumented kernel, that you can inject user specified events, etc etc..
. but this all seems to me more like an overview, I haven't found any real examples on how post-triggering is done (can 
it be done?), or how filters can be installed. Also this seems a bit of overkill just for finding out what data is 
actually sent using MsgSend...

Any suggestions?

Thanks,
 Marc



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post44033 
 
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile: Karlsbad | 
Local Court Mannheim: Register No. 361395

 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat 
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail
. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have 
received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
Attachment: Text winmail.dat 4.16 KB
Re: AW: Syscall tracing  
Hans-Peter, thanks! Somehow I wasn't able to find this.