Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3FA63AC4.9090906@aonix.co.uk> Date: Mon, 03 Nov 2003 11:23:48 +0000 From: Cliff Hones Organization: Aonix Europe User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arash Partow CC: cygwin AT cygwin DOT com Subject: Re: Stability Problem with Cygwin Pthreads References: In-Reply-To: X-Enigmail-Version: 0.81.7.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/