Related to #1827
And #1748
But the logic in ForkingTaskRunner as per
for (String propName : props.stringPropertyNames()) {
for (String allowedPrefix : config.getAllowedPrefixes()) {
if (propName.startsWith(allowedPrefix)) {
command.add(String.format( "-D%s=%s", propName, props.getProperty(propName)));
}
}
}
Does not escape or quote the java options properly. This causes properties like druid.indexer.runner.javaOpts=-server -Xmx256m -XX:OnOutOfMemoryError=\\\"kill -9 %p\\\" to be placed on the java command line as druid.indexer.runner.javaOpts=-server -Xmx256m -XX:OnOutOfMemoryError="kill -9 %p" which fails because
#
# java.lang.OutOfMemoryError: Java heap space
# -XX:OnOutOfMemoryError=""kill -9 %p""
# Executing /bin/sh -c ""kill -9 55925""...
Related to #1827
And #1748
But the logic in
ForkingTaskRunneras perDoes not escape or quote the java options properly. This causes properties like
druid.indexer.runner.javaOpts=-server -Xmx256m -XX:OnOutOfMemoryError=\\\"kill -9 %p\\\"to be placed on the java command line asdruid.indexer.runner.javaOpts=-server -Xmx256m -XX:OnOutOfMemoryError="kill -9 %p"which fails because