From owner-freebsd-questions@FreeBSD.ORG Mon Jan 27 10:00:54 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70B5936D for ; Mon, 27 Jan 2014 10:00:54 +0000 (UTC) Received: from zoom.lafn.org (zoom.lafn.org [108.92.93.123]) by mx1.freebsd.org (Postfix) with ESMTP id CA0FA1531 for ; Mon, 27 Jan 2014 10:00:53 +0000 (UTC) Received: from [10.0.1.4] (static-71-177-216-148.lsanca.fios.verizon.net [71.177.216.148]) (authenticated bits=0) by zoom.lafn.org (8.14.7/8.14.2) with ESMTP id s0R9fXoK068077 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 27 Jan 2014 01:41:35 -0800 (PST) (envelope-from bc979@lafn.org) From: Doug Hardie Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: TCP Port Capture Message-Id: <995B2B03-C742-4FF9-82FE-3D0EDA8529D2@lafn.org> Date: Mon, 27 Jan 2014 01:41:32 -0800 To: freebsd-questions Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Virus-Scanned: clamav-milter 0.98 at zoom.lafn.org X-Virus-Status: Clean X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 10:00:54 -0000 I have a process that is occasionally giving me a situation that I don't = understand. It listens to a well-known port and processes requests = received on that report. It does return data to the calling system. = When a request is received, a child process is created that actually = does most of the work. The child process uses another process via a = pipe during the processing to obtain some data it uses. Occasionally, the main process exits with nothing logged. I suspect its = doing an exit, but thats just a guess at this time. Some of the time = (fairly infrequently), the main process cannot be restarted. The = process at the end of the pipe is now shown as having the port open. = lsof shows that. If I restart that process, then the main process can = be restarted properly. Why would the process at the end of the pipe end up being attached to = the port? Unfortunately, the system always seems to be quiet (no = requests in process) when this happens so nothing is logged by any = process. Normally I have a monitoring process that detects the main = process being gone and restarts it. But that doesn't work when the port = is held by the final process.=