Runtime Image won't stop

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

Runtime Image won't stop

Hermann Ottens
Hi group,

we're having the following problem (using VASmalltalk 8.5.2 on Windows):
An error occurs for which we don't have a proper handling (yet).
The dialog "Runtime error: .... See the file ... for more information. Do you wish to exit?" pops up.
The user confirms with "yes", all windows vanish, but the OS process still exists and uses 100% of one cpu.
I looked up the code and it seems to me that the only place from which the dialog box could originate is in
EpRuntimeStartUp class>>#reportError:resumable:startBP:
and after the user clicks "yes" the program should exit via "System exit" but it simply doesn't.

Any ideas?

(BTW, if i check this in the development environment it does in fact exit.)

Hermann

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Louis LaBrunda
Hi Herman,

This looks like two problems.  Your's that caused the walkback in the first place and Instantiations (sorry guys) that didn't exit cleanly.  Can you tell us what the walkback says, even if you have solved your problem, as it may help with solving the second problem.

I know the process of exiting after an error works (at least most of the time, I have never seen it fail).  I think it works with 8.5.2, I can't be 100% sure about 8.5.2 as I have GUIs build on other versions and can't remember if I have seen it work on 8.5.2.

Lou

On Monday, April 22, 2013 5:20:29 AM UTC-4, Hermann Ottens wrote:
Hi group,

we're having the following problem (using VASmalltalk 8.5.2 on Windows):
An error occurs for which we don't have a proper handling (yet).
The dialog "Runtime error: .... See the file ... for more information. Do you wish to exit?" pops up.
The user confirms with "yes", all windows vanish, but the OS process still exists and uses 100% of one cpu.
I looked up the code and it seems to me that the only place from which the dialog box could originate is in
EpRuntimeStartUp class>>#reportError:resumable:startBP:
and after the user clicks "yes" the program should exit via "System exit" but it simply doesn't.

Any ideas?

(BTW, if i check this in the development environment it does in fact exit.)

Hermann

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Hermann Ottens
Hi Lou,

i'm a bit further in my investigation. It seems as if the AcoResourcManager>>terminate called by EsAsynchronousCallout class>>exiting which is in turn called by EmSystemConfiguration>>exiting runs into a never ending loop.
Obviously the error (and the walkback) occurs while we are having open AcoFutures or something similar (which we are using in fact) running in another process.
Instantiations is not to blame for not exiting cleanly. I think we have to go to the source of the problem (thank you for pointing that out), catch the original error, stop the other processes so that the cleaning up would work then.

Cheers, Hermann

Am Montag, 22. April 2013 16:30:12 UTC+2 schrieb Louis LaBrunda:
Hi Herman,

This looks like two problems.  Your's that caused the walkback in the first place and Instantiations (sorry guys) that didn't exit cleanly.  Can you tell us what the walkback says, even if you have solved your problem, as it may help with solving the second problem.

I know the process of exiting after an error works (at least most of the time, I have never seen it fail).  I think it works with 8.5.2, I can't be 100% sure about 8.5.2 as I have GUIs build on other versions and can't remember if I have seen it work on 8.5.2.

Lou

On Monday, April 22, 2013 5:20:29 AM UTC-4, Hermann Ottens wrote:
Hi group,

we're having the following problem (using VASmalltalk 8.5.2 on Windows):
An error occurs for which we don't have a proper handling (yet).
The dialog "Runtime error: .... See the file ... for more information. Do you wish to exit?" pops up.
The user confirms with "yes", all windows vanish, but the OS process still exists and uses 100% of one cpu.
I looked up the code and it seems to me that the only place from which the dialog box could originate is in
EpRuntimeStartUp class>>#reportError:resumable:startBP:
and after the user clicks "yes" the program should exit via "System exit" but it simply doesn't.

Any ideas?

(BTW, if i check this in the development environment it does in fact exit.)

Hermann

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Louis LaBrunda
Hi Hermann,

I take your point about not blaming Instantiations for not exiting cleanly (sorry guys).  But then I suggest you look into adding some termination code for your classes that use the "Aco" stuff.  I don't know anything about the "Aco" stuff but it may help Smalltalk to exiting cleanly if objects free up stuff that Smalltalk doesn't know they are hanging on to.

Lou

On Tuesday, April 23, 2013 10:08:49 AM UTC-4, Hermann Ottens wrote:
Hi Lou,

i'm a bit further in my investigation. It seems as if the AcoResourcManager>>terminate called by EsAsynchronousCallout class>>exiting which is in turn called by EmSystemConfiguration>>exiting runs into a never ending loop.
Obviously the error (and the walkback) occurs while we are having open AcoFutures or something similar (which we are using in fact) running in another process.
Instantiations is not to blame for not exiting cleanly. I think we have to go to the source of the problem (thank you for pointing that out), catch the original error, stop the other processes so that the cleaning up would work then.

