[issue1234] semaphore errors on AIX 5.2

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +930

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2017-03-27 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2017-03-27 Thread Michael Seifert

Changes by Michael Seifert :


--
pull_requests: +753

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2008-01-30 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Christian, could you apply this patch ? It needs a working autoconf 2.61
installation which I currently don't have.

The patch itself, does the trick, so should go in.

Thanks.

--
assignee: lemburg - tiran

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2008-01-30 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in r60464 (trunk) and r60465 (25)

--
resolution: accepted - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2008-01-03 Thread Christian Heimes

Changes by Christian Heimes:


--
versions:  -Python 2.3, Python 2.4

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2008-01-03 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, accepted for 2.5 and 2.6.

Can someone with a stake and submit access (e.g. lemburg) check it in?

--
assignee:  - lemburg
resolution:  - accepted

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-11-20 Thread Guido van Rossum

Guido van Rossum added the comment:

I have no way to test this.

--
assignee: gvanrossum - 
priority: high - normal

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee:  - gvanrossum
nosy: +gvanrossum

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-11-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The problem is also present in Python 2.4 and 2.3. Confirmed on AIX 5.3.

--
nosy: +lemburg
versions: +Python 2.3, Python 2.4

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-11-09 Thread Christian Heimes

Christian Heimes added the comment:

I'm setting the priority to high because it sounds important for AIX
users and the patch is *really* simple, just two additional lines for
configure.in

--
keywords: +patch
nosy: +tiran
priority:  - high
versions: +Python 2.5, Python 2.6, Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-11-07 Thread Sébastien Sablé

Sébastien Sablé added the comment:

The bug is still present in Python 2.5.1. The same patch applies.
The patch is rather trivival, could someone please integrate it in trunk?
Thanks in advance

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-10-04 Thread Sébastien Sablé


Sébastien Sablé
 added the comment:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: The Written Word (Albert Chin) (tww-china)
Assigned to: Nobody/Anonymous (nobody)
Summary: semaphore errors from Python 2.3.x on AIX 5.2

Initial Comment:
Newer versions of the AIX 5.2 libc implement POSIX
semaphores and thus define _POSIX_SEMAPHORES in
unistd.h. However, when building Python 2.3.x (and
I'm sure any other version with sem_init()), a few
semaphore errors are encountered:
  building 'pcre' extension
  ./Modules/ld_so_aix gcc -bI:Modules/python.exp  
-L/opt/TWWfsw/python232/lib/support -Wl,-brtl  
-Wl,-blibpath:/opt/TWWfsw/python232/lib/support:/usr/lib  
build/temp.aix-5.2-2.3/pcremodule.o   build/temp.aix-5.2-2.3/pypcre.o
-L/opt/TWWfsw/python232/lib   -o build/lib.aix-5.2-2.3/pcre.so
  sem_trywait: Permission denied
  sem_wait: Permission denied
  sem_post: Permission denied

I ran the Python process under truss and saw that the
sem_init() from Python/thread_pthread.h worked
successfully. fork() was then called and a
sem_trywait() operation (probably from
PyThread_acquire_lock()) was called. From the
sem_init() man page
(http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.aix.doc/libs/basetrf2/sem_init.htm):
  If the pshared parameter has a nonzero value, the
semaphore
  is shared between processes. In this case, any
process that can
  access the sem parameter can use it for performing
sem_wait,
  sem_trywait, sem_post, and sem_destroy operations.

  Only the sem parameter itself may be used for performing
  synchronization.

  If the pshared parameter is zero, the semaphore is
shared between
  threads of the process. Any thread in this process
can use the sem
  parameter for performing sem_wait, sem_trywait,
sem_post, and
  sem_destroy operations. The use of the semaphore by
threads
  other than those created in the same process returns
an error.

Setting the 2nd value of sem_init to 1 (was 0) solved
the problem. However, I don't know if this is wise for
security. Another solution is to set
HAVE_BROKEN_POSIX_SEMAPHORES for AIX/5 like for
SunOS/5.8.

--

Comment By: Leanid (lim_1)
Date: 2005-06-20 13:12

Message:
Logged In: YES 
user_id=701470

I can confirm this problem. I am using scons to build my 
project on AIX. I could not run parallel builds (-j4) on AIX. 
Randomly, but very often xlC invocation would stuck and I 
have 4 xlCcode hanging and taking all CPUs.


After adding HAVE_BROKEN_POSIX_SEMAPHORES for 
AIX and rebuilding Python parallel builds on AIX are fine. 
Trying first fix with changing 0 to 1 in sem_init also resolved 
this problem, but I started to get some other unexplained 
error from scons, so had to deactivate semaphores all 
together.

Albert, thanks for this report, it helped a lot.

--

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-10-04 Thread Sébastien Sablé

New submission from 
Sébastien Sablé
:

There used to be a bug open concerning this problem in the old bug
tracker but I can't find it in the new bug tracker:

http://mail.python.org/pipermail/python-bugs-list/2005-June/029290.html

--
messages: 56226
nosy: sable
severity: normal
status: open
title: semaphore errors on AIX 5.2

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-10-04 Thread Sébastien Sablé

Changes by 
Sébastien Sablé
:


__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234] semaphore errors on AIX 5.2

2007-10-04 Thread Sébastien Sablé


Sébastien Sablé
 added the comment:

I can confirm that this bug is still present in Python 2.4.1 (and
probably later versions) on AIX 5.2 and 5.3.

When HAVE_BROKEN_POSIX_SEMAPHORES is not defined at compile time, Python
will spend a lot of time in sem_wait, usually when acessing files.
The problem does not always happen as it seems to depend on the type of
file system in use.

In my programm running for 3m30s, Python would call about 40 time
sem_wait and spend about 2mins waiting. When Python is compiled with
HAVE_BROKEN_POSIX_SEMAPHORES, the same programm will only take 1m30s.

I attach a patch which solves the problem.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1234
__Index: configure.in
===
--- configure.in	(révision 365)
+++ configure.in	(copie de travail)
@@ -1782,6 +1782,8 @@
   SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
 		   Define if the Posix semaphores do not work on your system)
 		   ;;
+  AIX/5) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
+		   Define if the Posix semaphores do not work on your system)
   esac
 
   AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com