pkgsrc-Bugs archive

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

pkg/45131: csup hangs while trying to exit



>Number:         45131
>Category:       pkg
>Synopsis:       csup hangs while trying to exit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 10 09:30:00 +0000 2011
>Originator:     Onno van der Linden
>Release:        5.99.53 i386
>Organization:
>Environment:
NetBSD sheep 5.99.53 NetBSD 5.99.53 (SHEEP) #0: Thu Jun 16 21:15:01 MEST 2011  
onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
>Description:
csup hangs after calling pthread_join() in killer_stop() when it is trying to 
cancel the killer thread  before exiting.

>How-To-Repeat:
csup to an available cvsup server 
>Fix:
Adding a pthread_testcancel() call works for me. Additional check
for error == ECANCELED and calling pthread_testcancel() if true
is another way of fixing it

*** proto.c.orig        Sun Jul 10 11:13:59 2011
--- proto.c     Sun Jul 10 11:15:01 2011
***************
*** 968,973 ****
--- 968,974 ----
        k = arg;
  again:
        error = sigwait(&k->sigset, &sig);
+       pthread_testcancel();
        assert(!error);
        if (sig == SIGINT || sig == SIGHUP || sig == SIGTERM) {
                if (k->killedby == -1) {



Home | Main Index | Thread Index | Old Index