iceberg PrimitiveFailed allocateExecutablePage

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

iceberg PrimitiveFailed allocateExecutablePage

Pharo Smalltalk Developers mailing list
Hello, I want to propose some small fixes to Pharo, it took me hours just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...

Now I am stuck with this Iceberg error:
https://app.box.com/file/321243070589

I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and latest CentOS7) - is Iceberg OK on 64bits?

Thanks! pf

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage

alistairgrant
Hi Petr,

On Sun, 23 Sep 2018 at 19:52, Petr Fischer via Pharo-dev
<[hidden email]> wrote:
>
> Hello, I want to propose some small fixes to Pharo, it took me hours just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...
>
> Now I am stuck with this Iceberg error:
> https://app.box.com/file/321243070589

I was presented with a login box when I tried to view this.


> I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and latest CentOS7) - is Iceberg OK on 64bits?

Yes, I use it all the time (on Ubuntu 16.04 64 bit).

Cheers,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - corrected screenshot link

Pharo Smalltalk Developers mailing list
Ohh sorry - better screenshot link:                                                                                                                                                                                
                                                                                                                                                                                                                   
https://app.box.com/s/isd7tdyv8lgr8aj5449xqkrxt4y4uxqy                                                                                                                                                             
                                                                                                                                                                                                                   
pf


> Hi Petr,
>
> On Sun, 23 Sep 2018 at 19:52, Petr Fischer via Pharo-dev
> <[hidden email]> wrote:
> >
> > Hello, I want to propose some small fixes to Pharo, it took me hours just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...
> >
> > Now I am stuck with this Iceberg error:
> > https://app.box.com/file/321243070589
>
> I was presented with a login box when I tried to view this.
>
>
> > I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and latest CentOS7) - is Iceberg OK on 64bits?
>
> Yes, I use it all the time (on Ubuntu 16.04 64 bit).
>
> Cheers,
> Alistair

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - corrected screenshot link

Guillermo Polito
This looks like an FFI error...

Can you try running uFFI tests in your system and sen us the results?

Tx,
Guille

On Sun, Sep 23, 2018 at 9:54 PM Petr Fischer via Pharo-dev <[hidden email]> wrote:
Ohh sorry - better screenshot link:                                                                                                                                                                                 

https://app.box.com/s/isd7tdyv8lgr8aj5449xqkrxt4y4uxqy                                                                                                                                                             

pf


> Hi Petr,
>
> On Sun, 23 Sep 2018 at 19:52, Petr Fischer via Pharo-dev
> <[hidden email]> wrote:
> >
> > Hello, I want to propose some small fixes to Pharo, it took me hours just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...
> >
> > Now I am stuck with this Iceberg error:
> > https://app.box.com/file/321243070589
>
> I was presented with a login box when I tried to view this.
>
>
> > I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and latest CentOS7) - is Iceberg OK on 64bits?
>
> Yes, I use it all the time (on Ubuntu 16.04 64 bit).
>
> Cheers,
> Alistair



--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - PharoDebug.log

Pharo Smalltalk Developers mailing list
In reply to this post by Pharo Smalltalk Developers mailing list
PharoDebug.log attached                                                                                                                                                                                            
                                                                                                                                                                                                                   
pf


> Ohh sorry - better screenshot link:                                                                                                                                                                                
>                                                                                                                                                                                                                    
> https://app.box.com/s/isd7tdyv8lgr8aj5449xqkrxt4y4uxqy                                                                                                                                                             
>                                                                                                                                                                                                                    
> pf
>
>
> > Hi Petr,
> >
> > On Sun, 23 Sep 2018 at 19:52, Petr Fischer via Pharo-dev
> > <[hidden email]> wrote:
> > >
> > > Hello, I want to propose some small fixes to Pharo, it took me hours just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...
> > >
> > > Now I am stuck with this Iceberg error:
> > > https://app.box.com/file/321243070589
> >
> > I was presented with a login box when I tried to view this.
> >
> >
> > > I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and latest CentOS7) - is Iceberg OK on 64bits?
> >
> > Yes, I use it all the time (on Ubuntu 16.04 64 bit).
> >
> > Cheers,
> > Alistair
>

PharoDebug.log (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - PharoDebug.log

EstebanLM
That means 

primAllocateExecutablePage

failed. 
There should be an errorCode value there, that can help us understand better the problem.

Can you check at it?

Thanks!

Esteban

On 24 Sep 2018, at 17:49, Petr Fischer via Pharo-dev <[hidden email]> wrote:

 

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - solved (probably virtualization problem)

Pharo Smalltalk Developers mailing list
In reply to this post by Guillermo Polito
Something very weird happens - my steps:                                                                                                                                                                            
                                                                                                                                                                                                                   
1) ok, lets run UFFI Tests in Test Runnner                                                                                                                                                                          
2) 5 tests fails (RED)                                                                                                                                                                                              
3) saved the test output to file (button in test runner)                                                                                                                                                            
4) quit from Pharo                                                                                                                                                                                                  
5) I forgot to click on the 5 failed tests and generate some PharoDebug.log, so... start Pharo again...                                                                                                            
6) lets run UFFI Tests again...                                                                                                                                                                                    
7) bang! all tests OK (GREEN)! WTF? run test again -> all green again (!)                                                                                                                                          
                                                                                                                                                                                                                   
