hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bikas Saha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-4368) TaskRunner fails to start jars when the java.library.path contains a quoted path with embedded spaces
Date Tue, 26 Jun 2012 23:29:44 GMT

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

Bikas Saha commented on MAPREDUCE-4368:
---------------------------------------

b) add only the system library path to vargs and forget to include the values in javaOptsSplit[i].
This bug still seems to be there.

Did you get a chance to look at 3) above? Seems to me the issue is not about split on ' '
but not handling the '"' that gets embedded into the cmd line. You could add a random '"'
in the path (and no space) and that should also repro the problem. Would you mind verifying
that and seeing if its a Windows only issue? If its not, then it would be better to have generic
solution.

The handling of spaces is itself an issue because the current code assumes there are no spaces
except as delimiters. And that is not Windows specific.
                
> TaskRunner fails to start jars when the java.library.path contains a quoted path with
embedded spaces
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4368
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4368
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: tasktracker
>    Affects Versions: 1-win
>         Environment: on Windows: 
> set PATH=%PATH%;"C:\this memorable place".
>            Reporter: John Gordon
>              Labels: newbie, patch
>         Attachments: TaskRunner.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> TaskRunner splits arguments by space before it adds them back to the vargs list, so it
loses all context of quote escaped strings with embedded spaces.  This gets fixed up later
by wrapping all arguments with " -- so you get something like java "-D<opt>=<value>".
 This is problematic for paths with embedded spaces, where we end up creating "-D<opt>=<first
part" "last part>".  To java, the jar being run is last part.  So with the environment
above, you will see "ClassNoDefFoundError: memorable" and the jar will fail to start.  In
this particular case, we know that java.libarary.path contains paths and the tests often use
%PATH% to seed this, so the fix is to remove embedded quotes in listed path elements because
we know the aggregate will be quoted when the JVM is started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message