[unix] 4.10.2.2614 segfaults on ARM

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

[unix] 4.10.2.2614 segfaults on ARM

Bert Freudenberg

The same image works fine using the interpreter on x86, and on various other VMs. Here's the drgeo.image, inside a zip renamed to .xo:

https://gforge.inria.fr/frs/download.php/30585/DrGeoII-12.04.xo

(original report below)

Any idea what might be wrong?

- Bert -

Begin forwarded message:

> From: "Daniel Drake [via Dr. Geo Forum]" <[hidden email]>
> Subject: Running on OLPC XO-1.75 (ARM)
> Date: 8. Oktober 2013 23:41:32 MESZ
> To: bert <[hidden email]>
>
> Hi,
>
> I am trying to run DrGeo on OLPC XO-1.75 using the Sugar activity provided.
>
> This fails to launch because the Sugar activity includes an x86 Squeak VM. I modified the launcher script to use the system-wide Squeak VM (we have 4.10.2.2614, also used for Scratch and Etoys) but without success.
>
> Now, I briefly see a window, then it crashes with:
> Segmentation fault
> -1799995044 UndefinedObject>?
> Segmentation fault
>
> Any ideas or things I can try? I guess the squeak VM we are running there is much newer than the one shipped in the Sugar activity - maybe there is a new drgeo image that I could try against the new VM?
>
> Thanks
> Daniel
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

timrowledge


On 09-10-2013, at 6:27 AM, Bert Freudenberg <[hidden email]> wrote:

>
> The same image works fine using the interpreter on x86, and on various other VMs. Here's the drgeo.image, inside a zip renamed to .xo:
>
> https://gforge.inria.fr/frs/download.php/30585/DrGeoII-12.04.xo
>
> (original report below)
>
> Any idea what might be wrong?

It segfaults on a plain interpreter, runs quite nicely on a stackvm on my Pi. The plain interp shell script reports -
CHECKING cogvm
CHECKING squeakvm
Segmentation fault

That fact that it tries to run on a plain interp might suggest a wrong image header?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: CWB: Carry With Borrow


Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
In reply to this post by Bert Freudenberg
 
Tim, could you try running this DrGeo image on an interpreter VM for RISC OS?

I don't have an ARM machine to test, and I'm afraid that it is going to require
a debugger (gdb) to sort this one out.

That said, here are some ideas:

My first thought was that this might be a plugin issue. But noting that
the segfault happens right after the display window opens, and before
much of anything else happens, and also noting that -1799995044 negative
number in the error output, I am inclined to think it is failing in the
process of loading the image and fixing up addresses from the disk image,
or very shortly thereafter. This is a format 6504 image, which means that
there is no issue of reordering floats during this process, but the VM
still needs to scan through the entire object memory to fix object pointers
before it can do anything else, so perhaps the failure is happening at
around that point.

I took a look at the image file header and don't see anything of obvious
concern. The image was saved from an interpreter VM, so there is no
possibility of Cog related issues. I am attaching the header information
in case it prompts any ideas from others.

Things that someone can try without resorting to gdb:

It would be good to verify whether other images fail in the same way,
or whether this is in some way specific to the DrGeo image. Perhaps someone
can take a recent Squeak image, save it from an interpreter VM (to make
sure that it is in 6504 format like DrGeo), and see if it runs on
the OLPC X0-1.75 machine. If it works, then we know the problem is
in some way associated with the DrGeo image, otherwise (and more likely)
it is associated with the VM.

On the OLPC X0-1.75, try deleting (or renaming) the external VM plugins.
Then see if it is possible to start the DrGeo image. If there is a problem
in one of the plugins, this could help identify it.

If someone has a different ARM Linux box (maybe a Raspberry Pi?), then
check and see if DrGeo works at that platform.

On the OLPC X0-1.75, try using the "-memory" command line option to
the VM. Pick a few reasonable looking values, and see if one of them
accidentally causes the VM to start working. Rationale: If the problem
is somehow associated with initial load of the image file into memory,
then fiddling around with this setting might cause the symptoms to change
or possibly even go away.

HTH,
Dave

On Wed, Oct 09, 2013 at 03:27:44PM +0200, Bert Freudenberg wrote:

