From owner-freebsd-testing@freebsd.org Thu Jun 25 19:49:32 2015 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3186498D136; Thu, 25 Jun 2015 19:49:32 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [64.131.64.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5851260; Thu, 25 Jun 2015 19:49:31 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from cpe-74-71-192-171.nyc.res.rr.com ([74.71.192.171]:35748 helo=[10.0.1.68]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1Z8D9O-0005Rp-PR; Thu, 25 Jun 2015 15:49:30 -0400 From: "George Neville-Neil" To: "Craig Rodrigues" Cc: "freebsd-testing@freebsd.org" , "freebsd-java@freebsd.org" Subject: Re: Requests for Help: add FreeBSD procstat support to akuma library for Jenkins Date: Thu, 25 Jun 2015 15:49:31 -0400 Message-ID: <8CA148D7-81AF-41F8-AA41-9D7700B27242@neville-neil.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 19:49:32 -0000 On 18 Jun 2015, at 11:05, Craig Rodrigues wrote: > Hi, > > When setting up Jenkins, if you install new plugins, there > is a checkbox: > > Restart Jenkins when installation is complete and no jobs are running > > This checkbox allows you to restart Jenkins automatically when new > plugins are installed. This feature works on OS X, Linux, and = > Solaris, > but not FreeBSD. > > I tracked down the problem on FreeBSD. It turns out in this file > in the Jenkins core Jenkins: > https://github.com/kohsuke/hudson/blob/master/core/src/main/java/hudson= /lifecycle/UnixLifecycle.java > > the akuma library ( https://github.com/kohsuke/akuma/ ) is used > to figure out what command-line arguments > were passed to the Java VM that is running Jenkins. > This allows Jenkins to restart the VM with the same command-line > arguments. > > The akuma library has platform specific code for > OS X, Linux, and Solaris, but not FreeBSD. > > I am a bit overstretched with multiple things at this point. > I was wondering if someone with Java coding experience can help > with the following. > > (1) Take the akuma library from https://github.com/kohsuke/akuma/ > > (2) Implement FreeBSD support in akuma, by having it execute > "procstat -c" to figure out the command-line arguments for a = > process. > > (3) Make sure that all tests in akuma pass > > (4) Send a GitHub pull request to incorporate the change upstream. > > I do not code in Java but also didnt' see a followup to this. Has = anyone taken it upon themselves to fix this problem? If so, please speak up. Best, George From owner-freebsd-testing@freebsd.org Thu Jun 25 20:01:55 2015 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC16998DE56 for ; Thu, 25 Jun 2015 20:01:55 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0FC12FA for ; Thu, 25 Jun 2015 20:01:55 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.2] (unknown [192.168.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 26B8F913E for ; Thu, 25 Jun 2015 19:52:59 +0000 (UTC) Message-ID: <558C5C1B.8080507@freebsd.org> Date: Thu, 25 Jun 2015 15:52:59 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-testing@freebsd.org Subject: Re: Requests for Help: add FreeBSD procstat support to akuma library for Jenkins References: <8CA148D7-81AF-41F8-AA41-9D7700B27242@neville-neil.com> In-Reply-To: <8CA148D7-81AF-41F8-AA41-9D7700B27242@neville-neil.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cHdABTS5FJ8U1EkgiMQNRa0B7cm4TKhFu" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 20:01:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cHdABTS5FJ8U1EkgiMQNRa0B7cm4TKhFu Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-06-25 15:49, George Neville-Neil wrote: >=20 >=20 > On 18 Jun 2015, at 11:05, Craig Rodrigues wrote: >=20 >> Hi, >> >> When setting up Jenkins, if you install new plugins, there >> is a checkbox: >> >> Restart Jenkins when installation is complete and no jobs are running >> >> This checkbox allows you to restart Jenkins automatically when new >> plugins are installed. This feature works on OS X, Linux, and Solaris= , >> but not FreeBSD. >> >> I tracked down the problem on FreeBSD. It turns out in this file >> in the Jenkins core Jenkins: >> https://github.com/kohsuke/hudson/blob/master/core/src/main/java/hudso= n/lifecycle/UnixLifecycle.java >> >> >> the akuma library ( https://github.com/kohsuke/akuma/ ) is used >> to figure out what command-line arguments >> were passed to the Java VM that is running Jenkins. >> This allows Jenkins to restart the VM with the same command-line >> arguments. >> >> The akuma library has platform specific code for >> OS X, Linux, and Solaris, but not FreeBSD. >> >> I am a bit overstretched with multiple things at this point. >> I was wondering if someone with Java coding experience can help >> with the following. >> >> (1) Take the akuma library from https://github.com/kohsuke/akuma/ >> >> (2) Implement FreeBSD support in akuma, by having it execute >> "procstat -c" to figure out the command-line arguments for a proces= s. >> >> (3) Make sure that all tests in akuma pass >> >> (4) Send a GitHub pull request to incorporate the change upstream. >> >> > I do not code in Java but also didnt' see a followup to this. Has anyo= ne > taken it upon themselves to fix this problem? If so, please speak up. >=20 > Best, > George > _______________________________________________ > freebsd-testing@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-testing > To unsubscribe, send any mail to "freebsd-testing-unsubscribe@freebsd.o= rg" I have looked into it, although the problem I foresee is that procstat -k doesn't separate the different argv values with \0, but with just a space. So it won't properly handle quoted arguments. My interest in this was mainly based on my patch to libxo procstat, and how it could solve the above problem. I am not sure how useful that ends up being, since it would rely on a feature which isn't in any release of FreeBSD yet. It is infact still waiting on a reviewer to get committed. --=20 Allan Jude --cHdABTS5FJ8U1EkgiMQNRa0B7cm4TKhFu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJVjFwjAAoJEBmVNT4SmAt+G1kP/jz/Qwj2aJ4gcEKQ8IJEs8Un +eQJiYUKjqp+j+ueDa0fhB7fP37g2YWqSMgo3Ji0ntUXKpe/I/qAXdkZYwavdfLK tSQUrOtwC5v7ZTpfkiFe9tytHKXr9iP05WOlM3l0R7mNmbSK3Lsy/AB7YyDm5Rhi /xYbqUEA9C8hlvmvF2JJ4vCu2Vn0AlRz1BKA+8TT0n9M8CBsRFb4W0UQPs1xQZ2d CwDS6symm/ynSf7IrpvrEqXQdnVkNFYX+4Se9dKF59GrokhSI7Vb0+T7tzq0RcO4 FVvqNuwscEwLPGiUJpiZN1ZWVzzb3BWc5+Q9ql/pKdT/FYWw4lqfbhVkAgxcd13F KxTjEIw61jBXF/lOVBGgJbPBKcOP5FxS4KSgpcgo67zuB7i5xeSLnmfprpHEZWwm tiYP9Y+OUynqaG+IKsyUPSnCXFyrC/kg7ht1JHOI91XJ/82Rbkd1lK78COm8kZjM UpXtPwvlt8bmd3ZARc/4FRtLGnEXPDLYM4WoBrEGJ+MhV1fSO8oRB3wSmFKg0PFQ bCCZe7xx4t6aXB1NEgnQmBNuOvGiJBVo2IkXMZI4SXk4q36ZSN+eBeAYSLrLiI4m 3LKgLcsrotEw4unvGZqbIZUpb3aFiqr/YfihjRLU3Gf323Hc64HJZ8rY7Yw7ztFX y4UZYejsPf9vlHrUZt0z =X3o6 -----END PGP SIGNATURE----- --cHdABTS5FJ8U1EkgiMQNRa0B7cm4TKhFu-- From owner-freebsd-testing@freebsd.org Thu Jun 25 20:21:11 2015 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1E2698CA21; Thu, 25 Jun 2015 20:21:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADB7516EC; Thu, 25 Jun 2015 20:21:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 17276661CF; Thu, 25 Jun 2015 20:21:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <558C62B6.6030004@FreeBSD.org> Date: Thu, 25 Jun 2015 16:21:10 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: George Neville-Neil , Craig Rodrigues CC: "freebsd-testing@freebsd.org" , "freebsd-java@freebsd.org" Subject: Re: Requests for Help: add FreeBSD procstat support to akuma library for Jenkins References: <8CA148D7-81AF-41F8-AA41-9D7700B27242@neville-neil.com> In-Reply-To: <8CA148D7-81AF-41F8-AA41-9D7700B27242@neville-neil.com> Content-Type: multipart/mixed; boundary="------------050100070703040600000203" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 20:21:12 -0000 This is a multi-part message in MIME format. --------------050100070703040600000203 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 06/25/2015 15:49, George Neville-Neil wrote: > > > On 18 Jun 2015, at 11:05, Craig Rodrigues wrote: > >> Hi, >> >> When setting up Jenkins, if you install new plugins, there is a >> checkbox: >> >> Restart Jenkins when installation is complete and no jobs are >> running >> >> This checkbox allows you to restart Jenkins automatically when >> new plugins are installed. This feature works on OS X, Linux, >> and Solaris, but not FreeBSD. >> >> I tracked down the problem on FreeBSD. It turns out in this >> file in the Jenkins core Jenkins: >> https://github.com/kohsuke/hudson/blob/master/core/src/main/java/hudson/lifecycle/UnixLifecycle.java >> >> >> >> >> >> the akuma library ( https://github.com/kohsuke/akuma/ ) is used >> to figure out what command-line arguments were passed to the Java >> VM that is running Jenkins. This allows Jenkins to restart the VM >> with the same command-line arguments. >> >> The akuma library has platform specific code for OS X, Linux, and >> Solaris, but not FreeBSD. >> >> I am a bit overstretched with multiple things at this point. I >> was wondering if someone with Java coding experience can help >> with the following. >> >> (1) Take the akuma library from >> https://github.com/kohsuke/akuma/ >> >> (2) Implement FreeBSD support in akuma, by having it execute >> "procstat -c" to figure out the command-line arguments for a >> process. >> >> (3) Make sure that all tests in akuma pass >> >> (4) Send a GitHub pull request to incorporate the change >> upstream. >> >> > I do not code in Java but also didnt' see a followup to this. Has > anyone taken it upon themselves to fix this problem? If so, > please speak up. You can try the attached trivial patch. Note it requires procfs(5). Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVjGK2AAoJEHyflib82/FGCVUH/1+C1Ax2LTAEKJ80CQIJp6Of O7XrWjpolXhCpG1mq5ApFUWgBoFjMH6zn8xyNjJ4epWruBzlHuqROYU7waaE5DLn cYZZWJ4sIYnDWcb/H78SBKfCPc8RSPCstI5AenfEZ0NDJmKEglWBixeVr8YTKgCc BeMC9vdrCYodfoh548p3P9Obed8/51rlz+VaykLhFYrQPJ60Ni4nGPZOL88oztTb h1GZbWUpoJANzk+Jfuyca6ZlLvNwulg2KF8yGvq/GsnoqGy33wmtHlZhz4rDWNWG LDdbAjHzU/I/eWqMOBNAFTZPbfvcMg1TN4NPkYMj2c2yfTQ+9PjVS2gYobq4o9c= =fUk2 -----END PGP SIGNATURE----- --------------050100070703040600000203 Content-Type: text/x-patch; name="JavaVMArguments.java.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="JavaVMArguments.java.diff" --- src/main/java/com/sun/akuma/JavaVMArguments.java.orig 2015-06-25 16:0= 7:08.868860000 -0400 +++ src/main/java/com/sun/akuma/JavaVMArguments.java 2015-06-25 16:14:33.= 030581000 -0400 @@ -100,7 +100,7 @@ */ public static JavaVMArguments of(int pid) throws IOException { String os =3D System.getProperty("os.name"); - if("Linux".equals(os)) + if("Linux".equals(os) || "FreeBSD".equals(os)) return ofLinux(pid); if("SunOS".equals(os)) return ofSolaris(pid); --------------050100070703040600000203--