memory and VM issues

David T. Lewis lewis at mail.msen.com
Sun Jul 24 12:44:29 UTC 2005


On Sun, Jul 24, 2005 at 12:45:39AM -0700, Ross Boylan wrote:
> I reran configure so it would install to a local directory, and then
> rebuilt and installed (but no make clean--perhaps I should have said
> reconfigure or something like that at the first step?).
> 
> There's some confusion about the .so extensions.  It's expecting them
> (which seems reasonable), but they aren't there.

No problem here, just some misleading messages. On recent Linux
(libtool?), the modules don't have the .so extension. This is as
it should be.

> When I tried to run:
> /usr/local/src/squeak$ ~/staging/bin/squeak SqueakVM &
> /usr/local/src/squeak$ could not find display driver vm-display-X11; either:
>   - check that /home/ross/staging/lib/squeak/3.8a-2/vm-display-X11.so exists, or
>   - use the '-plugins <path>' option to tell me where it is, or
>   - remove DISPLAY from your environment.

This is an actual problem in the current SVN sources for Unix. The
above error message is misleading; it suggests that the vm-display-X11
is not being loaded. Actually, it *is* being loaded, but is failing
due to a missing symbol reference. The patch for the misleading error
message is going to be added to the SVN sources, but I suspect that
Ian has not yet had an opportunity to do so. I'm less certain about
the fix for the actual problem; I've got a working patch that compiles
and runs, but I'm not certain that it is correct.

I am attaching a copy of previous messages from the vm-dev list for
your reference. These describe pretty much all that I know on the
topic right now. Unfortunately, I'm still not able to produce a VM
that actually works without crashing, so I'm looking forward to any
results you might get.

Also attached are the patch files that I used to a) correct the
misleading error message, and b) fix the missing symbol references.
There is a screen shot file mentioned in one of the messages that
I have not included due to size. I'll mail that to you (Ross)
privately so as not to waste space on the list.

Hope this helps.

Dave

-------------- next part --------------
>From lewis at mail.msen.com  Sat Jul  2 17:26:55 2005
Return-Path: <lewis at mail.msen.com>
Received: from conch.msen.com (lewis at localhost [127.0.0.1])
	by conch.msen.com (8.12.10/8.12.10) with ESMTP id j62LQt4w021936;
	Sat, 2 Jul 2005 17:26:55 -0400 (EDT)
Received: (from lewis at localhost)
	by conch.msen.com (8.12.10/8.12.7/Submit) id j62LQs1U021935;
	Sat, 2 Jul 2005 17:26:54 -0400 (EDT)
Date: Sat, 2 Jul 2005 17:26:54 -0400
From: "David T. Lewis" <lewis at mail.msen.com>
To: vm-dev at discuss.squeakfoundation.org
Cc: ian.piumarta at hp.com
Subject: [VM][UNIX][PATCH] Was: Cannot load vm-display-X11 module after build from latest SVN and VMM
Message-ID: <20050702172654.A21587 at conch.msen.com>
References: <20050630214355.A10780 at conch.msen.com> <200507011244.36164.ned at bike-nomad.com> <20050702122959.A3714 at conch.msen.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI"
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <20050702122959.A3714 at conch.msen.com>; from lewis at mail.msen.com on Sat, Jul 02, 2005 at 12:29:59PM -0400
Status: RO
Content-Length: 1950
Lines: 56


--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Ian,

While trying to debug a problem in loading vm-display-X11, I found
that errors in vm-display-X11 were silently ignored in the module
loading process.

Here is a patch for sqUnixExternalPrims.c that prints the dlerror()
message on standard error if a shared module file exists but dlopen()
fails to open it. This prevents the situation where the VM fails to
load a module due to a real problem in the module file, then proceeds
to look for the module in a bunch of other places without informing
the user that something bad may have happened.

This is just for the dlopen() in tryLoading(). An error message was
already in place to cover dlopen() errors in ioLoadModule().

