Hello.

Firebird IPC is black magic. I am not sure if process-shared
semaphores are really needed. "superserver" seems to not need them at
all (at least on theory). And still it fails to build.

The place it fails is interesting, though. The checkMutex function
(src/jrd/trace/TraceConfigStorage.cpp line 147)[1] is what bails out.
It is called from various places, but the one matching the error
message is at line 182, in function initShMem. The argument that is
the error code is the result of calling ISC_mutex_init, which is
defined in src/jrd/isc_sync.cpp, in two flavours depending on the
USE_SYS5SEMAPHORE define (another flavour is for windows).

[1] http://git.debian.org/?p=pkg-firebird/2.5.git;a=tree
    (line numbers may differ because some patches are applied)

I guessed that USE_SYS5SEMAPHORE is not defined, as it is currently
linked to the DARWIN define. This is why I thought that defining
USE_SYS5SEMAPHORE should help. Are you suggesting that it won't?

I added "|| defined(__FreeBSD_kernel__)", and got further,
./gen/firebird/bin/create_db empty.fdb suceeded.
But build failed with sigsegv in some checking later.
May be "defined(DARWIN)" have some counterpart elsewhere :-(

BTW, the SYSV variant (line 2749) would only return 0 or FB_FAILURE
(1) and not 78 (which is visible in the build log), so there must be
the other, non-SYSV implementation that fails (line 2886).

Yes, it is mutex variant, the failing call is
pthread_mutexattr_setpshared(x,PTHREAD_PROCESS_SHARED)

But GNU/kFreeBSD does not support process-shared pthread
mutexes, it return ENOSYS for this case.
The code have compile time detection whether PTHREAD_PROCESS_SHARED
is defined, but better would be test, whether pthread_mutexattr_setpshared(x,PTHREAD_PROCESS_SHARED)
can be really used.

Hope it partially helps.

Petr



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to