Robot framework hang

1,189 views
Skip to first unread message

Chris D

unread,
Mar 10, 2011, 3:27:58 AM3/10/11
to robotframework-users
Hi all,

I am experiencing an issue with Robot where it seems to be hitting a
deadlock or some other kind of freeze. It happens often at the end of
a keyword. In the debug log I see the message printed saying the
keyword has finished executing, then it justs sits there. Nothing
further happens until I send a keyboard interrupt. Has anyone seen
this issue before?

OS: Windows Server 2008 R2
Python: 2.7.6
Robot: latest version

Thanks,
Chris

Mikko Korpela

unread,
Mar 10, 2011, 3:53:13 AM3/10/11
to cde...@gmail.com, robotframework-users
Hi Chris,

Unfortunately I haven't seen this issue.

The debug print seems to indicate that the issue isn't directly in the
library keywords..

Some things that I would check:
- Do you have any listeners that could be causing this issue?
- Could there be some concurrency related issue in the keyword library
(robot internally doesn't seem to use threads)
- Is there a resource that has been locked for some reason (like a log
file or something)

Hope you get your tests working!

Kind regards,
Mikko

2011/3/10 Chris D <cde...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
>
>

--
Mikko Korpela

Chris D

unread,
Mar 15, 2011, 11:24:50 PM3/15/11
to robotframework-users
I believe I have found the source of the problem. It is occurring
occasionally when RF tries to flush stdout or stderr (whichever is
being used to print the messages to the command line). The problem
happens when RF is run from within MS Powershell. RF calls flush which
blocks indefinitely because the buffer can't be flushed for whatever
reason. Running from cmd.exe doesn't seem to be subject to this
problem.

On Mar 10, 7:53 pm, Mikko Korpela <mikko.korp...@gmail.com> wrote:
> Hi Chris,
>
> Unfortunately I haven't seen this issue.
>
> The debug print seems to indicate that the issue isn't directly in the
> library keywords..
>
> Some things that I would check:
> - Do you have any listeners that could be causing this issue?
> - Could there be some concurrency related issue in the keyword library
> (robot internally doesn't seem to use threads)
> - Is there a resource that has been locked for some reason (like a log
> file or something)
>
> Hope you get your tests working!
>
> Kind regards,
> Mikko
>
> 2011/3/10 Chris D <cdek...@gmail.com>:

Pekka Klärck

unread,
Mar 17, 2011, 6:02:44 AM3/17/11
to cde...@gmail.com, robotframework-users
2011/3/16 Chris D <cde...@gmail.com>:

> I believe I have found the source of the problem. It is occurring
> occasionally when RF tries to flush stdout or stderr (whichever is
> being used to print the messages to the command line). The problem
> happens when RF is run from within MS Powershell. RF calls flush which
> blocks indefinitely because the buffer can't be flushed for whatever
> reason. Running from cmd.exe doesn't seem to be subject to this
> problem.

This sounds pretty strange and kind of like a bug in Powershell. Have
you tried to remove flushing of stdout and stderr? That's done at the
end of _write method in robot/output/monitor.py file. I just tested
that removing it doesn't seem to affect how messages are written to
the normal Windows console, and if it doesn't affect Linux and OSX
either, and fixes your problem, we probably can remove the flushing
altogether.

You might nevertheless want to submit a bug report about this.

Cheer,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Chris D

unread,
Mar 29, 2011, 9:02:04 PM3/29/11
to robotframework-users
Hi Pekka,

Thanks for your advice - I will do some tests and see if removing the
flushing fixes the problem. It is only intermittent so may take some
time. I'll submit an issue so we can keep track of this.

Chris

On Mar 17, 9:02 pm, Pekka Klärck <p...@iki.fi> wrote:
> 2011/3/16 Chris D <cdek...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages