Issue 5609 in selenium: python: Not reading from pipe causes firefox to stuck

4 views
Skip to first unread message

sele...@googlecode.com

unread,
May 8, 2013, 9:32:34 AM5/8/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 5609 by de...@surfly.com: python: Not reading from pipe causes
firefox to stuck
http://code.google.com/p/selenium/issues/detail?id=5609

I've experienced Firefox process to completely stuck when run through
selenium. The problem is that Firefox (on my machine) spits out a lot of
debugging information to stderr.

Selenium install a PIPE for stderr but does not bother to read from it (it
seems). Such when pipe buffer is filled, the whole process becomes stuck.

This patch fixes the problem at the expense of spewing a lot of garbage to
the terminal. The proper solution would be to redirect that data to
/dev/null

--- a/3rdparty/selenium/webdriver/firefox/firefox_binary.py
+++ b/3rdparty/selenium/webdriver/firefox/firefox_binary.py
@@ -69,11 +69,11 @@ class FirefoxBinary(object):
for cli in self.command_line:
command.append(cli)

- Popen(command, stdout=PIPE, stderr=STDOUT,
+ Popen(command,
env=self._firefox_env).communicate()
command[1] = '-foreground'
self.process = Popen(
- command, stdout=PIPE, stderr=STDOUT,
+ command,
env=self._firefox_env)

def _get_firefox_output(self):


Selenium version: 2.32.0
OS: Ubuntu 12.04
Browser: Firefox 20
Browser version: 20.0+build1-0ubuntu0.12.04.3

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
May 9, 2013, 1:25:20 PM5/9/13
to selenium-develope...@googlegroups.com
Updates:
Cc: luke.semerau david.bu...@theautomatedtester.co.uk
Labels: Browser-Firefox Lang-Python

Comment #1 on issue 5609 by barancev: python: Not reading from pipe causes
(No comment was entered for this change.)

sele...@googlecode.com

unread,
May 24, 2013, 12:40:45 PM5/24/13
to selenium-develope...@googlegroups.com

Comment #2 on issue 5609 by jayakuma...@gmail.com: python: Not reading from
Opened a PR to fix this issue.
https://github.com/SeleniumHQ/selenium/pull/82

You can now be able to redirect the process output to a file/sys.stdout.
Firefox(firefox_binary=FirefoxBinary(log_file=sys.stdout))

sele...@googlecode.com

unread,
Jun 12, 2013, 3:10:33 PM6/12/13
to selenium-develope...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 5609 by luke.semerau: python: Not reading from pipe
This issue was closed by revision 5d69e4763aea.

sele...@googlecode.com

unread,
May 2, 2014, 4:03:52 PM5/2/14
to selenium-develope...@googlegroups.com

Comment #4 on issue 5609 by de...@surfly.com: python: Not reading from pipe
So by default it will still use PIPE and thus hang? Is it possible to have
a more sensible default?

https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/chrome/service.py
have
the same problem, btw.
Reply all
Reply to author
Forward
0 new messages