Hanging at the command line

Hello All–

My daily script run has begun hanging over the last couple of days. I haven’t changed anything related to that test driver machine, nor have I updated the script that kicks off all the tests.

My basic script loops like this:

repeat with each line in theConnectionList
   connect value(it)
   (*do stuff*)
   sendMail(to:me,subject:"All's Well",body:theMessage)
end repeat

The first iteration of the loop works correctly. Sometime during the second loop, runscript hangs. No exceptions, nothing in the logs indicate that anything’s wrong, and I have to force quit one or more instances of the app.

A couple of words about this machine. It has 3 licenses. The above script is kicked off by a remote machine sending a runscript command via the shell. There’s another script that is run every 3 hours using an available license against a completely different machine than the set that are used for the loop.

None of this happens from the GUI on the same machine (of course). I just ran the loop twice while typing this up. I’d like to debug this. I’ve rebooted the machine a couple of times, but that doesn’t seem to fix it. I’ve also cleared breakpoints out of the GUI, but I doubt that has little to do with this.

Thanks for any help.

So it sounds like it’s hanging in the middle of (do stuff)? Two things: First, when it’s hung, open the Activity Monitor, take a sample of the Eggplant process, and send it to support. Second, look at the result logs and see what the last command completed was. From that you should be able to tell what the next command is (which is at least near to where the hang is occurring). Is it hanging at the same place each time or is it happening randomly?

Yep. That’s correct.

Two things: First, when it’s hung, open the Activity Monitor, take a sample of the Eggplant process, and send it to support
.
Will do.

Second, look at the result logs and see what the last command completed was. From that you should be able to tell what the next command is (which is at least near to where the hang is occurring). Is it hanging at the same place each time or is it happening randomly?

I’ve been looking through the log, and one of them had errored out:

PantomimeReadTimeoutExeception Timeout has expired for read()

The others appear to hang during a longish (120 seconds…) waitFor, but it says that it found the image (after about 60 seconds), and that’s the last entry in the log.

If it logged a line then it pretty much had completed the operation and it is probably the subsequent line of the script that is actually hanging Eggplant. Feel free to send in you Sample report and we’ll definitely be able to give you an idea about what it’s stuck in.

Jonathan–

You must have waved your magic wand again. :smiley: The hang appears to be gone. However, I think I may have isolated what causes it. At the bottom of the loop is a disconnect command. On the script’s last iteration overnight, it logged as a failure:

2009-02-04 03:31:25.954 -0600	disconnect		QALAB03-DEV	71	on_m_dailyexecution	m_DailyExecution.script
2009-02-04 03:32:27.612 -0600	FAILURE		PantomimeReadTimeoutException Timeout has expired for read() Execution Time 0:05:37 m_DailyExecution.script

I didn’t realize that our Eggplant license included a mime. :wink:

As always, any help is appreciated…

Allen

Not speaking as a developer, this seems odd to me, because I believe pantomime is the library used for sending mail – do you have a sendmail command in this script?

Another question: Since you’re doing a disconnect, I need to ask if you are also doing a shutdown or restart of the SUT? We’ve recently discovered an issue when a remote system drops the connection (which can happen before your disconnect completes if you’ve scripted a restart.) This sometimes causes Eggplant to crash, but I suppose it could also lead to a hang.

Yes I do. The script had sent 2 emails prior to this error.

No we’re just disconnecting. On windows, I do script a logout on winXP. On Vista, RealVNC won’t run as a system service so it doesn’t log out.

You may be aware of this, but the non-free versions of RealVNC will run as a service on Vista, so if you need that functionality, it is available for a [small] price.

I did know that, but had forgotten. Thanks for the reminder. Do you happen to know if it solves the problem of VNC connections getting booted when Vista prompts you to elevate your credentials?

Hey Matt–

Just caught our scheduled executions hanging again. Sending you a sample, crash report, and screen shot.