lsb

variances in apache/apr build due to build machine configuration?

Bug #1330653 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

We had some apache builds failing due to bug 3077 (missing some defines fro
robust mutexs). In the process of investigating this (only failed on x86_64,
s390x), I found that one some machines (x86 in particular), the configuration
test for robust mutex support fails:

conftest.c:

#include <sys/types.h>
#include <pthread.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    pthread_mutex_t mutex;
    pthread_mutexattr_t attr;

    if (pthread_mutexattr_init(&attr))
        exit(1);
    if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
        exit(2);
    if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP))
        exit(3);
    if (pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT))
        exit(4);
    if (pthread_mutex_init(&mutex, &attr))
        exit(5);
    if (pthread_mutexattr_destroy(&attr))
        exit(6);
    if (pthread_mutex_destroy(&mutex))
        exit(7);

    exit(0);
}

lsbcc -o conftest -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-D_LARGEFILE64_SOURCE conftest.c -lrt -lcrypt -lpthread -ldl

configuration then runs ./conftest, checking for a return value of 0. On the
x86 kvm, it gets "5". Hacking the code a little, the value returned from
pthread_mutex_init is 95 -
EOPNOTSUPP. An strace shows:

set_robust_list(0xb7eb1710, 0xc) = -1 ENOSYS
              (Function not implemented)

Same build with gcc fails the same way. Returns 0 on a couple of other random
x86 machines.

The x86 and x86_64 build kvms are nearly the same. Both Opensuse-11.1.

x86 glibc-2.9-2.3 2.6.27.7-9-default
x86_64 glibc-2.9-2.9 2.6.27.7-9-pae (kernel)

Bug 3077 was fixed, so things build now, but we'll have a libapr with robust
mutex support in some and not in others. What this means in practice for the
FVT, I'm not sure. What it would seem to mean for compliant apps is that
they'll need to check the target system for support at run time (documentation
issue?)

Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: apache
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.