Cheers, Hermann

Am Montag, 22. April 2013 16:30:12 UTC+2 schrieb Louis LaBrunda:
Hi Herman,

This looks like two problems.  Your's that caused the walkback in the first place and Instantiations (sorry guys) that didn't exit cleanly.  Can you tell us what the walkback says, even if you have solved your problem, as it may help with solving the second problem.

I know the process of exiting after an error works (at least most of the time, I have never seen it fail).  I think it works with 8.5.2, I can't be 100% sure about 8.5.2 as I have GUIs build on other versions and can't remember if I have seen it work on 8.5.2.

Lou

On Monday, April 22, 2013 5:20:29 AM UTC-4, Hermann Ottens wrote:
Hi group,

we're having the following problem (using VASmalltalk 8.5.2 on Windows):
An error occurs for which we don't have a proper handling (yet).
The dialog "Runtime error: .... See the file ... for more information. Do you wish to exit?" pops up.
The user confirms with "yes", all windows vanish, but the OS process still exists and uses 100% of one cpu.
I looked up the code and it seems to me that the only place from which the dialog box could originate is in
EpRuntimeStartUp class>>#reportError:resumable:startBP:
and after the user clicks "yes" the program should exit via "System exit" but it simply doesn't.

Any ideas?

(BTW, if i check this in the development environment it does in fact exit.)

Hermann

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Marten Feldtmann-2
Whenever a background-thread is running the main application will not stop. This is the same with VASmalltalk (async calls or future async calls) as it is with C#. Its a programmers problem ...

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Wayne Johnston
I take it there is not a way to implement a #extremelyPrimitiveExit which does "I don't care what else is going on in this image, I want to exit".

Our headless application has been getting stuck when stopping lately, and it could be this Aco stuff (due to threaded database calls).

Marten, would it help if I kill all (other) processes (#allProcesses) except for the current process?  Or maybe use that nice looking #cleanupAllProcesses method?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Marten Feldtmann-2
Sorry no idea. Actually Microsoft says, that threads must be terminated in a "good" way - otherwise Windows resources might not be released (though allocated memory is always released).

But again - no further idea from me.




--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Wayne Johnston
I think I've answered my own question.  Our headless server code had been doing "System exit".  I added test code to our headless image to do continuous database queries and could reproduce the stuck stopping problem sometimes.  Now that I changed the code to do "System primitiveExit", I can't reproduce the problem.  So that's good.  I know we should gracefully shut down the database layer but we had seen that was sometimes getting stuck earlier.

I did uncover a rather disturbing problem where the headless server, doing file I/O at the time of the service stop request from Windows, behaves as if it never got the stop request.  Actually the process that was doing the I/O and got the stop request stays stuck, while other processes continue to run.  But I'm going to run that by Instantiations support.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Wayne Johnston
Disregard the "disturbing problem" above, it was an unrelated problem due to our logging to a file going through Semaphore>>#critical: - and then the stop request coming in, which causes the current process to try logging.  And Semaphore is not re-entrant, which is easily solved by using SstRecursiveMutex instead.  Sorry for making it sound general to file I/O.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Louis LaBrunda
In reply to this post by Wayne Johnston
Hi Wayne,

On Thursday, June 27, 2013 9:18:02 AM UTC-4, Wayne Johnston wrote:
I think I've answered my own question.  Our headless server code had been doing "System exit".  I added test code to our headless image to do continuous database queries and could reproduce the stuck stopping problem sometimes.  Now that I changed the code to do "System primitiveExit", I can't reproduce the problem.  So that's good.  I know we should gracefully shut down the database layer but we had seen that was sometimes getting stuck earlier.

You might try forking: 

[Delay forSeconds: 30) wait.
System primitiveExit.
] fork.

and then doing a "System exit".  Hopefully the "System exit" will exit cleanly but if it doesn't the "System primitiveExit" should get you out within 30 seconds (or whatever you like).

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Runtime Image won't stop

Özer DURMAZ
In reply to this post by Hermann Ottens

On Windows, you can try this:
    OSHandle getCurrentProcess terminateProcess: 0.
This terminates abt or nodialog immediately.


22 Nisan 2013 Pazartesi 12:20:29 UTC+3 tarihinde Hermann Ottens yazdı:
Hi group,

we're having the following problem (using VASmalltalk 8.5.2 on Windows):
An error occurs for which we don't have a proper handling (yet).
The dialog "Runtime error: .... See the file ... for more information. Do you wish to exit?" pops up.
The user confirms with "yes", all windows vanish, but the OS process still exists and uses 100% of one cpu.
I looked up the code and it seems to me that the only place from which the dialog box could originate is in
EpRuntimeStartUp class>>#reportError:resumable:startBP:
and after the user clicks "yes" the program should exit via "System exit" but it simply doesn't.

Any ideas?

(BTW, if i check this in the development environment it does in fact exit.)

Hermann

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.