public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Watch open/read/write/close WIndows syscalls with strace ?
@ 2023-11-02 18:21 Roland Mainz
  2023-11-03 13:59 ` Jon Turney
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Mainz @ 2023-11-02 18:21 UTC (permalink / raw)
  To: cygwin

Hi!

----

We're trying to debug mysterious sporadic I/O issues in Windows native
git ('/cygdrive/c/Program Files/Git/cmd/git') started from Cygwin
3.5.0 mintty.exe ...
... which raises the question:

How can I watch the Windows syscalls for file open/read/write/close
with Cygwin strace for a new process and all its process and thread
children ?

I tried many combinations of --mask=xyz, -etc, but still do not see
any I/O happening...

----

Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Watch open/read/write/close WIndows syscalls with strace ?
  2023-11-02 18:21 Watch open/read/write/close WIndows syscalls with strace ? Roland Mainz
@ 2023-11-03 13:59 ` Jon Turney
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2023-11-03 13:59 UTC (permalink / raw)
  To: Roland Mainz, The Cygwin Mailing List

On 02/11/2023 18:21, Roland Mainz via Cygwin wrote:
> 
> We're trying to debug mysterious sporadic I/O issues in Windows native
> git ('/cygdrive/c/Program Files/Git/cmd/git') started from Cygwin
> 3.5.0 mintty.exe ...
> ... which raises the question:
> 
> How can I watch the Windows syscalls for file open/read/write/close
> with Cygwin strace for a new process and all its process and thread
> children ?
> 
> I tried many combinations of --mask=xyz, -etc, but still do not see
> any I/O happening...

strace is not the tool for the job here.

As 'man strace' says: "The strace program executes a program [...] 
reporting any Cygwin DLL output from the program(s) to stdout"

(So strace just shows some general "debugging output" from inside the 
Cygwin DLL.  It perhaps should try to act a bit more like a real strace 
on UNIX, reporting all the emulated syscalls and their results, but that 
would require explicit annotation of all of those points inside the 
cygwin DLL.)

In any case, it isn't a tool for tracing native Windows programs. I 
suggest you use procmon, or some other similar native tool.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-03 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02 18:21 Watch open/read/write/close WIndows syscalls with strace ? Roland Mainz
2023-11-03 13:59 ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).