[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16847014#comment-16847014 ] Tibor Digana commented on SUREFIRE-1222: https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=deae79575b6846dddee53ccd3d4e28fc8133dc6f > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M4 > > Time Spent: 40m > Remaining Estimate: 0h > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756580#comment-16756580 ] Tibor Digana commented on SUREFIRE-1222: I will continue on this on Friday. On Wed, Jan 30, 2019 at 9:49 PM Enrico Olivelli (JIRA) > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M4 > > Time Spent: 10m > Remaining Estimate: 0h > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756545#comment-16756545 ] Enrico Olivelli commented on SUREFIRE-1222: --- [~tibor17] so you will be back at this patch soon ! I will be happy to work then at the socket based implementation once we have merged the Abstraction over the communication between forked jvm and master process > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M4 > > Time Spent: 10m > Remaining Estimate: 0h > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734871#comment-16734871 ] Tibor Digana commented on SUREFIRE-1222: [~eolivelli] IMHo the sockets need to have an abstraction in prior in {{ForkedStarter}}. So there is not only one additional task as sockets but mainly abstraction. Texas University (SUREFIRE-1516) want to run the booter jar via Shell. So. It must be new Abstraction and this abstraction must be in Java package for Extension API (surefire-api module) which needs to be created (extensions are part of version 3.0). > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M4 > > Time Spent: 10m > Remaining Estimate: 0h > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734620#comment-16734620 ] Enrico Olivelli commented on SUREFIRE-1222: --- [~tibor17] as we are going to fix this issue by introducing a completely new way of communication between surefire and the forked JVM I think it will be clearer to create a new Jira issue like "Use sockets to comunicate with Forked JVMs" and then we will link this issue. Does this approach work for you ? > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M4 > > Time Spent: 10m > Remaining Estimate: 0h > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15508951#comment-15508951 ] Martin Kouba commented on SUREFIRE-1222: [~tibor17] Thanks a lot! I've created https://github.com/arquillian/arquillian-container-se/issues/14 to track the Arquillian SE adapter issue. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507828#comment-15507828 ] Tibor Digana commented on SUREFIRE-1222: [~mkouba] It is not that fast and not without troubles to use other that std/out, e.g. file system right now. It would be easier to use a magic number in the beginning of the stream, e.g. 0x0F, 0xAC, 0x0B, 0xAD. Surefire will process lines which start with magic number; otherwise it will be printed in console. The problem should be fixed in Arquillian as well; otherwise the output will not be associated current Thread of the test and would not appear in surefire-reports in particular Test-*.txt file report and not in the Maven Site test report. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507782#comment-15507782 ] Tibor Digana commented on SUREFIRE-1222: [~mkouba] This code should be okay https://github.com/wildfly/wildfly-arquillian/blob/master/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L349 Regarding {{new ProcessBuilder("echo", "I 29, 2016 2:01:43 ODP.").redirectOutput(Redirect.INHERIT).start();}} I found the problem. Try to find {{java.lang.ProcessImpl}} in JDK 8 latest 102 and you will find method: {{start(String cmdarray[], java.util.Map environment, String dir, ProcessBuilder.Redirect[] redirects, boolean redirectErrorStream)}} which is called from {{ProcessBuilder.start()}} and you will find this code: {{else if (redirects[1] == Redirect.INHERIT) stdHandles[1] = fdAccess.getHandle(FileDescriptor.out);}} which calls static context {{FileDescriptor.out}} This means that the constant references the native {{PrintStream}} which was prior to the stream we set in Surefire after ForkedBooter replaced the std/out stream by internal one. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507435#comment-15507435 ] Martin Kouba commented on SUREFIRE-1222: Ok Tibor, thanks for the link. So you're basically saying that it's not possible to start a new process and redirect the output to the standard output of the current process (forked surefire process). Instead, we should observe the standard output of the new process and {{System.out.write()}} in the parent process, like e.g. WildFly Arquillian managed adapter: https://github.com/wildfly/wildfly-arquillian/blob/master/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L138 Is there any reason for this limitation? To me both solutions seem legitimate. By the way, this is a very simple reproducer: {code:java} public class SimpleTest { @Test public void testDummy() throws IOException { new ProcessBuilder("echo", "I 29, 2016 2:01:43 ODP.").redirectOutput(Redirect.INHERIT).start(); } } {code} > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506461#comment-15506461 ] Tibor Digana commented on SUREFIRE-1222: I sent you a link where you can see how we redirect streams. We used this utility yet in Java 5 and 6. On Tue, Sep 20, 2016 at 2:52 PM, Tibor Digana > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506423#comment-15506423 ] Tibor Digana commented on SUREFIRE-1222: Hi Martin, Surefire together with Maven is platform for your Tests. The Redirect class in Arquillian must be implemented in Arquillian project. I have never seen it. This means Arquillian should listen to InputStream of child process and write data to parent process in OutputStream. This would not harm Surefire then. I saw tests where users override std/out stream as well. If both call setOut() then both work against each other. https://github.com/apache/maven-shared/blob/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineUtils.java#L233 On Tue, Sep 20, 2016 at 11:58 AM, Martin Kouba (JIRA) > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506224#comment-15506224 ] Martin Kouba commented on SUREFIRE-1222: Hi Tibor, Well, the tests do not call {{System.setOut()}} but the [Arquillian adapter|https://github.com/arquillian/arquillian-container-se] creates a new process and then redirects its output (i.e. calls {{java.lang.ProcessBuilder.redirectOutput(Redirect)}}) to the output of the JVM which runs the test. In any case, I think that [ForkClient.consumeLine()|http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven.surefire/maven-surefire-common/2.18.1/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java#85] should expect similar lines (containing comma and code) and ignore them. E.g. the code/operationId could be prefixed with some uncommon prefix... e.g. {{:::I}} instead of {{I}} for BOOTERCODE_SYSPROPS. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504992#comment-15504992 ] Tibor Digana commented on SUREFIRE-1222: [~mkouba] This happens if the code or test calls {{java.lang.System.setOut(...)}}. Can you have a look in your project? > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127904#comment-15127904 ] Martin Kouba commented on SUREFIRE-1222: * use JDK7 * the JVM default locale must be {{cs_CZ}} * set the date to any day in Jan 2016 * {{git clone g...@github.com:weld/core.git}} * {{checkout 2.3}} * {{cd environments/se/tests/}} * {{mvn clean test}} > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127128#comment-15127128 ] Tibor Digana commented on SUREFIRE-1222: [~mkouba] The code has already changed. Please provide a project where we can reproduce this issue. Thx. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126041#comment-15126041 ] Martin Kouba commented on SUREFIRE-1222: [~tibor17] I get the same error for 2.19.1. By the way, 2.17 does not look that old (12-Mar-2014). A lot of projects out there probably don't use the most recent versions of dependencies. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines
[ https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124879#comment-15124879 ] Tibor Digana commented on SUREFIRE-1222: [~mkouba] Why you tested such old Surefire? Please use 2.19.1 and let me know the status, thx. > ForkClient attempts to consume unrelated lines > -- > > Key: SUREFIRE-1222 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1222 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin, process forking >Affects Versions: 2.17 > Environment: Oracle JDK7 (build 1.7.0_79-b15) > Linux 3.13 x86_64 with default locale cs_CZ >Reporter: Martin Kouba > > This month the [Weld > SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite > suddenly started to fail on a Linux machine with Oracle JDK7 and the default > locale {{cs_CZ}}: > {code} > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: -1 > at java.lang.String.substring(String.java:1911) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:745) > {code} > A {{java.util.logging.Logger}} is used in the forked process. The exception > occurs when the following log message is written to the standard output: > {code} > I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main > {code} > We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 > 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} > operation. > I think the protocol should be robust enough to avoid similar collisions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)