[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-08-01 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16108523#comment-16108523
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
[~tunaki]
I have created Jira ticket SUREFIRE-1400 with some fix. Can we talk about 
Windows issue right there?

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-07-23 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097781#comment-16097781
 ] 

Tibor Digana commented on SUREFIRE-1376:


First I will investigate Oracle JVM issue(s).
Second is the activity to develop alternative communication via sockets. I
think this would be worth investments than any CLI workarounds.

On Fri, Jul 21, 2017 at 9:03 PM, Guillaume Boué (JIRA) 



> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-07-21 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096709#comment-16096709
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

[~tibor17] That would be great.
I think the path to the test project needs to be created at runtime, so that 
the actual absolute path to the test project is created by JRE which handles 
long paths already. For the execution part, probably we can reuse Maven shared 
utils {{CommandLineUtils}} to launch {{mvn}} ourselves and check error stream.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-07-21 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096318#comment-16096318
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
[~tunaki]
I will have spare time these days. I want to write an IT.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-27 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16065175#comment-16065175
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

[~tibor17]
Ultimately, the working directory of the command is passed unchanged to 
[{{Runtime#exec(cmdarray, envp, 
dir)}}|https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#exec-java.lang.String:A-java.lang.String:A-java.io.File-]
 (third argument). This is done by [Maven shared 
utils|https://github.com/apache/maven-shared/blob/maven-shared-utils-0.9/src/main/java/org/apache/maven/shared/utils/cli/Commandline.java#L407]
 that Surefire uses to execute the command line.
I'm not sure how Java handles the working dir after that, but I think it 
handles it fine: I don't see why the error message would be "Unable to access 
jarfile" if there were an issue with the working directory.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-26 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16064301#comment-16064301
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
I tries pure cmd and cd in CLI and this happens

E:\>cd e:\tmp\zmaz6\xxx
The filename or extension is too long.

E:\>cd \\?\e:\tmp\zmaz6\
'\\?\e:\tmp\zmaz6\xx
CMD does not support UNC paths as current directories.

How the command in surefire looks like?
Is it this?
{{cd path/to/basedir; path/to/bin/java -jar 
path/to/target/surefire/surefire-123.jar some arguments}}
I know there is {{cd}} but this should be the first problem because the path 
would be too long.
Second issue should be path to {{*.jar}} file.
WDYT?

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16056194#comment-16056194
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

[~tibor17]

Both. I actually tried to build the ITs of maven-assembly-plugin with JDK 7 
(because on my Windows set-up, those IT happen to fall in the long path 
problem) and the Surefire dumpstream file showed this error. And then I 
reproduced it in a isolated environment, just launching 
{{C:\...\jdk1.7.0_80\bin\java -jar}} on the CLI, with the path to any JAR files 
prepended by \\?\.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16056186#comment-16056186
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
I will try to make some IT and generate long path in runtime of IT. It might be 
a problem for ASF to have such long path in our sources so I have to make it in 
runtime.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16056173#comment-16056173
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
Where you have the error from?
bq. Error: Unable to access jarfile \\?\\\C:\...
>From original surefire release version or you made some other tries.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16056141#comment-16056141
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
The only problem will be with resolving the path {{jarFile.getAbsolutePath()}}.
This must return slashes the same like {{URL.toString()}}.
I think JDK is broken in java.io and very platform dependent.


bq. Error: Unable to access jarfile \\?\\\C:\...

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16056080#comment-16056080
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

[~tibor17]

You're right, it would also override the classpath in the manifest JAR, so this 
won't really work... We'd have to build the full classpath to pass it on the 
command-line, and this causes other issues when it is too long (command-line 
rejected).

Now, I can only think of generating the JAR to another fixed location, like 
{{java.io.tmpdir}} (where it is pretty much guaranteed no long path issues will 
be hit) instead of the build directory, but this would go against the 
{{tempDir}} configuration...

I had also found that JDK bug report, but I'm not sure it is the same since it 
appears to affect JDK 8 also, whereas using {{java -jar 
?<...>.jar}} worked fine with 8u121. By the way, the error when 
using JDK 7 with the {{?}} prefix in {{java -jar}} is:

bq. Error: Unable to access jarfile \\?\\\C:\...

Two backslashes were apparently added just before the drive letter but I have 
no idea why.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-20 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16055596#comment-16055596
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
I found the bug report [1].
My problem is that the command would have two class paths.
First is environment variable CLASSPATH or that one in Manifest Class-Path. 
That's done via 
{{File jarFile = createJar( classPath, providerThatHasMainMethod );}}
Second class path would be {{-cp}} or {{-classpath}}.
{{cli.createArg().setValue( "-cp" );}}
See the spec [2] I think {{-cp}} would replace Manifest Class-Path as well.
{{The JDK tools java, jdb, javac, and javah have a -classpath option which 
replaces the path or paths specified by the CLASSPATH environment variable 
while the tool runs.}}

[1]: https://bugs.openjdk.java.net/browse/JDK-8058423
[2]: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html


> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-19 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054750#comment-16054750
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
Did you find bug report for this JDK issue?
I would rather create a new issue for this workaround and we should lookup this 
bug in Oracle. It would be better to have proof from Oracle. We should create 
an IT but I need a help.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-19 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054640#comment-16054640
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

[~tibor17]

I've detected an issue with this fix: it solves the problem on Oracle JDK 
1.8.0_121, but it doesn't on Oracle JDK 1.7.0_80.

Furthermore, I've tested that changing the launching code from {{java -jar 
?<...>.jar}} to {{java -cp <...>.jar main.class}} works with 
both JDK versions, and without the {{?}} prefix. It looks like 
there is a bug with JDK 7 when deriving the main class from the manifest of a 
JAR under a too long path. Passing directly {{-cp}} and the main class avoids 
that, and the rest of Java code handles the long path just fine. I think commit 
59c065f should be reverted, and replaced with this approach in 
{{ForkConfiguration}}:

