The error message for an invalid value of buffer_pool_limit is confusing. For example:
1: "must be a percentage or positive bytes value or percentage" needs to be revised to something like "must be a positive bytes value or percentage"
2: The error message makes it sound like the value of 85% is invalid, when in reality, it is a valid value - Impala does some internal calculations of what the actual buffer_pool_limit should be internally (see ExecEnv::Init) - these calculations first compute the mem limit for the process (ChooseProcessMemLimit) based on the physical machines memory + cgroup settings, and then if mem_limit_includes_jvm == true it subtracts the value of Xmx from the amount of available memory - we don't have logic to capture if the results of that subtraction becomes a negative number, which causes the buffer_pool_limit parsing to fail in a weird way. We should add a check to see if admit_mem_limit_ -= JvmMemoryMetric::HEAP_MAX_USAGE->GetValue() is negative, and then exit with an informative status message