[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#537047: marked as done (glibc-doc: pthread_cancel manpage has faulty/racy "workaround")



Your message dated Mon, 7 Feb 2011 08:50:31 +0100
with message-id <20110207075031.GA28920@volta.aurel32.net>
and subject line Re: glibc-doc: pthread_cancel manpage has faulty/racy "workaround"
has caused the Debian Bug report #537047,
regarding glibc-doc: pthread_cancel manpage has faulty/racy "workaround"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
537047: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537047
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: glibc-doc
Version: 2.7-18
Severity: normal


The pthread_cancel manpage, under bugs, recommends the following code as a workaround
for syscalls not being cancellation points:

     pthread_testcancel();
     retcode = read(fd, buffer, length);
     pthread_testcancel();

However, this code is inherently racy (when the signal arrives after the
first pthread_testcancel and before the read, the thread will simply hang
in read).

This should either be documented, or a really working workaround should be
given.

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

glibc-doc depends on no packages.

glibc-doc recommends no packages.

Versions of packages glibc-doc suggests:
pn  glibc-doc-reference           <none>     (no description available)

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 2.9-1

On Tue, Jul 14, 2009 at 05:52:29PM +0200, Marc Lehmann wrote:
> Package: glibc-doc
> Version: 2.7-18
> Severity: normal
> 
> 
> The pthread_cancel manpage, under bugs, recommends the following code as a workaround
> for syscalls not being cancellation points:
> 
>      pthread_testcancel();
>      retcode = read(fd, buffer, length);
>      pthread_testcancel();
> 
> However, this code is inherently racy (when the signal arrives after the
> first pthread_testcancel and before the read, the thread will simply hang
> in read).
> 
> This should either be documented, or a really working workaround should be
> given.
> 

This manpage isn't provided anymore by glibc-doc since version 2.9-1. It
is now provided by manpages-dev, which doesn't have this bug. Closing
the bug.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


--- End Message ---

Reply to: