From owner-freebsd-threads@FreeBSD.ORG Mon Aug 23 11:02:08 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD8C516A4EE for ; Mon, 23 Aug 2004 11:02:08 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B91AF43D48 for ; Mon, 23 Aug 2004 11:02:08 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7NB28MI029907 for ; Mon, 23 Aug 2004 11:02:08 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7NB28MX029901 for freebsd-threads@freebsd.org; Mon, 23 Aug 2004 11:02:08 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 23 Aug 2004 11:02:08 GMT Message-Id: <200408231102.i7NB28MX029901@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 11:02:09 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/04/22] threads/65883threads libkse's sigwait does not work after fork 3 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] misc/20861 threads libc_r does not honor socket timeouts o [2001/01/20] bin/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] bin/24632 threads libc_r delicate deviation from libc in ha o [2001/01/25] misc/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] i386/34536 threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] misc/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc o [2003/05/08] threads/51949threads thread in accept cannot be cancelled 13 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] misc/18824 threads gethostbyname is not thread safe o [2000/10/21] misc/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex 6 problems total. From owner-freebsd-threads@FreeBSD.ORG Thu Aug 26 06:10:23 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D19816A4CE for ; Thu, 26 Aug 2004 06:10:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2296143D1F for ; Thu, 26 Aug 2004 06:10:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i7Q6AN7Z029486 for ; Thu, 26 Aug 2004 06:10:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7Q6AMwV029485; Thu, 26 Aug 2004 06:10:23 GMT (envelope-from gnats) Resent-Date: Thu, 26 Aug 2004 06:10:23 GMT Resent-Message-Id: <200408260610.i7Q6AMwV029485@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Maarten L. Hekkelman" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9E0916A4CE for ; Thu, 26 Aug 2004 06:04:16 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA7D643D41 for ; Thu, 26 Aug 2004 06:04:16 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i7Q64GG4031708 for ; Thu, 26 Aug 2004 06:04:16 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i7Q64G1p031707; Thu, 26 Aug 2004 06:04:16 GMT (envelope-from nobody) Message-Id: <200408260604.i7Q64G1p031707@www.freebsd.org> Date: Thu, 26 Aug 2004 06:04:16 GMT From: "Maarten L. Hekkelman" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: threads/70975: unexpected and unreliable behaviour when using SYSV semaphore, fork and pipe X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 06:10:23 -0000 >Number: 70975 >Category: threads >Synopsis: unexpected and unreliable behaviour when using SYSV semaphore, fork and pipe >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 26 06:10:22 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Maarten L. Hekkelman >Release: 5.2.1-RELEASE-p8 >Organization: Radboud Universiteit Nijmegen, Afd. CMBI >Environment: FreeBSD cmbidb1.cmbi.kun.nl 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #6: Thu Aug 19 08:19:25 CEST 2004 root@cmbidb1.cmbi.kun.nl:/usr/obj/usr/src/sys/MY_KERNEL i386 >Description: I have some code that works fine on IRIX and Linux but fails on FreeBSD. What I do is start a number of threads (using pthreads) that each create a pipe and fork/exec a subprocess to read from using the pipe. The problem is that either the code blocks on reading from the pipe, even when O_NONBLOCK is set. Or the semaphore created with semget fails when I try to call semop with it after a number of times. I'm using this semaphore to limit the number of running threads. The error code after semop fails is always "Interrupted system call". As noted before, the code works fine on other OS's Linux and IRIX. I believe it used to work in FreeBSD 4.6 but I'm not sure, it doesn't work with 4.9. >How-To-Repeat: Source code for an app showing this behaviour can be found at http://www.hekkelman.com/~maarten/test.cpp Run the app with two parameters, the first is the number of threads to use and the second is the number of subprocesses to spawn. >Fix: >Release-Note: >Audit-Trail: >Unformatted: