delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/01/07:15:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 1 Mar 2012 13:14:42 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygheap base mismatch detected
Message-ID: <20120301121442.GG2257@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4F4E7CC8 DOT 9090804 AT cwilson DOT fastmail DOT fm> <20120301105139 DOT GF2257 AT calimero DOT vinschen DOT de> <CAB8Xom9nR9g=R_uzzZM5D+OHZ3wQhkJ+F5tAKBL0xL60iTc9rA AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAB8Xom9nR9g=R_uzzZM5D+OHZ3wQhkJ+F5tAKBL0xL60iTc9rA@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 Mar  1 11:59, marco atzeri wrote:
> On Thu, Mar 1, 2012 at 11:51 AM, Corinna Vinschen wrote:
> > On Feb 29 14:30, Charles Wilson wrote:
> >> I've been running into a strange "error" lately (that is, I first
> >> noticed it for sure on 1.7.10, but it MIGHT have occurred also on 1.7.9.
> >> It persists on 1.7.11). cygcheck -- and *only* cygcheck -- is reporting
> >> a cygheap base mismatch but only on an XP64 machine:
> >>
> >> $ cygcheck -cd cygwin
> >>       1 [main] cygcheck (3756) C:\cygwin\bin\cygcheck.exe: *** fatal
> >> error - cygheap base mismatch detected - 0x61270870/0x2170870.
> >> This problem is probably due to using incompatible versions of the
> >> cygwin DLL.
> >> Search for cygwin1.dll using the Windows Start->Find/Search facility
> >> and delete all but the most recent version.  The most recent version
> >> *should*
> >> reside in x:\cygwin\bin, where 'x' is the drive on which you have
> >> installed the cygwin distribution.  Rebooting is also suggested if you
> >> are unable to find another cygwin DLL.
> >> Cygwin Package Information
> >> Package              Version
> >> cygwin               1.7.11-1
> >>
> >> (Note that cygcheck actually *does* complete the requested command,
> >> after the error message from (cygwin1.dll/dcrt0.cc?) is printed.
> >
> > Very strange.  For two reasons.  First of all, why is the mismatch
> > message printed at all?  The code in question is basically:
> >
> >  if (res->cygheap != (void *) &_cygheap_start)
> >    multiple_cygwin_problem (...);
> 
> 0x61270870 != 0x2170870

Oh, right.  I only read the last few digits.  Sorry.

Hmm.  cygcheck loads the Cygwin DLL dynamically.  It does not depend on
any other Cygwin distro DLL.  But it's started from a Cygwin parent.  So
the loaded CYgwin DLL checks the layout just like it had been linked
against.  And apparently it gets rebased at load time.  Which means to
me, there's another DLL already loaded into the process at an address
which overlaps with the address space the Cygwin DLL should have been
loaded to.

So I guess you just have to find out what is the cause for rebasing
the Cygwin DLL.  Try VMMap from sysinternals with a cygcheck -svr piped
into less, so that you can easily observe the process in vmmap.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019