Description
Summary
We have built the AWS IoT device client for armv7 architecture and deployed it on our device. We were also able to connect the device to AWS IoT Core and successfully execute jobs. Our job executions successfully reported both standard output and standard error to AWS IoT Core.
Expectation
Running a job with an output that exceeds the limit of 1024bytes, we were expecting the jobs feature within AWS IoT Device Client to publish the last 1024 characters of standard output as part of the job execution update, as mentioned in AWS documentation.
Actual Result
Instead, once the standard output reached its limit, the processes initiated by AWS jobs were unexpectedly terminated and killed abruptly. Afterwards, the job execution was considered successful and the first 1024 characters logged before termination were reported as standard output
Steps To Reproduce
The AWS IoT Device Client config file looks as follows:
{
"endpoint": "<endpoint>",
"cert": "<cert_file_path>/cert.pem.crt",
"key": "<key_file_path>/private.pem.key",
"root-ca": "",
"thing-name": "<thing_name>",
"logging": {
"level": "DEBUG",
"destination": "stdout"
},
"jobs": {
"enabled": true,
"handler-directory": ""
},
"tunneling": {
"enabled": false
},
"device-defender": {
"enabled": false,
"interval": 300
},
"fleet-provisioning": {
"enabled": false,
"template-parameters": "",
"template-name": "",
"csr-file": "",
"device-key": ""
},
"samples": {
"pub-sub": {
"enabled": false,
"publish-topic": "",
"publish-file": "",
"subscribe-topic": "",
"subscribe-file": ""
}
},
"config-shadow": {
"enabled": false
},
"sample-shadow": {
"enabled": false,
"shadow-name": "",
"shadow-input-file": "",
"shadow-output-file": ""
},
"secure-element": {
"enabled": false,
"pkcs11-lib": "",
"secure-element-pin": "",
"secure-element-key-label": "",
"secure-element-slot-id": "",
"secure-element-token-label": ""
}
}
The job document is configured to run a script "run.sh" as such:
bash run.sh --script echo_stdout_limit.sh
And our "echo_stdout_limit.sh" contains:
for i in {0..33000}
do
echo "111111111111111111111111111111111"
done
echo "After exceeding stdout limit"
The AWS IoT Device Client logs came as follows:
And the job execution results on the AWS IoT Console were as follows: