[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-07-09 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset ad16e4a0ef80 by Victor Stinner in branch '3.2':
Issue #12429: Skip interrupted write tests on FreeBSD = 7
http://hg.python.org/cpython/rev/ad16e4a0ef80

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-07-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-07-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset a624b86264a4 by Victor Stinner in branch '2.7':
Issue #12429: Skip interrupted write tests on FreeBSD = 7
http://hg.python.org/cpython/rev/a624b86264a4

New changeset e924e51e9447 by Victor Stinner in branch '3.2':
Issue #12429: Skip interrupted write tests on FreeBSD = 7
http://hg.python.org/cpython/rev/e924e51e9447

New changeset 79d7bcbe88f6 by Victor Stinner in branch 'default':
null merge 3.2
http://hg.python.org/cpython/rev/79d7bcbe88f6

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-06-28 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

test_io.check_interrupted_write() has two threads and a pipe:

 - reader (thread): read one byte from the pipe
 - writer (main thread): write 1 MB into the pipe

An alarm (SIGALRM) is scheduled in one second. The writer blocks because the 
pipe buffer is smaller than 1 MB, but it is supposed to fill the pipe. The 
reader is supposed to exit quickly: the writer wrote a least one byte.

The test fails *sometimes* on FreeBSD 6:

[ 85/352] test_io
Exception in thread Thread-274:
Traceback (most recent call last):
  File /usr/home/db3l/buildarea/3.2.bolen-freebsd/build/Lib/threading.py, 
line 736, in _bootstrap_inner
self.run()
  File /usr/home/db3l/buildarea/3.2.bolen-freebsd/build/Lib/threading.py, 
line 689, in run
self._target(*self._args, **self._kwargs)
  File /usr/home/db3l/buildarea/3.2.bolen-freebsd/build/Lib/test/test_io.py, 
line 2660, in _read
s = os.read(r, 1)
OSError: [Errno 4] Interrupted system call

It is a race condition, this buildbot is very slow. The reader has maybe not 
enough time to read 1 byte.

The test was fixed in Python 3.3 (#11859) by adding pthread_sigmask() (issue 
#8407) and using it in the test: commit 28b9702a83d1.

The problem looks to be specific of FreeBSD 6 and 7 (according to #11859). The 
easiest solution is to skip the test on these platforms.

To workaround the lack of pthread_sigmark(), we can use two processes instead 
of two threads. But it is maybe too much work just to fix a bug in a test (the 
bug is not in Python).

--
components: IO, Tests
messages: 139355
nosy: haypo, neologix
priority: normal
severity: normal
status: open
title: test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on 
Python 2.7/3.2
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-06-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch to skip the test on FreeBSD 5, 6 and 7.

I was unable to reproduce #11859 on my FreeBSD 8 VM, so I didn't add freebsd8.

--
keywords: +patch
Added file: http://bugs.python.org/file22506/test_io_skip_freebsd.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com