Skip to content

Commit

Permalink
Trac #16474: timeouts in doctests on OS X 10.9
Browse files Browse the repository at this point in the history
There are frequent timeouts when doctesting on OS X with pexpect
interfaces, in particular Singular. For example:
{{{
$ ./sage -tp src/doc/en/constructions

...
----------------------------------------------------------------------
sage -t src/doc/en/constructions/algebraic_geometry.rst  # Timed out
sage -t src/doc/en/constructions/polynomials.rst  # Timed out
----------------------------------------------------------------------
}}}
These became much more frequent by the changes in the Singular/pexpect
interface from #15631 on two buildbots:
* OSX 10.9 (Oxford)
* Ubuntu 8.04 (UW)
* This happens mostly during parallel doctesting, and disappers when the
system load is low
Other build bots do not seem to be affected, so its a likely pty kernel
bug.

URL: http://trac.sagemath.org/16474
Reported by: jhpalmieri
Ticket author(s): Volker Braun
Reviewer(s): John Palmieri
  • Loading branch information
Release Manager authored and vbraun committed Jun 21, 2014
2 parents 920c16e + 2928b9a commit b0a5eae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sage/interfaces/expect.py
Expand Up @@ -437,8 +437,6 @@ def _start(self, alt_message=None, block_during_init=True):

os.chdir(current_path)
self._expect.timeout = self.__max_startup_time
if not self._terminal_echo:
self._expect.setecho(0)

#self._expect.setmaxread(self.__maxread)
self._expect.maxread = self.__maxread
Expand All @@ -451,6 +449,14 @@ def _start(self, alt_message=None, block_during_init=True):
failed_to_start.append(self.name())
raise RuntimeError("Unable to start %s"%self.name())
self._expect.timeout = None

# Calling tcsetattr earlier exposes bugs in various pty
# implementations, see :trac:`16474`. Since we haven't
# **written** anything so far it is safe to wait with
# switching echo off until now.
if not self._terminal_echo:
self._expect.setecho(0)

with gc_disabled():
if block_during_init:
for X in self.__init_code:
Expand Down

0 comments on commit b0a5eae

Please sign in to comment.