From issues-return-67267-archive-asf-public=cust-asf.ponee.io@commons.apache.org Tue Apr 10 10:43:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B7A3318064C for ; Tue, 10 Apr 2018 10:43:04 +0200 (CEST) Received: (qmail 1806 invoked by uid 500); 10 Apr 2018 08:43:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 1786 invoked by uid 99); 10 Apr 2018 08:43:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2018 08:43:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C5E7D1A04FB for ; Tue, 10 Apr 2018 08:43:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id B-AI6C6ZBQmS for ; Tue, 10 Apr 2018 08:43:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 68DCF5F24C for ; Tue, 10 Apr 2018 08:43:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 98903E0B6E for ; Tue, 10 Apr 2018 08:43:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 509B2240C6 for ; Tue, 10 Apr 2018 08:43:00 +0000 (UTC) Date: Tue, 10 Apr 2018 08:43:00 +0000 (UTC) From: "blassmegod (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DAEMON-384) prunsrv stopping with error due to hardcoded timeout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DAEMON-384?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] blassmegod closed DAEMON-384. ----------------------------- Tested the issue with fix, it works, maybe the only drawback is that that e= ven if the application wrapped by the procrun service exits before the time= out set on --StopTimeout, the service stays up (in Stopping mode) until the= --StopTimeout set timeout finishes, but it's no blocker or real issue. > prunsrv stopping with error due to hardcoded timeout > ---------------------------------------------------- > > Key: DAEMON-384 > URL: https://issues.apache.org/jira/browse/DAEMON-384 > Project: Commons Daemon > Issue Type: Bug > Components: Procrun > Affects Versions: 1.1.0 > Environment: Windows 7 (x64) > Reporter: blassmegod > Assignee: Gary Gregory > Priority: Major > Labels: easyfix, windows > Fix For: 1.1.1 > > Original Estimate: 24h > Remaining Estimate: 24h > > Due to the fact that in the function=C2=A0*service_ctrl_handler,* from=C2= =A0http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/wind= ows/apps/prunsrv/prunsrv.c, the timeout for the case SERVICE_STOP_TIMEOUT i= s hardcoded to 3 seconds ( 3 * 1000 ms), which in the case of servers with = big and multiple deployed application, the actual stopping time of the serv= er might take for sure longer that 3 seconds, and in this case the Windows = service will crash with an exception, because it's unable to wait enough so= that the server is stopped. > The resolution is rather simple, just use SO_STOPTIMEOUT * 1000 if SO_STO= PTIMEOUT > 0. This way the user that creates the service with procrun/pruns= rv can configure the timeout with --StopTimeout=3Dxxx seconds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)