{code:java}
File jarFile = createJar( classPath, providerThatHasMainMethod );
cli.createArg().setValue( "-cp" );
cli.createArg().setValue( jarFile.getAbsolutePath() );
cli.createArg().setValue( providerThatHasMainMethod );
{code}

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-03 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16035954#comment-16035954
 ] 

Hudson commented on SUREFIRE-1376:
--

SUCCESS: Integrated in Jenkins build maven-surefire #1712 (See 
[https://builds.apache.org/job/maven-surefire/1712/])
[SUREFIRE-1376] "The forked VM terminated without properly saying (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=59c065f5d4a5a9c181ef9ce788b31305886e8592])
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireHelperTest.java


> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-05-29 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16028642#comment-16028642
 ] 

Guillaume Boué commented on SUREFIRE-1376:
--

It's {{260 - 12 - 1}}. The 12 comes from the fact that the new method could be 
called on a directory, in which case MSDN specifies that "the specified path 
cannot be so long that you cannot append an 8.3 file name (that is, the 
directory name cannot exceed MAX_PATH minus 12)." This is actually what OpenJDK 
is doing behind the scenes as well in 
[{{WindowsPath}}|http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46].

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SUREFIRE-1376) "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-05-29 Thread Tibor Digana (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16028622#comment-16028622
 ] 

Tibor Digana commented on SUREFIRE-1376:


[~gboue]
How did you compute 247?
In the MSDN you sent me {{"D:\some 256-character path string"}} 
MAX_PATH_LENGTH_WINDOWS can be 259.
Basically it does not much matter because the number are very similar and 
prefix {{"?\\"}} does not harm the path.

> "The forked VM terminated without properly saying goodbye" when running 
> Surefire in a very deep project structure on Windows
> 
>
> Key: SUREFIRE-1376
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1376
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.20
> Environment: Windows
>Reporter: Guillaume Boué
>Assignee: Tibor Digana
> Fix For: 2.20.1
>
> Attachments: SUREFIRE-1376-prefix.patch
>
>
> When Surefire is ran on a project under a very long path (exceeding Windows' 
> {{MAX_PATH}}), the invocation fails with
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
> terminated without properly saying goodbye. VM crash or System.exit called?
> {noformat}
> In the generated dumpstream, there is
> {noformat}
> # Created on 2017-05-28T10:17:09.474
> Error: Unable to access jarfile 
> C:\Users\Guillaume\Desktop\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\surefire-longpath-test-with-windows\target\surefire\surefirebooter2512478076549179739.jar
> {noformat}
> The problem is that the path to the JAR file exceeds the maximum path length 
> of 260 characters, and so it cannot be accessed.
> Prepending the path to the JAR file with {{?}}, [as documented 
> on 
> MSDN|https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath], 
> makes the test run again correctly. I've attached a possible patch with this 
> approach (SUREFIRE-1376-prefix.patch, that also handles UNC pathnames), but 
> perhaps there is a better way to tackle this problem.
> In order to reproduce this, it is possible to create a project under lots of 
> different subdirectories, something like:
> {noformat}
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> └───surefire-longpath-test-with-windows
> │   pom.xml
> │
> └───src
> └───test
> └───java
> └───Test.java
> {noformat}
> As a side-note, this issue is behind the current Jenkins failures on 
> [maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows|https://builds.apache.org/job/maven-plugins-ITs-m3.1.x-with-maven-plugin-jdk-1.8_windows/3702/]
>  when running the ITs on the Assembly Plugin.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)