[Bug 604753] Re: [eglibc] process shared mutex's fail on armel v7 (thumb)

2011-02-21 Thread Ken Werner
I think this the issue has been fixed by #643171. I do not see this
testcase failing using a recent (e)glibc and GCC. Could anyone of the
original reporters check if it works for them? Please make sure that you
use at least glibc 2.12.1-0ubuntu11 and GCC 4.5.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apr in ubuntu.
https://bugs.launchpad.net/bugs/604753

Title:
  [eglibc] process shared mutex's fail on armel v7 (thumb)

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 604753] Re: [eglibc] process shared mutex's fail on armel v7 (thumb)

2011-02-17 Thread Ken Werner
I had a quick look into the apr sources. Their locks/unix/proc_mutex.c can map 
the proc_mutex functionality to various methods:
 1) Posix sem implemenation (see mutex_posixsem_methods)
 2) SysV sem implementation (see mutex_sysv_methods)
 3) pthread implementation  (see mutex_proc_pthread_methods)
 4) fcntl implementation(see mutex_fcntl_methods)
 5) flock implementation(see mutex_flock_methods)

I think only the pthread implemenation (3) is of interest here. The creation of 
the pthread_mutex happens at:
  locks/unix/proc_mutex.c:proc_mutex_proc_pthread_create
that calls pthread_mutex_init with the following attributes:
  PTHREAD_PROCESS_SHARED, PTHREAD_MUTEX_ROBUST_NP, PTHREAD_PRIO_INHERIT
The apr-phthread-mutex functionality relies on pthread_mutex_lock and 
pthread_mutex_trylock. The eglibc implemenation for such a mutex calls 
atomic_compare_and_exchange_val_acq (see also lll_lock/lll_trylock at 
ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h) which goes down to 
__arch_compare_and_exchange_val_32_acq. Using  (e)glibc (= 2.12.1-0ubuntu11) 
and GCC (=4.5) this expands to __sync_val_compare_and_swap 
(ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h) which should be safe 
even on a SMP system.

Some infos regarding the atomic memory operations can be found at:
https://wiki.linaro.org/WorkingGroups/ToolChain/AtomicMemoryOperations#implementation%20details

The next step would be to check whether the testcase fails using a
decent GCC and eglibc (Ubuntu Natty for example).

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apr in ubuntu.
https://bugs.launchpad.net/bugs/604753

Title:
  [eglibc] process shared mutex's fail on armel v7 (thumb)

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 604753] Re: [eglibc] process shared mutex's fail on armel v7 (thumb)

2011-02-17 Thread Ken Werner
I ran the testprocmutex test on a panda board using ubuntu natty alpha 2 and it 
passed:
$ ./testall testprocmutex
testprocmutex   : SUCCESS
All tests passed.

$ apt-cache show libc6 gcc|grep Version
Version: 4:4.5.1-1ubuntu3
Version: 2.12.1-0ubuntu16

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apr in ubuntu.
https://bugs.launchpad.net/bugs/604753

Title:
  [eglibc] process shared mutex's fail on armel v7 (thumb)

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 604753] Re: [eglibc] process shared mutex's fail on armel v7 (thumb)

2011-02-17 Thread Ken Werner
I ran the apr testsuite (svn revision 1071306) several times and I
notice that the testlock:test_timeoutcond test fails sometimes because
the timer returned to late. Not sure sure if this is related.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apr in ubuntu.
https://bugs.launchpad.net/bugs/604753

Title:
  [eglibc] process shared mutex's fail on armel v7 (thumb)

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs