X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 From: Thomas Shanks Date: Fri, 2 Jul 2010 16:29:41 -0400 Message-ID: Subject: vimdiff sharing violation race condition when diffing .bashrc [Was: Re: Trouble with vimdiff and strace on most recent cygwin] To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On Tue, Jun 22, 2010 at 9:13 PM, Thomas Shanks wrote: ... > $ vimdiff /etc/skel/.bashrc ~/.bashrc > 2 files to edit > 7 [?47h [27m [24m [0m [H [J [25;1H"/etc/skel/.bashrc" 130L, 3754C > "~/.bashrc" [25;13H [K [25;13H135L, 3884C 1 [main] gvim 1752 > exception::handle: Exception: STATUS_ACCESS_VIOLATION > 1164 [main] gvim 1752 open_stackdumpfile: Dumping stack trace to > gvim.exe.stackdump > 1 [main] gvim 3760 exception::handle: Exception: STATUS_ACCESS_VIOLATION ... Cygwin.dll and/or Vim devs: It appears the file was somehow being locked by one of the vim processes (why does starting vim take a read-lock on .bashrc?) at the moment the other one was trying to read it. It is, it seems, a race condition. It was failing due to sharing violation 95% of the time, with both (!) vim processes failing to load their required file the majority of the time. This indicates that somehow the problem goes both ways: both the vim reading .bashrc and the other one trying to use .bashrc can experience a sharing violation in the same vimdiff call. The question I have is: why does starting vimdiff use .bashrc, and why would they both manage to experience a sharing violation when only one is editing .bashrc? Could this apply equally to diffing anything that vim loads during startup, including a syntax highlighting filetype config file or other config file? Thomas Shanks -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple