From issues-return-129053-archive-asf-public=cust-asf.ponee.io@maven.apache.org Wed Mar 7 19:45: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 28015180771 for ; Wed, 7 Mar 2018 19:45:04 +0100 (CET) Received: (qmail 36359 invoked by uid 500); 7 Mar 2018 18:45:04 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 36348 invoked by uid 99); 7 Mar 2018 18:45:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2018 18:45:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B6215C04BF for ; Wed, 7 Mar 2018 18:45:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -108.761 X-Spam-Level: X-Spam-Status: No, score=-108.761 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id zIeoM4dZAWur for ; Wed, 7 Mar 2018 18:45:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D0E9E5F5B3 for ; Wed, 7 Mar 2018 18:45: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 23E83E0354 for ; Wed, 7 Mar 2018 18:45:01 +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 707C325407 for ; Wed, 7 Mar 2018 18:45:00 +0000 (UTC) Date: Wed, 7 Mar 2018 18:45:00 +0000 (UTC) From: "Thomas Raehalme (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SUREFIRE-1422) Forking fails on Linux if /bin/ps isn't available 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/SUREFIRE-1422?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 6389954#comment-16389954 ]=20 Thomas Raehalme commented on SUREFIRE-1422: ------------------------------------------- I've written about the issue [on my blog|http://raehal.me/maven-surefire-pl= ugin-on-Docker/]=C2=A0with examples of both output and contents of the dump= file.=C2=A0 You can verify the ps functionality with Docker: {code} $ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh / # ps --help BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary. Usage: ps [-o COL1,COL2=3DHEADER] Show list of processes -o COL1,COL2=3DHEADER=09Select columns for display / #=20 {code} As you can see the default implementation from BusyBox in Alpine is rather = limited regarding options. But if you install the {{procps}} package, you get the needed options. {code} $ docker run -it --rm maven:3.5.2-jdk-8-alpine /bin/sh / # apk add --update procps fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.t= ar.gz (1/3) Installing libintl (0.19.8.1-r0) (2/3) Installing libproc (3.3.12-r1) (3/3) Installing procps (3.3.12-r1) Executing busybox-1.25.1-r0.trigger OK: 110 MiB in 62 packages / # ps --help all Usage: ps [options] Basic options: -A, -e all processes -a all with tty, except session leaders a all with tty, including other users -d all except session leaders -N, --deselect negate selection r only running processes T all processes on this terminal x processes without controlling ttys Selection by list: -C command name -G, --Group real group id or name -g, --group session or effective group name -p, p, --pid process id --ppid parent process id -q, q, --quick-pid process id (quick mode) -s, --sid session id -t, t, --tty terminal -u, U, --user effective user id or name -U, --User real user id or name The selection options take as their argument either: a comma-separated list e.g. '-u root,nobody' or a blank-separated list e.g. '-p 123 4567' Output formats: -F extra full -f full-format, including command lines f, --forest ascii art process tree -H show process hierarchy -j jobs format j BSD job control format -l long format l BSD long format -M, Z add security data (for SELinux) -O preloaded with default columns O as -O, with BSD personality -o, o, --format user-defined format s signal format u user-oriented format v virtual memory format X register format -y do not show flags, show rss vs. addr (used with -l) --context display security context (for SELinux) --headers repeat header lines, one per page --no-headers do not print header at all --cols, --columns, --width set screen width --rows, --lines set screen height Show threads: H as if they were processes -L possibly with LWP and NLWP columns -m, m after processes -T possibly with SPID column Miscellaneous options: -c show scheduling class with -l option c show true command name e show the environment after command k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]] L show format specifiers n display numeric uid and wchan S, --cumulative include some dead child process data -y do not show flags, show rss (only with -l) -V, V, --version display version information and exit -w, w unlimited output width --help display help and exit For more details see ps(1). / #=20 {code} Hope this helps! If I can help with anything please let me know. > Forking fails on Linux if /bin/ps isn't available > ------------------------------------------------- > > Key: SUREFIRE-1422 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1422 > Project: Maven Surefire > Issue Type: Bug > Components: process forking > Affects Versions: 2.20.1 > Environment: Linux (Debian 9 with OpenJDK 8) > Reporter: Emmanuel Bourg > Assignee: Tibor Digana > Priority: Major > Fix For: 2.21.0 > > > Hi, > With the changes introduced by SUREFIRE-1302 I'm now experiencing a failu= re on Linux when the fork mode is enabled: > {code} > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-pl= ugin:2.20.1:test (default-test) on project foo: There are test failures. > [ERROR] > [ERROR] Please refer to /foo/target/surefire-reports for the individual t= est results. > [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, = [date].dumpstream and [date]-jvmRun[N].dumpstream. > [ERROR] The forked VM terminated without properly saying goodbye. VM cras= h or System.exit called? > {code} > I traced the issue back to the PpidChecker class, the code assumes that {= {/bin/ps}} or {{/usr/bin/ps}} exist but this isn't guaranteed (especially o= n trimmed down containers commonly used for continuous integration). > It would be nice to have a fallback mechanism when ps isn't available, or= at least check its existence and display an explicit message stating that = it must be installed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)