Following is an example of console output in a case such as this:

lewis at dtlewis:/tmp/sq/Squeak64BitPort/images/build32> squeak
dlopen() failed to load module /usr/local/lib/squeak/3.8a-2/vm-display-X11
/usr/local/lib/squeak/3.8a-2/vm-display-X11: undefined symbol: oopAt
could not find display driver vm-display-X11; either:
  - check that /usr/local/lib/squeak/3.8a-2/vm-display-X11.so exists, or
  - use the '-plugins <path>' option to tell me where it is, or
  - remove DISPLAY from your environment.
Aborted

I have attached a diff file as well as the patched source file.

Dave


--+HP7ph2BbKc20aGI
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=730

Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="sqUnixExternalPrims.c.diff.gz"
Content-Transfer-Encoding: base64


--+HP7ph2BbKc20aGI
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=4790

Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="sqUnixExternalPrims.c.gz"
Content-Transfer-Encoding: base64


--+HP7ph2BbKc20aGI--

>From lewis at mail.msen.com  Mon Jul  4 10:40:04 2005
Return-Path: <lewis at mail.msen.com>
Received: from conch.msen.com (lewis at localhost [127.0.0.1])
	by conch.msen.com (8.12.10/8.12.10) with ESMTP id j64Ee4bW025849;
	Mon, 4 Jul 2005 10:40:04 -0400 (EDT)
Received: (from lewis at localhost)
	by conch.msen.com (8.12.10/8.12.7/Submit) id j64Ee4rx025848;
	Mon, 4 Jul 2005 10:40:04 -0400 (EDT)
Date: Mon, 4 Jul 2005 10:40:04 -0400
From: "David T. Lewis" <lewis at mail.msen.com>
To: Ian Piumarta <ian.piumarta at hp.com>
Subject: Re: [VM][UNIX][PATCH] Was: Cannot load vm-display-X11 module after build from latest SVN and VMM
Message-ID: <20050704104004.A24992 at conch.msen.com>
References: <20050630214355.A10780 at conch.msen.com> <200507011244.36164.ned at bike-nomad.com> <20050702122959.A3714 at conch.msen.com> <20050702172654.A21587 at conch.msen.com> <d7d82cbe7160691d86a710d1e96c6dd1 at hp.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP"
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <d7d82cbe7160691d86a710d1e96c6dd1 at hp.com>; from ian.piumarta at hp.com on Sun, Jul 03, 2005 at 07:49:49AM +0200
Status: RO
Content-Length: 1862
Lines: 57


