[Bug 209006] [maintainer] net/pacemaker: multiple changes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Apr 30 22:46:38 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209006

--- Comment #2 from David Shane Holden <dpejesh at yahoo.com> ---
This seems to be threading related.  The build only fails in an 11 poudriere
jail, though builds fine in an 10.3 poudriere jail and on an 11 virtual
machine.  What's really peculiar though is it looks like libqb uses
PTHREAD_PROCESS_SHARED pthread spin locks, which according to the
pthread_spin_init man page aren't supported at all on FreeBSD.  I would have
expected to see threading problems show up before this if that's really the
problem.

Running the following code on a combination of 10/11 host and virtual machines
also shows something kind of interesting.

#include <err.h>
#include <errno.h>
#include <pthread.h>

int main() {
  pthread_spinlock_t lock;
  int r;

  r = pthread_spin_init(&lock, PTHREAD_PROCESS_SHARED);
  if (r != 0)
    err(1, "pthread_spin_init(%i)", errno);

  err(0, "pthread_spin_init(0)");
}

10-amd64-jail: test: pthread_spin_init(2): No such file or directory
10-amd64-host: test: pthread_spin_init(2): No such file or directory
11-amd64-jail: test: pthread_spin_init(22): Invalid argument
11-amd64-host: test: pthread_spin_init(0): No error: 0

The fact that this problem only seems to show up in an 11 jail and doesn't
segfault anywhere else except there makes me curious if the problem isn't
related to FreeBSD 11 and not libqb/pacemaker.  I can submit a patch for libqb
to use mutexes instead of spinlocks which fixes the segfault, but that might
just be more of a workaround for whatever is causing pthread_spin_init() to act
differently inside of a jail.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list