public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Cliff Hones <cliff@aonix.co.uk>
To: Arash Partow <arashp@hotmail.com>
Cc: cygwin@cygwin.com
Subject: Re: Stability Problem with Cygwin Pthreads
Date: Mon, 03 Nov 2003 11:20:00 -0000	[thread overview]
Message-ID: <3FA63AC4.9090906@aonix.co.uk> (raw)
In-Reply-To: <BAY9-F10gOQtD8qXkgk000958fd@hotmail.com>

Arash Partow wrote:
> for the people that are interested, this is where the threads
> seem to be CONTINUALLY crashing:
> 
> /cygdrive/c/cygwin\bin>addr2line -e cygwin1.dll 0x610de964
> ../../../../../../cygwin-snapshot-20031028-1/newlib/libc/machine/i386/memcpy.S:53
> 
> .L11:
> shrl $2,ecx
> .p2align 2
> rep          <------------
> movsl
> 
> movl ebx,ecx
> andl $3,ecx
> 
> from what i can see the memcpy is moving data from esi to edi
> (ecx/4)'times (word blocks), however i don't think in the rep
> (REPZ) of the ecx ever gets to zero, or before it does it tries
> to copy data from a place which it does not have access to.

Seeing this, and recalling that the crashes are indeterminate,
suggests to me the possibility that the problem may be caused
by thread switches during the execution of the REP MOVSL
instruction.  REP instructions are interruptable, and can
be safely restarted from where they left off, *but*
indeterminate behaviour will occur if the processor string
direction flag (in EFLAGS, set by CLD/STD) is not saved
and restored correctly during a thread switch following
an interrupt.

Not knowing the internal workings of Cygwin (or Windows) threads,
I don't know if this could be the problem, and unfortunately
I don't have the time to research it, but I offer it as a
hopefully useful suggestion.

-- 
Cliff


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2003-11-03 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03  1:22 Arash Partow
2003-11-03 11:20 ` Cliff Hones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-03  5:28 Marcus Van Der Beek
2003-11-03  0:29 Marcus Van Der Beek
2003-11-03  0:20 Arash Partow
2003-11-02 16:18 Joost Kraaijeveld
2003-11-02  7:17 Arash Partow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FA63AC4.9090906@aonix.co.uk \
    --to=cliff@aonix.co.uk \
    --cc=arashp@hotmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).