Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2008 21:43:50 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Mikhail Teterin <mi+mill@aldan.algebra.com>
Cc:        stable@freebsd.org
Subject:   Re: dlopen-ing a library with OpenMP by a non-OpenMP process
Message-ID:  <20081112194350.GJ47073@deviant.kiev.zoral.com.ua>
In-Reply-To: <491B1BD2.4050903@aldan.algebra.com>
References:  <491B1BD2.4050903@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--NqSa+Xr3J/G6Hhls
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Nov 12, 2008 at 01:09:22PM -0500, Mikhail Teterin wrote:
> Hello!
>=20
> Currently, when a program built without OpenMP (-fopenmp) is trying to=20
> dlopen a library, built with the feature, the result is a crash from=20
> "bad system call":
>=20
>    #0  0x00000008009a223c in ksem_init () from /lib/libc.so.7
>    #1  0x0000000800998a8f in sem_init () from /lib/libc.so.7
>    #2  0x00000008011a6537 in omp_get_nested () from /usr/lib/libgomp.so.1
>    #3  0x00000008011a3466 in ?? () from /usr/lib/libgomp.so.1
>    #4  0x0000000000000002 in ?? ()
>    #5  0x00000008005072b2 in dlsym () from /libexec/ld-elf.so.1
>    #6  0x0000000800507cd2 in dlopen () from /libexec/ld-elf.so.1
>    ...
>=20
> Can anything be done about this -- disable the OpenMP functionality, but=
=20
> keep the library usable (single-threaded)? The problem arises, in=20
> particular, when one is trying to use libraries built by either=20
> GraphicsMagick or ImageMagick ports. Both have an OpenMP option, which=20
> speeds up some internal algorithms. The option is off by default, but=20
> enabling it makes sense on an SMP system... Yet, this makes the library=
=20
> unsuitable for other purposes... Thanks! Yours,
>=20
>    -mi
>=20
> P.S. I'm seeing the crash on a recent FreeBSD-7.1/amd64, but it, likely,=
=20
> can be seen elsewhere.

Try "kldload sem".

--NqSa+Xr3J/G6Hhls
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkkbMfUACgkQC3+MBN1Mb4jC2QCfTqeWHXbsp+uA7ox4/JwzZuvt
HaIAnAr1TCaRKa/mR+Dd9ypbVso04NAI
=1eJf
-----END PGP SIGNATURE-----

--NqSa+Xr3J/G6Hhls--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081112194350.GJ47073>