[OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
 

I read the first message again.

  PrimitiveFailed: primitive #'insufficient object memory' in File class failed

This looks familiar. When a Pharo 8 image starts, at some point it sends #primFileMasks to File, and I get a primitive failed error like the above on my laptop running Ubuntu 20.04.

The version of OpenSmalltalk VM that I built on this laptop is as follows:

  % ./pharo --version
  5.0-202007070220  Wed Jul  8 19:29:26 +08 2020 clang [Production Spur 64-bit VM]
  CoInterpreter VMMaker.oscog-eem.2772 uuid: 925a3892-829d-4417-bd5b-1a6a26678025 Jul  8 2020
  StackToRegisterMappingCogit VMMaker.oscog-eem.2771 uuid: a7ba3af0-70cc-4104-be1b-8895f533ed7b Jul  8 2020
  VM: 202007070220 pierce@Mailin:work/git/opensmalltalk/opensmalltalk-vm
  Date: Mon Jul 6 19:20:02 2020 CommitHash: 839a5cab0
  Plugins: 202007070220  pierce@Mailin:work/git/opensmalltalk/opensmalltalk-vm
  Linux Mailin 5.4.0-39-generic #43-Ubuntu SMP Fri Jun 19 10:28:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  plugin path: /home/pierce/pkg/osvmp8/ [default: /home/pierce/pkg/osvmp8/]

I have an older version of the VM as well, built on another laptop that has since crashed:

  % ./pharo -version
  5.0-201808291622  Thu Sep 20 22:32:45 +08 2018 gcc 5.4.0 [Production Spur 64-bit VM]
  CoInterpreter VMMaker.oscog-eem.2437 uuid: 0e97c106-dd0b-437b-b1aa-e15257288c3f Sep 20 2018
  StackToRegisterMappingCogit VMMaker.oscog-eem.2432 uuid: 7b14d114-0e04-4e46-b8a7-4b5e6d87f5fe Sep 20 2018
  VM: 201808291622 pierce@othas:src/st/opensmalltalk-vm
  Date: Wed Aug 29 09:22:35 2018 CommitHash: d952580
  Plugins: 201808291622 pierce@othas:src/st/opensmalltalk-vm
  Linux othas 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  plugin path: /home/pierce/pkg/osvmp6/ [default: /home/pierce/pkg/osvmp6/]

With this version, File primFileMasks produces the following which I hope is the expected output:

  #(61440 49152 40960 32768 24576 16384 8192 4096)

If I copy the older VM's FileAttributePlugin.so over the newer VM's, it produces the same output on Pharo 8 with the newer VM, no primitive error.

I don't know the VM internals enough to investigate, but looks like it is possible to start bisecting from VMMaker.oscog-eem.2772 and VMMaker.oscog-eem.2437 or thereabouts.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687727374", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687727374", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

The main difference I see is that the "old" code created an Array while the "new" tries to create a WordArray.
3a4ebae#diff-04cbc775a3686446b844a93e1520e706R755


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687784008", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687784008", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

Should be fixed by e58cec1. Please test to confirm and close if ok.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687832590", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687832590", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

Thank you!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687840921", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687840921", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

Eliot,

Thank you. I made the below changes to FileAttributesPlugin.c. With these changes, File primFileMasks on
Pharo 8 produces output and no longer throws primitive failed error.

--- a/src/plugins/FileAttributesPlugin/FileAttributesPlugin.c
+++ b/src/plugins/FileAttributesPlugin/FileAttributesPlugin.c
@@ -97,7 +97,7 @@ EXPORT(sqInt) primitiveClosedir(void);
 EXPORT(sqInt) primitiveFileAttribute(void);
 EXPORT(sqInt) primitiveFileAttributes(void);
 EXPORT(sqInt) primitiveFileExists(void);
-static sqInt primitiveFileMasks(void);
+EXPORT(sqInt) primitiveFileMasks(void);
 EXPORT(sqInt) primitiveLogicalDrives(void);
 EXPORT(sqInt) primitiveOpendir(void);
 EXPORT(sqInt) primitivePathMax(void);
@@ -746,7 +746,7 @@ primitiveFileExists(void)
 /*     Answer an array (or word array) of well known file masks */

        /* FileAttributesPlugin>>#primitiveFileMasks */
-static sqInt
+EXPORT(sqInt)
 primitiveFileMasks(void)
 {
     sqInt * masks;
@@ -765,6 +765,7 @@ primitiveFileMasks(void)
        }
        masks = ((sqInt *) (firstIndexableField(masksArray)));
        nilObj = nilObject();
+       masks[0] = (integerObjectOf(S_IFMT));
 #  if defined(S_IFSOCK)
        masks[1] = (integerObjectOf(S_IFSOCK));
 #  else


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687978877", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-687978877", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

Tested successfully with 1b896e9. Thank you Eliot.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-689200893", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#issuecomment-689200893", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Insufficient Object Memory: Building on Alpine (#519)

David T Lewis
In reply to this post by David T Lewis
 

Closed #519.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#event-3744056118", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/519#event-3744056118", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
12