You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/08/17 23:22:18 UTC

[jira] [Commented] (SOLR-6387) Add work around for JDK bug #8047340 ?

    [ https://issues.apache.org/jira/browse/SOLR-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100121#comment-14100121 ] 

Hoss Man commented on SOLR-6387:
--------------------------------

bq. This seems to only apply to tests,...

why does it only apply to tests?

Any user running on a BSD machine with turkish configured as the default would also have this same type of problem in Solr wouldn't they?

bq. Setting this system property may have unwanted effects on specific platforms or implementation of different JVM vendors, so I strongly discourage doing this

fair enough.

bq. Which tests are affected by this (I have no idea where Solr spawns threads - I think only to get system information like free space or number of inodes?)

SystemInfoHandler uses exec for the reason you mentioned, but we've also seen this error pop up in LineRandomizerMapperReducerTest because some of the map reduce code execs other processes.

SystemInfoHandler is general enough that lots of tests might trigger it (anyone with a mac or BSD machine should be able to generate a definitive list of all current test triggering this via "ant test -Dtests.locale=tr_TR")

----

for the mapreduce tests, assumeNotTurkish() seems like an adequate work arround for this bug - but i feel like we should try to do something better in the case of SystemInfoHandler ... if not explicitly set jdk.lang.Process.launchMechanism, then what about catching the "Error" and if it matches the "posix_spawn" string, swallow & ignore it (we already have similar logic to account for other Exceptions that might occur when exec'ing a process that might not be available due to permissions/etc .. this seems like it would fall in that boat)


> Add work around for JDK bug #8047340 ?
> --------------------------------------
>
>                 Key: SOLR-6387
>                 URL: https://issues.apache.org/jira/browse/SOLR-6387
>             Project: Solr
>          Issue Type: Test
>         Environment: Linux, MacOSX, POSIX in general
>            Reporter: Hoss Man
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: Java7, Java8
>
> Jenkin's tests occasionally fail with the following cryptic error...
> {noformat}
> java.lang.Error: posix_spawn is not a supported process launch mechanism on this platform.
>         at __randomizedtesting.SeedInfo.seed([9219CAA3BCAA7365:7F07719937A772E1]:0)
>         at java.lang.UNIXProcess$1.run(UNIXProcess.java:104)
>         at java.lang.UNIXProcess$1.run(UNIXProcess.java:93)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.lang.UNIXProcess.<clinit>(UNIXProcess.java:91)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>         at java.lang.Runtime.exec(Runtime.java:617)
> {noformat}
> A commonality of most of these failures is that the turkish locale has been randomly selected, and apparently the Runtime.exec is busted whtn you use turkish...
> http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8047340
> http://java.thedizzyheights.com/2014/07/java-error-posix_spawn-is-not-a-supported-process-launch-mechanism-on-this-platform-when-trying-to-spawn-a-process/
> We should consider hardcoding the "jdk.lang.Process.launchMechanism" sys property mentioned as a workarround in the jdk bug report



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org