Kaïraba Cissé | 29 Apr 06:22 2012
Picon

sbcl jfli

I recently posted the following message on com.lang.lisp :
> Hi
> Last night,  I tested jfli with lispworks. It is very great.
> Unfortunately, jfli is not portable. I wonder if someone out there
> already port jfli on sbcl. If yes, send me the code please !
> Cheers

 And Elias Martenson posted the following answer :
> It's trickier than you might think. I actually looked into doing this some time ago.
> I gave up when I realised the amount of work to get it to work was just not worth it.
> Just loading the JVM into the same process as the SBCL image causes SBCL to crash shortly after.
> This is because, I believe, both the JVM and SBCL attempt to install and take advantage of the same signal handlers.

Is there a sbcl developper who tried to fix it ?
Did someone successfully port jfli on sbcl ?
CHeers

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
Nikodemus Siivola | 29 Apr 11:20 2012
Picon

Re: sbcl jfli

On 29 April 2012 07:22, Kaïraba Cissé <ckairaba <at> gmail.com> wrote:
> I recently posted the following message on com.lang.lisp :
>> Hi
>> Last night,  I tested jfli with lispworks. It is very great.
>> Unfortunately, jfli is not portable. I wonder if someone out there
>> already port jfli on sbcl. If yes, send me the code please !
>> Cheers
>
>  And Elias Martenson posted the following answer :
>> It's trickier than you might think. I actually looked into doing this some
>> time ago.
>> I gave up when I realised the amount of work to get it to work was just
>> not worth it.
>> Just loading the JVM into the same process as the SBCL image causes SBCL
>> to crash shortly after.
>> This is because, I believe, both the JVM and SBCL attempt to install and
>> take advantage of the same signal handlers.
>
> Is there a sbcl developper who tried to fix it ?
> Did someone successfully port jfli on sbcl ?

As I said on sbcl-help, I'm not aware of anyone who's been working on that.

If someone wants to take a stab at it, first step would be debugging
those crashes caused by loading of the JVM into the same process. GDB
is your friend.

Building SBCL using --with-ud2-breakpoints is probably a good zeroeth
step for that.

Cheers,

 -- Nikodemus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
David Lichteblau | 29 Apr 13:51 2012

Re: sbcl jfli

Quoting Nikodemus Siivola (nikodemus <at> random-state.net):
> As I said on sbcl-help, I'm not aware of anyone who's been working on that.
> 
> If someone wants to take a stab at it, first step would be debugging
> those crashes caused by loading of the JVM into the same process. GDB
> is your friend.
> 
> Building SBCL using --with-ud2-breakpoints is probably a good zeroeth
> step for that.

Presumably this is obvious to anyone asking that question, but:
Another probable 0th step is to use -Xrs.

d.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Kaïraba Cissé | 29 Apr 15:11 2012
Picon

Re: sbcl jfli

There is an important work already done with cl+j. But there is a problem between sbcl and java with the initial thread.
Sbcl crashes when we use it. It works if we use a another thread. I really don't understand where the problem comes from !

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
Nikodemus Siivola | 29 Apr 19:02 2012
Picon

Re: sbcl jfli

On 29 April 2012 16:11, Kaïraba Cissé <ckairaba <at> gmail.com> wrote:
> There is an important work already done with cl+j. But there is a problem
> between sbcl and java with the initial thread.
> Sbcl crashes when we use it. It works if we use a another thread. I really
> don't understand where the problem comes from !

Can you provide some more details, please: what exactly do you mean
with "using the initial thread" versus "using another thread", what
exactly do you do, how exactly does SBCL crash, etc.

Cheers,

 -- Nikodemus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
Kaïraba Cissé | 29 Apr 21:10 2012
Picon

Re: sbcl jfli

> Can you provide some more details, please: what exactly do you mean
> with "using the initial thread" versus "using another thread", what
> exactly do you do, how exactly does SBCL crash, etc.

I am sorry.
Jean claude beaudoin's post at http://permalink.gmane.org/gmane.lisp.steel-bank.devel/12936 explains very well the problem
You can also download cl+j source code from http://common-lisp.net/project/cl-plus-j/ and read the source file sbcl_repl.lisp
 Cheers

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
Nikodemus Siivola | 29 Apr 23:32 2012
Picon

Re: sbcl jfli

On 29 April 2012 22:10, Kaïraba Cissé <ckairaba <at> gmail.com> wrote:

> Jean claude beaudoin's post at
> http://permalink.gmane.org/gmane.lisp.steel-bank.devel/12936 explains very
> well the problem

If you check the whole thread:

  http://thread.gmane.org/gmane.lisp.steel-bank.devel/12936

what questions are you left with? The answers there seem pretty clear to me.

According to the information there (which seems like it should still
hold, today), if you need to run JVM in the main thread, you need to
disable SBCL's stack switching of the initial thread. This requires
hacking on SBCL. Having a look at call_into_lisp_first_time is a good
starting point. Anton's Windows fork might also offer some help: we
don't switch stacks on Windows, and he has threads working there.

(Alternatively, maybe there's a JVM flag that disables this Hotspot
optimization?)

Cheers,

 -- Nikodemus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel

Gmane