From owner-freebsd-current@FreeBSD.ORG Sun Sep 12 17:43:28 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD07A16A4D2; Sun, 12 Sep 2004 17:43:28 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id D102143D2D; Sun, 12 Sep 2004 17:43:27 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.102] (ddsl-66-42-172-210.fuse.net [66.42.172.210]) (authenticated bits=0)i8CHTSjr019061 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 12 Sep 2004 13:29:29 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: Brian Fundakowski Feldman Date: Sun, 12 Sep 2004 13:45:34 -0400 User-Agent: KMail/1.6.2 References: <47158390.20040827112834@ulstu.ru> <200409111955.13663.mistry.7@osu.edu> <20040912145032.GZ928@green.homeunix.org> In-Reply-To: <20040912145032.GZ928@green.homeunix.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_+sIRBuYt87PX2OZ" Message-Id: <200409121345.35186.mistry.7@osu.edu> X-Spam-Status: No, hits=3.0 required=5.0 tests=IN_REP_TO,RCVD_IN_ORBS,RCVD_IN_OSIRUSOFT_COM,REFERENCES, USER_AGENT_KMAIL,X_OSIRU_OPEN_RELAY version=2.55 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-current@freebsd.org Subject: Re: Wine and mmap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 17:43:29 -0000 --Boundary-00=_+sIRBuYt87PX2OZ Content-Type: multipart/signed; charset="iso-8859-1"; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_/sIRBctZakl5Vdz"; name=" " Content-Transfer-Encoding: 7bit --Boundary-02=_/sIRBctZakl5Vdz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 12 September 2004 10:50 am, you wrote: > On Sat, Sep 11, 2004 at 07:54:55PM -0400, Anish Mistry wrote: > > On Saturday 11 September 2004 05:26 pm, you wrote: > > > On Sat, Sep 11, 2004 at 05:07:13PM -0400, Anish Mistry wrote: > > > > On Saturday 11 September 2004 02:00 pm, you wrote: > > > > > On Mon, Sep 06, 2004 at 01:49:35AM -0400, Anish Mistry wrote: > > > > > > On Sunday 05 September 2004 05:15 pm, Gerald Pfeifer wrote: > > > > > > > [ John, sorry for the duplicate message; this is the correct > > > > > > > one. ] > > > > > > > > > > > > > > On Fri, 27 Aug 2004, John Birrell wrote: > > > > > > > > Anish Mistry has developed a patch to > > > > > > > > choose an appropriate mmap address. He posted it to -curren= t. > > > > > > > > I haven't had time to test it. > > > > > > > > > > > > > > Thanks for the note. Will you have time to test/commit this > > > > > > > before 5.3? > > > > > > > > > > > > > > Anish, do you have any news on this patch? (Wine has been > > > > > > > broken for a couple of months now, and it would be great to > > > > > > > have at least 5.3 fixed.) > > > > > > > > > > > > Well I guess this is my lucky day. Apply the attached patch for > > > > > > vm_mmap to your kernel and patch the August wine sources with t= he > > > > > > wine-mmap.patch and compile and install wine (be sure to use > > > > > > gmake). This is working on my dev system with 6-CURRENT as of > > > > > > Saturday night. The wine mmap patch just doesn't reserve the DOS > > > > > > area so DOS programs may not work. This seems to just work > > > > > > around a side effect of the kernel mmap patch. I still think th= at > > > > > > the kernel mmap patch has issues so I'm hoping Alan can give us > > > > > > some feedback. > > > > > > Anyway this worked for me, YMMV. > > > > > > > > > > Do these combined work for you, minus any modifications to mmap(2= )? > > > > > I do not feel that the kernel mmap(2) should be modified in this > > > > > manner, that it is a strictly userland problem. > > > > > > > > With only these applied I get old message that wine can't mmap it's > > > > address space. > > > > > > Oh, I'm sorry for not explaining the last step. You need to set the > > > environment variable "LD_LIBRARY_LOW_ADDR" to some address, like after > > > the first megabyte, or something like that, but before the first "dat= a" > > > address. Try, say, 1024000. > > > > Ok, I've tried that, with several different numbers and I either get > > something like: > > wine: failed to initialize: /usr/local/lib/libwine_unicode.so.1: mmap > > returned wrong address: wanted 0xc350000, got 0xc3bd000 > > or just the normal: > > wine: failed to initialize: /usr/local/lib/wine/ntdll.dll.so: mmap of > > entire address space failed: Cannot allocate memory > > > > Any other suggestions? > > Oops, can you try this instead? Can you share with me exactly how you > run this "regression test" with WINE (what program, what .wine/config)? > Ok, this instead of getting the wrong address, wine just bails out with: wine: failed to create the process heap. The other message still appears i= f=20 the load address is high enough. This is how I'm testing: I've downloaded the August (20040813) version of wine applied the patch to= =20 comment out the reservation of the dos area in a previous email (attached=20 again, idealy we shouldn't apply this since having the stock wine work woul= d=20 be much better), and did a ./configure && gmake depend && gmake && gmake=20 install. I've attached my wine config file. Then I just end the=20 environmental variable you said and run wine. I'm using Diablo 2 as my tes= t=20 app. =2D-=20 Anish Mistry --Boundary-02=_/sIRBctZakl5Vdz Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBBRIs/xqA5ziudZT0RAkpCAKCVw5V8CHO2fVgm46C+j90N/YRtUQCfU7KU RzQn/aUUMWBjP3mjWgkKn9s= =PWX+ -----END PGP SIGNATURE----- --Boundary-02=_/sIRBctZakl5Vdz-- --Boundary-00=_+sIRBuYt87PX2OZ Content-Type: text/x-diff; charset="iso-8859-1"; name="wine-mmap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wine-mmap.patch" --- libs/wine/mmap.c.orig Mon Sep 6 01:23:40 2004 +++ libs/wine/mmap.c Mon Sep 6 01:23:46 2004 @@ -294,7 +294,7 @@ area = LIST_ENTRY( ptr, struct reserved_area, entry ); if (!area->base) return; } - reserve_dos_area(); + /*reserve_dos_area();*/ } #else /* HAVE_MMAP */ --Boundary-00=_+sIRBuYt87PX2OZ--