bin/154954: csup in the CVS mode terminates before it applies all required fixups

Alexander Zagrebin alex at zagrebin.ru
Tue Feb 22 07:30:12 UTC 2011


>Number:         154954
>Category:       bin
>Synopsis:       csup in the CVS mode  terminates before it applies all required fixups
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 22 07:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Zagrebin
>Release:        8.2-PRERELEASE
>Organization:
-
>Environment:
FreeBSD gw.xxxx.xx 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Thu Jan 27 19:17:37 MSK 2011     root at gw.xxxx.xx:/usr/src/sys/amd64/compile/KERNEL  amd64
>Description:
It seems that csup has a bug in a fixups handling.
csup doesn't downloads all required files during an "Applying fixups for collection..." stage.
For example, after new CVS tag created in the 'src' part of the FreeBSD master CVS repository, a csup have to download a whole src tree (due to a checksum mismatching). But really it downloads, for example, the 'src/bin', 'src/cddl' only and finishes successfully. On next run the csup downloads, for example again, 'src/contrib' and  'src/crypto' and stops again. And so on.

>How-To-Repeat:
Try to update a CVS tree using csup after a lot of changes in the 'src' (for example, after a new branch/tag is created in the repository).
csup will not update all required files at once, so multiple runs of csup are required for successful updating of the CVS tree.

>Fix:
When an updater thread completes its job, it "closes" the list of fixups by invoking fixups_close. After this, the function fixups_get always returns NULL, despite the fact that there are fixups in the list.
The attached patch fixes this issue.

Patch attached with submission follows:

--- contrib/csup/fixups.c.orig	2010-11-02 11:31:02.685298679 +0300
+++ contrib/csup/fixups.c	2011-02-18 15:54:02.641377110 +0300
@@ -141,7 +141,7 @@ fixups_get(struct fixups *f)
 	fixups_lock(f);
 	while (f->size == 0 && !f->closed)
 		pthread_cond_wait(&f->cond, &f->lock);
-	if (f->closed) {
+	if (f->size == 0) {
 		fixups_unlock(f);
 		return (NULL);
 	}


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list