--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Jul 03, 2005 at 07:49:49AM +0200, Ian Piumarta wrote:
> Thanks, Dave.
> 
> Will apply patch as soon as I get home (travelling at the mo').

Thanks Ian.

FYI, the actual failure I was getting in vm-display-X11 loading was
due to unresolved references to oopAt and oopAtPointer. These were not
defined in sqMemoryAccess.h when INLINING_WORKS_FOR_SMALL_ACCESSORS
is false (which evidently is the case for my machine, a 32 bit Intel
Linux box with gcc 3.3.1).

I added macros to resolve this (patch file attached), but I can't
guarantee the patch is correct, as I still am not able to build a 
working VM from SVN and the latest VMM.

But I can now load the vm-display-X11 module and get as far as
mapping the Squeak window to the display. I then run into a seg
fault shortly after entering interpret(). If it turns out to be
something of interest, I'll report back whenever I get it sorted
out.

I did have a working VM built from source a couple of weeks ago,
and used it to make some progress on OSPP updates for the 64 bit
code base. Unfortunately I discarded that source in favor of more
recent SVN and VMM code, and am not back to a runnable configuration
yet.

Cheers,
Dave


--jRHKVT23PllUwdXP
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=3034

Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="sqMemoryAccess.h.gz"
Content-Transfer-Encoding: base64


--jRHKVT23PllUwdXP
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=479

Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="sqMemoryAccess.h.diff.gz"
Content-Transfer-Encoding: base64


--jRHKVT23PllUwdXP--

>From lewis at mail.msen.com  Fri Jul  8 14:03:17 2005
Return-Path: <lewis at mail.msen.com>
Received: from conch.msen.com (lewis at localhost [127.0.0.1])
	by conch.msen.com (8.12.10/8.12.10) with ESMTP id j68I3HBt028370;
	Fri, 8 Jul 2005 14:03:17 -0400 (EDT)
Received: (from lewis at localhost)
	by conch.msen.com (8.12.10/8.12.7/Submit) id j68I3GYw028368;
	Fri, 8 Jul 2005 14:03:16 -0400 (EDT)
Date: Fri, 8 Jul 2005 14:03:16 -0400
From: "David T. Lewis" <lewis at mail.msen.com>
To: vm-dev at discuss.squeakfoundation.org
Subject: Problem building from latest SNV & VMM
Message-ID: <20050708140316.A27189 at conch.msen.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH"
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
Status: RO
Content-Length: 2699
Lines: 76


--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I can build and run 32 bit Intel Linux VMs from the source and image
posted in the ./dist3 directory. However, if I use recent platforms
source from SVN with recent VMMaker, I get a VM that has some kind
of problem apparently involving memory decoding or interpreting an
instruction stream.

I can occasionally get a small image to start up with this VM
(usually I get a crash related to one of the background processes
or to an incremental GC at startup), but once running the image
cannot accept text in a workspace, or apparently do anything else
related to interpreting an instruction stream (???).

When the VM crashes, it appears to always involve one of the
memory access functions (or macros as the case may be), but it
happens at various times after entering the interpreter, and I
have not figured anything out by looking at it under gdb.

Failures when the image is running may bring up debuggers, as
shown in the attached gif. These appear to be failures interpreting
a BlockContext and failures related to write stream positioning
in the compiler. Presumably this is related to the memory access
failures I see when the VM crashes outright.

Any ideas? Here are some artifacts of the failing VM/image:

world.3.gif is a screen dump of the minimal image after it has
successfully started, with some debuggers open.

sqMemoryAccess.h is a copy of the lightly hacked file I am using,
forcing use of the static inline functions rather than macros (it
also includes a couple of missing macros that are not being used
for purposes of these tests).

SqueakDebugLogFiles.zip contains some representative debug log
files that may give some clues as to what is going wrong.

I must be looking past something obvious, but I can't spot it.

Dave


--7JfCtLOvnd9MIVvH
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=70664

Content-Type: image/gif
Content-Disposition: attachment; filename="world.3.gif"
Content-Transfer-Encoding: base64


--7JfCtLOvnd9MIVvH
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=3054

Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="sqMemoryAccess.h.gz"
Content-Transfer-Encoding: base64


--7JfCtLOvnd9MIVvH
Content-Type: message/external-body; access-type=x-mutt-deleted;
	expiration="Sun, 24 Jul 2005 08:18:04 -0400"; length=11336

Content-Type: application/x-zip-compressed
Content-Disposition: attachment; filename="SqueakDebugLogFiles.zip"
Content-Transfer-Encoding: base64


--7JfCtLOvnd9MIVvH--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixExternalPrims.c.diff.gz
Type: application/x-gunzip
Size: 538 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050724/0d110807/sqUnixExternalPrims.c.diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqUnixExternalPrims.c.gz
Type: application/x-gunzip
Size: 3543 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050724/0d110807/sqUnixExternalPrims.c.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqMemoryAccess.h.diff.gz
Type: application/x-gunzip
Size: 353 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050724/0d110807/sqMemoryAccess.h.diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqMemoryAccess.h.gz
Type: application/x-gunzip
Size: 2242 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050724/0d110807/sqMemoryAccess.h.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqueakDebugLogFiles.zip
Type: application/x-zip-compressed
Size: 8384 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050724/0d110807/SqueakDebugLogFiles.bin


More information about the Squeak-dev mailing list