Date: Mon, 28 Oct 2002 14:20:53 +0100 (CET) From: Robin Schilham <co9@xs4all.nl> To: FreeBSD-gnats-submit@FreeBSD.org Cc: peter@FreeBSD.org Subject: gnu/44564: [PATCH] Aborted cvs session causes an endless loop in cvs server. Message-ID: <20021028132053.E37093A9C@a194-109-252-84.adsl.xs4all.nl>
next in thread | raw e-mail | index | archive | help
>Number: 44564 >Category: gnu >Synopsis: [PATCH] Aborted cvs session causes an endless loop in cvs server. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 28 05:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Robin Schilham >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD xxx.adsl.xs4all.nl 4.7-STABLE FreeBSD 4.7-STABLE #0: Tue Oct 22 22:00:40 CEST 2002 root@xxx.adsl.xs4all.nl:/usr/obj/usr/src/sys/OMNI i386 >Description: The command "cvs server" registers two signal handlers for SIGINT. As a result, SIGINT (control-C) triggers server_cleanup invocation twice. During the second invocation of server_cleanup, the assertion "fstat ( fileno (bc->fp), &s ) != -1" (buffer.c, line 1372) fails because stdin has already been closed during the first invocation of server_cleanup. Assertion failure causes a SIGABRT, which triggers server_cleanup again, resulting in an endless loop that can only be terminated by a SIGTERM. The same situation occurs when the client interrupts a cvs update or cvs checkout, leaving the server in an endless loop, and increasing the server load by 1. This bug was introduced in Concurrent Versions System (CVS) 1.11.2-FreeBSD (client/server) and does not exist in Concurrent Versions System (CVS) 1.11.1p1-FreeBSD (client/server) >How-To-Repeat: There are two ways: 1) execute "cvs server" and press control-C, or 2) do a (preferable large) cvs update or cvs checkout and press control-C during the session. >Fix: See attached patches (src/contrib/cvs/src): patch-buffer.c prevents the endless loop. patch-server.c prevents "cvs in free(): warning: chunk is already free". >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021028132053.E37093A9C>