python_runner.py should check the utf8 length to determine when to use stdin for parameters. · Issue #6331 · StackStorm/st2 · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python_runner.py should check the utf8 length to determine when to use stdin for parameters.
Provide a quick summary of your bug report.
# If parameter size is larger than the maximum allowed by Linux kernel
# we need to swap to stdin to communicate parameters. This avoids a
# failure to fork the wrapper process when using large parameters.
stdin = None
stdin_params = None
lenencoded = len(serialized_parameters.encode("utf8"))
LOG.debug(f"Parameters len encoded: {lenencoded}")
if len(serialized_parameters) >= MAX_PARAM_LENGTH:
stdin = subprocess.PIPE
LOG.debug("Parameters are too big...changing to stdin")
stdin_params = '{"parameters": %s}\n' % (serialized_parameters)
args.append("--stdin-parameters")
else:
LOG.debug("Parameters are just right...adding them to arguments")
args.append("--parameters=%s" % (serialized_parameters))
check against MAX_PARAM_LENGTH should use lenencoded . high bit character strings will end up longer than the length of the unicode string.
STACKSTORM VERSION
3.9
OS, environment, install method
all
Steps to reproduce the problem
use a string with high bit characters and a unicode string length > (131072 -15)
Expected Results
action runs without error
Actual Results
[Errno 7] Argument list too long: '/opt/stackstorm/virtualenvs/rt/bin/python'
The text was updated successfully, but these errors were encountered:
SUMMARY
python_runner.py should check the utf8 length to determine when to use stdin for parameters.
Provide a quick summary of your bug report.
check against MAX_PARAM_LENGTH should use
lenencoded
. high bit character strings will end up longer than the length of the unicode string.STACKSTORM VERSION
3.9
OS, environment, install method
all
Steps to reproduce the problem
use a string with high bit characters and a unicode string length > (131072 -15)
Expected Results
action runs without error
Actual Results
The text was updated successfully, but these errors were encountered: