From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 21:14:47 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 D534416A4CE; Thu, 7 Oct 2004 21:14:47 +0000 (GMT) Received: from exch2.verniernetworks.com (dns.verniernetworks.com [65.200.185.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 529D743D45; Thu, 7 Oct 2004 21:14:46 +0000 (GMT) (envelope-from mark@verniernetworks.com) Received: from verniernetworks.com ([192.168.2.254]) by exch2.verniernetworks.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 7 Oct 2004 14:14:44 -0700 Message-ID: <4165B1C2.40200@verniernetworks.com> Date: Thu, 07 Oct 2004 16:14:42 -0500 From: Mark Gooderum User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Oct 2004 21:14:45.0140 (UTC) FILETIME=[AB4E2D40:01C4ACB2] cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) 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, 07 Oct 2004 21:14:48 -0000 But this is a major change in behavior from FreeBSD 4 and also a difference from Linux. I'm not a Linux bigot at all but there is a recurring theme that XX threaded apps works on Linux but is unstable on FreeBSD and these sort of major behavior deltas contribute to the perception of FreeBSD threading as unstable by some. In fact it means that any thread doing blocking stdio is uncancellable - the standard may not require it but many applications might expect it. Given that the functionality was there in 4.x and lost in 5.x I'd call it a regression. I've no goal of being a "johnny come lately" and criticize choices made earlier but I am part of a company using FreeBSD as part of it's core technology and we're in the midst of migrating our product code base from FreeBSD 4.9 (most recent, been trucking along since 4.3) to FreeBSD 5.3 and these are the sort of changes that break things and cause pain for developers. Parts of our code have been threaded from the start - originally with PTH and then we made the transition to libc_r pthreads about a year ago and now we're jumping to libpthread to stick with what is "supported". Just my polite $.02 worth. -=- Mark >fgets is not a required cancellation point. See the POSIX standard. >The standard says it, along with many other functions, _may_ be a >cancellation point, but the only required cancellation points are: > > accept() mq_timedsend() putpmsg() sigtimedwait() > aio_suspend() msgrcv() pwrite() sigwait() > clock_nanosleep() msgsnd() read() sigwaitinfo() > close() msync() readv() sleep() > connect() nanosleep() recv() system() > creat() open() recvfrom() tcdrain() > fcntl()2 pause() recvmsg() usleep() > fdatasync() poll() select() wait() > fsync() pread() sem_timedwait() waitid() > getmsg() pselect() sem_wait() waitpid() > getpmsg() pthread_cond_timedwait() send() write() > lockf() pthread_cond_wait() sendmsg() writev() > mq_receive() pthread_join() sendto() > mq_send() pthread_testcancel() sigpause() > mq_timedreceive() putmsg() sigsuspend() > > >