>
> The same image works fine using the interpreter on x86, and on various other VMs. Here's the drgeo.image, inside a zip renamed to .xo:
>
> https://gforge.inria.fr/frs/download.php/30585/DrGeoII-12.04.xo
>
> (original report below)
>
> Any idea what might be wrong?
>
> - Bert -
>
> Begin forwarded message:
>
> > From: "Daniel Drake [via Dr. Geo Forum]" <[hidden email]>
> > Subject: Running on OLPC XO-1.75 (ARM)
> > Date: 8. Oktober 2013 23:41:32 MESZ
> > To: bert <[hidden email]>
> >
> > Hi,
> >
> > I am trying to run DrGeo on OLPC XO-1.75 using the Sugar activity provided.
> >
> > This fails to launch because the Sugar activity includes an x86 Squeak VM. I modified the launcher script to use the system-wide Squeak VM (we have 4.10.2.2614, also used for Scratch and Etoys) but without success.
> >
> > Now, I briefly see a window, then it crashes with:
> > Segmentation fault
> > -1799995044 UndefinedObject>?
> > Segmentation fault
> >
> > Any ideas or things I can try? I guess the squeak VM we are running there is much newer than the one shipped in the Sugar activity - maybe there is a new drgeo image that I could try against the new VM?
> >
> > Thanks
> > Daniel
> >
> >

DrGeo-ImageFileHeader.png (42K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
In reply to this post by timrowledge
 
On Wed, Oct 09, 2013 at 11:05:31AM -0700, tim Rowledge wrote:

>
>
> On 09-10-2013, at 6:27 AM, Bert Freudenberg <[hidden email]> wrote:
>
> >
> > The same image works fine using the interpreter on x86, and on various other VMs. Here's the drgeo.image, inside a zip renamed to .xo:
> >
> > https://gforge.inria.fr/frs/download.php/30585/DrGeoII-12.04.xo
> >
> > (original report below)
> >
> > Any idea what might be wrong?
>
> It segfaults on a plain interpreter, runs quite nicely on a stackvm on my Pi. The plain interp shell script reports -
> CHECKING cogvm
> CHECKING squeakvm
> Segmentation fault
>
> That fact that it tries to run on a plain interp might suggest a wrong image header?
>

Ian put hooks in the /usr/local/bin/squeak script that looks first for a
hypothetical Cog VM named "cogvm" that would be installed in the same
/usr/local/lib/squeak/<version>/ directory as the squeakvm interpreter
VM. Since that does not exist, it looks for squeakvm (the normal interpreter)
instead. This is the source of the "CHECKING cogvm" message.

The actual DrGeo image is in format 6504, which means that it was last
saved from an interpreter VM, and that it should be runnable with either
Cog or an interpreter VM.

It sounds like there is something wrong in the interpreter VM.

Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
In reply to this post by David T. Lewis
 
Resending attachment with image header information, plus a zip of the
same, in case my mail system is causing the problem.

Dave


On Wed, Oct 09, 2013 at 02:09:47PM -0400, David T. Lewis wrote:

>  
> Tim, could you try running this DrGeo image on an interpreter VM for RISC OS?
>
> I don't have an ARM machine to test, and I'm afraid that it is going to require
> a debugger (gdb) to sort this one out.
>
> That said, here are some ideas:
>
> My first thought was that this might be a plugin issue. But noting that
> the segfault happens right after the display window opens, and before
> much of anything else happens, and also noting that -1799995044 negative
> number in the error output, I am inclined to think it is failing in the
> process of loading the image and fixing up addresses from the disk image,
> or very shortly thereafter. This is a format 6504 image, which means that
> there is no issue of reordering floats during this process, but the VM
> still needs to scan through the entire object memory to fix object pointers
> before it can do anything else, so perhaps the failure is happening at
> around that point.
>
> I took a look at the image file header and don't see anything of obvious
> concern. The image was saved from an interpreter VM, so there is no
> possibility of Cog related issues. I am attaching the header information
> in case it prompts any ideas from others.
>
> Things that someone can try without resorting to gdb:
>
> It would be good to verify whether other images fail in the same way,
> or whether this is in some way specific to the DrGeo image. Perhaps someone
> can take a recent Squeak image, save it from an interpreter VM (to make
> sure that it is in 6504 format like DrGeo), and see if it runs on
> the OLPC X0-1.75 machine. If it works, then we know the problem is
> in some way associated with the DrGeo image, otherwise (and more likely)
> it is associated with the VM.
>
> On the OLPC X0-1.75, try deleting (or renaming) the external VM plugins.
> Then see if it is possible to start the DrGeo image. If there is a problem
> in one of the plugins, this could help identify it.
>
> If someone has a different ARM Linux box (maybe a Raspberry Pi?), then
> check and see if DrGeo works at that platform.
>
> On the OLPC X0-1.75, try using the "-memory" command line option to
> the VM. Pick a few reasonable looking values, and see if one of them
> accidentally causes the VM to start working. Rationale: If the problem
> is somehow associated with initial load of the image file into memory,
> then fiddling around with this setting might cause the symptoms to change
> or possibly even go away.
>
> HTH,
> Dave
>
> On Wed, Oct 09, 2013 at 03:27:44PM +0200, Bert Freudenberg wrote:
> >
> > The same image works fine using the interpreter on x86, and on various other VMs. Here's the drgeo.image, inside a zip renamed to .xo:
> >
> > https://gforge.inria.fr/frs/download.php/30585/DrGeoII-12.04.xo
> >
> > (original report below)
> >
> > Any idea what might be wrong?
> >
> > - Bert -
> >
> > Begin forwarded message:
> >
> > > From: "Daniel Drake [via Dr. Geo Forum]" <[hidden email]>
> > > Subject: Running on OLPC XO-1.75 (ARM)
> > > Date: 8. Oktober 2013 23:41:32 MESZ
> > > To: bert <[hidden email]>
> > >
> > > Hi,
> > >
> > > I am trying to run DrGeo on OLPC XO-1.75 using the Sugar activity provided.
> > >
> > > This fails to launch because the Sugar activity includes an x86 Squeak VM. I modified the launcher script to use the system-wide Squeak VM (we have 4.10.2.2614, also used for Scratch and Etoys) but without success.
> > >
> > > Now, I briefly see a window, then it crashes with:
> > > Segmentation fault
> > > -1799995044 UndefinedObject>?
> > > Segmentation fault
> > >
> > > Any ideas or things I can try? I guess the squeak VM we are running there is much newer than the one shipped in the Sugar activity - maybe there is a new drgeo image that I could try against the new VM?
> > >
> > > Thanks
> > > Daniel
> > >
> > >


DrGeo-ImageFileHeader.png (42K) Download Attachment
DrGeo-ImageFileHeader.zip (37K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

(OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

timrowledge
In reply to this post by David T. Lewis

Definitely off topic, but copying drdgeo to my pi prompted me to try the latest image with all the new character scanner stuff as well. Wow. Now that makes an improvement. And that's on a stackvm with no fasterbitblt support yet.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Never do card tricks for the group you play poker with.


Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

stephane ducasse-2

Hi tim

I could not understand what you mean. what is "all the new character scanner stuff as well"
?

On Oct 9, 2013, at 8:50 PM, tim Rowledge <[hidden email]> wrote:

>
> Definitely off topic, but copying drdgeo to my pi prompted me to try the latest image with all the new character scanner stuff as well. Wow. Now that makes an improvement. And that's on a stackvm with no fasterbitblt support yet.
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Never do card tricks for the group you play poker with.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

timrowledge


On 09-10-2013, at 12:42 PM, stephane ducasse <[hidden email]> wrote:

>
> Hi tim
>
> I could not understand what you mean. what is "all the new character scanner stuff as well"

The fairly large cleaning up and rewrite of CharacterScanner classes that Nicolas Cellier & I have been working on for the last couple of weeks


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
"Bother!" said Pooh, as he stood up to his waist in a cow pat.


Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
In reply to this post by timrowledge
 
On Wed, Oct 09, 2013 at 11:50:26AM -0700, tim Rowledge wrote:
>
> Definitely off topic, but copying drdgeo to my pi prompted me to try the latest image with all the new character scanner stuff as well. Wow. Now that makes an improvement. And that's on a stackvm with no fasterbitblt support yet.
>

Excellent. Well done!

Dave

Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

stephane ducasse-2
In reply to this post by timrowledge


On Oct 9, 2013, at 9:46 PM, tim Rowledge <[hidden email]> wrote:

>
>
> On 09-10-2013, at 12:42 PM, stephane ducasse <[hidden email]> wrote:
>
>>
>> Hi tim
>>
>> I could not understand what you mean. what is "all the new character scanner stuff as well"
>
> The fairly large cleaning up and rewrite of CharacterScanner classes that Nicolas Cellier & I have been working on for the last couple of weeks

But I'm still confused. :)
This is in the image or the VM because Drgeo runs in Pharo so if this is in the image I'm confused.
Because Pharo does not have a new CharacterScanner.

Stef

>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> "Bother!" said Pooh, as he stood up to his waist in a cow pat.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
 
On Wed, Oct 09, 2013 at 10:13:25PM +0200, stephane ducasse wrote:

>
> On Oct 9, 2013, at 9:46 PM, tim Rowledge <[hidden email]> wrote:
> >
> > On 09-10-2013, at 12:42 PM, stephane ducasse <[hidden email]> wrote:
> >
> >>
> >> Hi tim
> >>
> >> I could not understand what you mean. what is "all the new character scanner stuff as well"
> >
> > The fairly large cleaning up and rewrite of CharacterScanner classes that Nicolas Cellier & I have been working on for the last couple of weeks
>
> But I'm still confused. :)
> This is in the image or the VM because Drgeo runs in Pharo so if this is in the image I'm confused.
> Because Pharo does not have a new CharacterScanner.
>

It's in the image, so it would not affect DrGeo one way or the other.

Tim mentioned that it was "off topic", which it is ... but interesting
nonetheless.

Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: (OT) Re: [Vm-dev] [unix] 4.10.2.2614 segfaults on ARM

timrowledge

Stef, I guess you missed the "prompted me to try the>>>> latest image<<<<with all the new character scanner stuff as well".
Not the drgeo image at all in this case, but the latest sq4.5-13099 image.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: New classic


Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

Ian Piumarta
In reply to this post by David T. Lewis

Dave, Bert,

> If someone has a different ARM Linux box (maybe a Raspberry Pi?), then
> check and see if DrGeo works at that platform.

On RPi the drgeo.image runs fine with both the latest RPi binary (accelerated bitblt) and a VM compiled from the source archive with the same version number that Bert identified in the subject line.  I tested this with both local (via tightvncserver) and remote displays.

piumarta@raspberrypi:~/Squeak-4.10.2.2614-src$ bld/squeakvm -version
4.10.2-2614 #1 Thu Oct 10 21:51:05 UTC 2013 gcc 4.6.3
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
plugin path: /home/piumarta/Squeak-4.10.2.2614-src/bld/ [default: /home/piumarta/Squeak-4.10.2.2614-src/bld/]

Regards,
Ian

Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

timrowledge


On 10-10-2013, at 3:40 PM, Ian Piumarta <[hidden email]> wrote:
> On RPi the drgeo.image runs fine with both the latest RPi binary (accelerated bitblt) and a VM compiled from the source archive with the same version number that Bert identified in the subject line.  I tested this with both local (via tightvncserver) and remote displays.
>
> piumarta@raspberrypi:~/Squeak-4.10.2.2614-src$ bld/squeakvm -version
> 4.10.2-2614 #1 Thu Oct 10 21:51:05 UTC 2013 gcc 4.6.3
> Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
> plugin path: /home/piumarta/Squeak-4.10.2.2614-src/bld/ [default: /home/piumarta/Squeak-4.10.2.2614-src/bld/]


Well that's interesting; on my Pi it segfaults.

My version info (paraphrased)
4.10.2-2781
raspberrypi 3.6.11+ #456 PREEMPT

So something between those two would appear to trigger a problem.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Settled some during shipping and handling.


Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
 
On Thu, Oct 10, 2013 at 05:07:11PM -0700, tim Rowledge wrote:

>
>
> On 10-10-2013, at 3:40 PM, Ian Piumarta <[hidden email]> wrote:
> > On RPi the drgeo.image runs fine with both the latest RPi binary (accelerated bitblt) and a VM compiled from the source archive with the same version number that Bert identified in the subject line.  I tested this with both local (via tightvncserver) and remote displays.
> >
> > piumarta@raspberrypi:~/Squeak-4.10.2.2614-src$ bld/squeakvm -version
> > 4.10.2-2614 #1 Thu Oct 10 21:51:05 UTC 2013 gcc 4.6.3
> > Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
> > plugin path: /home/piumarta/Squeak-4.10.2.2614-src/bld/ [default: /home/piumarta/Squeak-4.10.2.2614-src/bld/]
>
>
> Well that's interesting; on my Pi it segfaults.
>
> My version info (paraphrased)
> 4.10.2-2781
> raspberrypi 3.6.11+ #456 PREEMPT
>
> So something between those two would appear to trigger a problem.
>

The SVN version difference (2781 versus 2614) might be a red herring. I
think that Ian built a 4.10.2-2614 level VM to match that of the VM from
the original problem report on OLPC. It works when Ian runs DrGeo on that
level of VM, but not on the OLPC. So there may be something else going on
here unrelated to the SVN version level.

It may turn out to be related to the address at which the operating system
allocates the object memory, which may vary for different OS flavors and
hardware configurations. As Ian pointed out: "It looks like the heap was
allocated in the upper half of memory, which could be a clue. :)"

Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

Bert Freudenberg

I just tried Dr Geo on the XO myself and it appears to work just fine (using Fedora's pre-installed 4.10.2.2614 VM).

I am going to work with Daniel to see what he might have done differently.

Sorry for the false alarm, folks.

- Bert -

Reply | Threaded
Open this post in threaded view
|

Re: [unix] 4.10.2.2614 segfaults on ARM

David T. Lewis
 
On Fri, Oct 11, 2013 at 01:47:08PM +0200, Bert Freudenberg wrote:
>
> I just tried Dr Geo on the XO myself and it appears to work just fine (using Fedora's pre-installed 4.10.2.2614 VM).
>
> I am going to work with Daniel to see what he might have done differently.
>
> Sorry for the false alarm, folks.
>

Please let us know what you find. I'm not sure it's a false alarm. After all
Tim is seeing some kind of problem also, though possibly that is a different
problem.

Dave