API Instability on Linux

View: New views
3 Messages — Rating Filter:   Alert me  

API Instability on Linux

by Steven Yi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

I've been trying to diagnose instability with blue and using the API
on Linux and am starting to get somewhere but need some advice.  I
found that if I run the JVM with -Xcheck:jni, I can run blue on Linux
with the API.  What this flag does though is to do some wrapping of
native methods, and although I'm not quite sure exactly what happens,
I did see that it does report the signal handlers (SIGTERM, etc.) for
the app.  That made me think and I looked around and in the app and
noticed in Top/csound.c we have the signal_handler calling exit(1).
I'm wondering if this is what is killing blue when something goes off
in csound, or could be related.  I see that most places when there is
an error we do not directly exit but rather longjmp. With the
signal_handler, we don't have a reference to csound though.

So, does this seem problematic to anyone that we're calling exit()?
I'm not all that sure if this will always take down a host if using
the API and whether this is really what is causing the problem.  So
any help here very much appreciated!

Thanks!
steven

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: API Instability on Linux

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think calling exit() is not very satisfactory. There is a static variable
(exitNow_) that seems to control this (is it supposed to be used?).

Victor


----- Original Message -----
From: "Steven Yi" <stevenyi@...>
To: "Developer discussions" <csound-devel@...>
Sent: Thursday, September 18, 2008 7:38 AM
Subject: [Cs-dev] API Instability on Linux


> Hi All,
>
> I've been trying to diagnose instability with blue and using the API
> on Linux and am starting to get somewhere but need some advice.  I
> found that if I run the JVM with -Xcheck:jni, I can run blue on Linux
> with the API.  What this flag does though is to do some wrapping of
> native methods, and although I'm not quite sure exactly what happens,
> I did see that it does report the signal handlers (SIGTERM, etc.) for
> the app.  That made me think and I looked around and in the app and
> noticed in Top/csound.c we have the signal_handler calling exit(1).
> I'm wondering if this is what is killing blue when something goes off
> in csound, or could be related.  I see that most places when there is
> an error we do not directly exit but rather longjmp. With the
> signal_handler, we don't have a reference to csound though.
>
> So, does this seem problematic to anyone that we're calling exit()?
> I'm not all that sure if this will always take down a host if using
> the API and whether this is really what is causing the problem.  So
> any help here very much appreciated!
>
> Thanks!
> steven
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: API Instability on Linux

by Steven Yi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Victor,

I tried setting exitNow_ to 1 instead of calling exit(1) and comitted,
but just did some further tests and found it didn't solve the problem
so will revert momentarily.  I'm going to keep looking for the issue.

Thanks!
steven

On Wed, Sep 17, 2008 at 11:57 PM, victor <Victor.Lazzarini@...> wrote:

> I think calling exit() is not very satisfactory. There is a static variable
> (exitNow_) that seems to control this (is it supposed to be used?).
>
> Victor
>
>
> ----- Original Message -----
> From: "Steven Yi" <stevenyi@...>
> To: "Developer discussions" <csound-devel@...>
> Sent: Thursday, September 18, 2008 7:38 AM
> Subject: [Cs-dev] API Instability on Linux
>
>
>> Hi All,
>>
>> I've been trying to diagnose instability with blue and using the API
>> on Linux and am starting to get somewhere but need some advice.  I
>> found that if I run the JVM with -Xcheck:jni, I can run blue on Linux
>> with the API.  What this flag does though is to do some wrapping of
>> native methods, and although I'm not quite sure exactly what happens,
>> I did see that it does report the signal handlers (SIGTERM, etc.) for
>> the app.  That made me think and I looked around and in the app and
>> noticed in Top/csound.c we have the signal_handler calling exit(1).
>> I'm wondering if this is what is killing blue when something goes off
>> in csound, or could be related.  I see that most places when there is
>> an error we do not directly exit but rather longjmp. With the
>> signal_handler, we don't have a reference to csound though.
>>
>> So, does this seem problematic to anyone that we're calling exit()?
>> I'm not all that sure if this will always take down a host if using
>> the API and whether this is really what is causing the problem.  So
>> any help here very much appreciated!
>>
>> Thanks!
>> steven
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@...
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel
LightInTheBox - Buy quality products at wholesale price!