From owner-freebsd-stable@FreeBSD.ORG Wed Nov 12 20:12:58 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C201065677 for ; Wed, 12 Nov 2008 20:12:58 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id E91568FC14 for ; Wed, 12 Nov 2008 20:12:57 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id mACKCt1B022643; Wed, 12 Nov 2008 15:12:55 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Wed, 12 Nov 2008 15:12:55 -0500 (EST) Date: Wed, 12 Nov 2008 15:12:55 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Mikhail Teterin In-Reply-To: <491B3653.5080209@aldan.algebra.com> Message-ID: References: <491B1BD2.4050903@aldan.algebra.com> <20081112194350.GJ47073@deviant.kiev.zoral.com.ua> <491B3270.5080402@aldan.algebra.com> <491B3653.5080209@aldan.algebra.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Kostik Belousov , stable@freebsd.org Subject: Re: dlopen-ing a library with OpenMP by a non-OpenMP process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 20:12:58 -0000 On Wed, 12 Nov 2008, Mikhail Teterin wrote: > Sent by Daniel Eischen: >> On Wed, 12 Nov 2008, Mikhail Teterin wrote: >> >>> Sent by Kostik Belousov: >>>> On Wed, Nov 12, 2008 at 01:09:22PM -0500, Mikhail Teterin wrote: >>>> >>>>> Hello! >>>>> >>>>> Currently, when a program built without OpenMP (-fopenmp) is trying to >>>>> dlopen a library, built with the feature, the result is a crash from >>>>> "bad system call": >>>>> >>>>> #0 0x00000008009a223c in ksem_init () from /lib/libc.so.7 >>>>> #1 0x0000000800998a8f in sem_init () from /lib/libc.so.7 >>> Uhm... That worked... I see... Shouldn't sem_init be nicer about it, >>> though? Thanks, >> Or perhaps you should read sem(4) ;-) > Daniel, what are saying? That it is all my own fault? Generic kernel does not > have sem in it... I build a port with an option (OpenMP), that make perfect > sense, and try to use it. Software crashes... > There is a bug -- and you, instead of contemplating a fix, are telling me to > read a man-page? Wow... No, I simply meant that you saw it was returning bad system call from sem_init/ksem_init. A little investigation would have turned up the reason. If you want to debate whether or not P1003_1B_SEMAPHORES should be standard, that is another issue, which I might actually agree with. -- DE