Bang! Iceberg clone repo works now... I simply can't explain this.                                                                                                                                                  
                                                                                                                                                                                                                   
Whole thing (CentOS7 + Pharo) is inside VirtualBox - most probably the virtual image is somehow crippled...                                                                                                        
                                                                                                                                                                                                                   
Pharo+UFFI+Iceberg is OK, sorry for this mess...                                                                                                                                                                    
                                                                                                                                                                                                                   
pf


> This looks like an FFI error...
>
> Can you try running uFFI tests in your system and sen us the results?
>
> Tx,
> Guille
>
> On Sun, Sep 23, 2018 at 9:54 PM Petr Fischer via Pharo-dev <
> [hidden email]> wrote:
>
> > Ohh sorry - better screenshot link:
> >
> >
> >
> > https://app.box.com/s/isd7tdyv8lgr8aj5449xqkrxt4y4uxqy
> >
> >
> >
> > pf
> >
> >
> > > Hi Petr,
> > >
> > > On Sun, 23 Sep 2018 at 19:52, Petr Fischer via Pharo-dev
> > > <[hidden email]> wrote:
> > > >
> > > > Hello, I want to propose some small fixes to Pharo, it took me hours
> > just to run Pharo with Iceberg on CentOS 7 (I don't care about Ubuntu)...
> > > >
> > > > Now I am stuck with this Iceberg error:
> > > > https://app.box.com/file/321243070589
> > >
> > > I was presented with a login box when I tried to view this.
> > >
> > >
> > > > I am using 64bit Pharo VM + latest Pharo7 image from zeroconf (and
> > latest CentOS7) - is Iceberg OK on 64bits?
> > >
> > > Yes, I use it all the time (on Ubuntu 16.04 64 bit).
> > >
> > > Cheers,
> > > Alistair
> >
> >
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> <http://www.cnrs.fr>*
>
>
> *Web:* *http://guillep.github.io* <http://guillep.github.io>
>
> *Phone: *+33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - PharoDebug.log

Pharo Smalltalk Developers mailing list
In reply to this post by EstebanLM
Thanks for your assistance, but sources of this weird behavior is probably in the virtualization layer:

http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2018-September/273069.html

pf

> That means
>
> primAllocateExecutablePage
>
> failed.
> There should be an errorCode value there, that can help us understand better the problem.
>
> Can you check at it?
>
> Thanks!
>
> Esteban
>
> > On 24 Sep 2018, at 17:49, Petr Fischer via Pharo-dev <[hidden email]> wrote:
> >
> >  
>

Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - PharoDebug.log

Eliot Miranda-2
Hi Petr,

    along with Esteban’s request for the error code from allocateExecutablePage can you also see whether use of iceberg is successful the second time you launch Pharo?  So start up your virtualbox, try and interact with iceberg, quit if it fails, relaunch and try again?

Also in your steps what do you do to prepare?  eg do you boot in virtualbox, return from sleep, or...?

FYI, allocateExecutablePage uses valloc (IIRC) to get a page from the OS and then uses mprotect to add executable permission to the page before answering the page’s address as the result of the primitive.  The callback machinery then uses the page to provide the executable blue code used in implementing callbacks.  The address of a code sequence in the page is what is actually handed out to C code as a fu croon pointer.  When external code calls this function pointer the code in the sequence invokes a callback into the vm before returning back to C.  Consequently it is key that allocateExecutablePage works correctly.  If it doesn’t then no callbacks.

_,,,^..^,,,_ (phone)

On Sep 24, 2018, at 11:11 AM, Petr Fischer via Pharo-dev <[hidden email]> wrote:

<mime-attachment>
Reply | Threaded
Open this post in threaded view
|

Re: iceberg PrimitiveFailed allocateExecutablePage - PharoDebug.log

Pharo Smalltalk Developers mailing list
> Hi Petr,
>
>     along with Esteban’s request for the error code from allocateExecutablePage can you also see whether use of iceberg is successful the second time you launch Pharo?  So start up your virtualbox, try and interact with iceberg, quit if it fails, relaunch and try again?

Yes, after the tests were green (second time, after magic happens), Iceberg was also OK - and I mean the whole Iceberg cycle up to creating the Pharo pull request right from the Iceberg UI/image.
I recreated whole virtualbox image from scratch and tune some vbox settings - described problems have gone and I am not able to recreate the same situation - let's forget it, it's not the Pharo thing.

And finally - I see that a lot of work has been done on Iceberg - it's not even necessary to leave Pharo for a minute due to the final Github pull request in web browser, nice.

pf

> Also in your steps what do you do to prepare?  eg do you boot in virtualbox, return from sleep, or...?
>
> FYI, allocateExecutablePage uses valloc (IIRC) to get a page from the OS and then uses mprotect to add executable permission to the page before answering the page’s address as the result of the primitive.  The callback machinery then uses the page to provide the executable blue code used in implementing callbacks.  The address of a code sequence in the page is what is actually handed out to C code as a fu croon pointer.  When external code calls this function pointer the code in the sequence invokes a callback into the vm before returning back to C.  Consequently it is key that allocateExecutablePage works correctly.  If it doesn’t then no callbacks.
>
> _,,,^..^,,,_ (phone)
>
> > On Sep 24, 2018, at 11:11 AM, Petr Fischer via Pharo-dev <[hidden email]> wrote:
> >
> > <mime-attachment>