[Pharo-project] Needs help with hang images
Hello. I have standalone application with UI which hangs sometime (very *rarely*). This application has many threads which interacts with server. All interactions with server and UI activity logged. But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang. So I need help. What information about system can help me? What code I should use? Is somebody has same problems? Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable cog (not latest I think). Best regards, Denis
On Fri, Mar 23, 2012 at 02:13:57PM +0400, Denis Kudriashov wrote:
Hello.
I have standalone application with UI which hangs sometime (very *rarely*). This application has many threads which interacts with server. All interactions with server and UI activity logged.
But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang.
So I need help. What information about system can help me? What code I should use? Is somebody has same problems?
If this is Cog on Unix/Linux you can send SIGUSR1 to the VM to cause it to print a diagnostic stack trace (the Smalltalk stacks) to its output. That may give you a better idea of the source of the problem. For example, from a Unix shell use "ps -f" to identify the pid of the Cog VM process, and if the pid is 1234, then you can do "kill -SIGUSR1 1234" and a stack trace will be printed to your terminal window. (Note, a similar mechanism is present in OSProcess for use with interpreter VMs). Dave
Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable cog (not latest I think).
Sorry, I forget to say that all run on Windows 2012/3/23 David T. Lewis <lewis@mail.msen.com>
On Fri, Mar 23, 2012 at 02:13:57PM +0400, Denis Kudriashov wrote:
Hello.
I have standalone application with UI which hangs sometime (very *rarely*). This application has many threads which interacts with server. All interactions with server and UI activity logged.
But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang.
So I need help. What information about system can help me? What code I should use? Is somebody has same problems?
If this is Cog on Unix/Linux you can send SIGUSR1 to the VM to cause it to print a diagnostic stack trace (the Smalltalk stacks) to its output. That may give you a better idea of the source of the problem. For example, from a Unix shell use "ps -f" to identify the pid of the Cog VM process, and if the pid is 1234, then you can do "kill -SIGUSR1 1234" and a stack trace will be printed to your terminal window. (Note, a similar mechanism is present in OSProcess for use with interpreter VMs).
Dave
Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable
cog
(not latest I think).
You could use MingW (for GDB): http://hamsterrepublic.com/ohrrpgce/GDB_on_Windows.html Max On 23.03.2012, at 14:55, Denis Kudriashov wrote:
Sorry, I forget to say that all run on Windows
2012/3/23 David T. Lewis <lewis@mail.msen.com> On Fri, Mar 23, 2012 at 02:13:57PM +0400, Denis Kudriashov wrote:
Hello.
I have standalone application with UI which hangs sometime (very *rarely*). This application has many threads which interacts with server. All interactions with server and UI activity logged.
But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang.
So I need help. What information about system can help me? What code I should use? Is somebody has same problems?
If this is Cog on Unix/Linux you can send SIGUSR1 to the VM to cause it to print a diagnostic stack trace (the Smalltalk stacks) to its output. That may give you a better idea of the source of the problem. For example, from a Unix shell use "ps -f" to identify the pid of the Cog VM process, and if the pid is 1234, then you can do "kill -SIGUSR1 1234" and a stack trace will be printed to your terminal window. (Note, a similar mechanism is present in OSProcess for use with interpreter VMs).
Dave
Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable cog (not latest I think).
I had such an image last week and I managed to get the stacks with GDB (this was on a Debian Linux. When trying the same on my Mac I had to force shutdown the machine⦠doesn't seem to work the same everywhereâ¦): $ gdb attach <pid> In case stdout/stderr are not redirected to a file, we redirect them to your shell. Else, skip to (*). (gdb) call (void) close(1) (gdb) call (void) close(2) Now, let's see which shell we are on: (gdb) shell tty /dev/ttyp1 <----- the result may be different (this is the whole point) (gdb) call (int) open("/dev/ttyp1", 2, 0) <----- set the right shell here $1 = 1 (gdb) call (int) open("/dev/ttyp1", 1, 0) <----- here too $2 = 2 (*) No, lets get some datapoints (gdb) call printCallStack() // prints the current active Smalltalk stack (gdb) call (int) printAllStacks() // prints all Smalltalk stacks gdb) bt // prints the C backtrace, i.e., the stack of the VM interpreter In case you use stdout/stderr redirected to files, you may need to flush to see the output: (gdb) call fflush(stderr) (gdb) call fflush(stdout) from: http://developer.apple.com/technotes/tn/tn2032.html http://minnow.cc.gatech.edu/squeak/533 HTH, Max On 23.03.2012, at 11:13, Denis Kudriashov wrote:
Hello.
I have standalone application with UI which hangs sometime (very rarely). This application has many threads which interacts with server. All interactions with server and UI activity logged.
But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang.
So I need help. What information about system can help me? What code I should use? Is somebody has same problems?
Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable cog (not latest I think).
Best regards, Denis
On Fri, Mar 23, 2012 at 3:13 AM, Denis Kudriashov <dionisiydk@gmail.com>wrote:
Hello.
I have standalone application with UI which hangs sometime (very *rarely*) . This application has many threads which interacts with server. All interactions with server and UI activity logged.
But at hang state there are no new log entries. There are no server interactions. It looks like all VM block image stuff. ("alt ." not work too). Logs always finished at same position. I know where I should add extra logging which give me information before hang.
So I need help. What information about system can help me? What code I should use? Is somebody has same problems?
Application uses old cog VM (maybe one of first distributions from Eliot) and Pharo1.1. Application uses continuations actively. I want try updated VM. What version I should use? I need most reliable cog (not latest I think).
The latest is likely to be the most reliable. Cog is pretty stable right now and is getting bug fixes. When significant new development happens this will change. But right now the latest VMs in http://www.mirandabanda.org/files/Cog/VM/ are the best ones I build to use, and Igor can point you to the best ones he builds.
Best regards, Denis
-- best, Eliot
participants (4)
-
David T. Lewis -
Denis Kudriashov -
Eliot Miranda -
Max Leske