-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception occurred when minion return large data. #53230
Comments
@GwiYeong The version of Salt that you are using has CVE-Support Only and I would urge upgrading to a currently supported version, for example: Salt 2018.3.4 or 2019.2.0 for which there are RHEL 6 packages provided. Note that with pip installations, you will get the latest version of a package unless a specific version is specified, for example: Salt 2019.2.0 salt/requirements/base/txt :~/devcode/test_checkout_salt/salt/requirements$ cat base.txt This should be changed to msgpack-python for Packagesmsgpack-python>0.3,!=0.5.5msgpack>=0.5,!=0.5.5 Required by Tornado to handle threads stuff.futures>=2.0; python_version < '3.0' There have been fixes made since 2017.7.x for msgpack issues, hence the benefit of updating to supported versions. Note that Salt 2017.7.8-426-g464764a is not a released version and hence is unsupported. Release versions for Redhat 6 are available from repo.saltstack.com. Internal testing with latest versions of msgpack, pip installed, have not shown any issues with currently supported software, however if you upgrade to a later version of Salt and still encounter an issue with msgpack v0.6.1, please let us know as soon as possible. If this resolves the issue, please consider closing the issue. |
@dmurphy18 ok. i will upgrade my saltstack. thanks! |
We are seeing this error with 2019.2.0 sudo salt --versions-report Dependency Versions: System Versions: In our case it is for bin instead of str: |
It looks like the issue is that changes were made in msgpack 0.60 to avoid DOS attacks caused by large messages. https://github.com/msgpack/msgpack-python/blob/master/ChangeLog.rst We are going to try to change the MAX_EVENT_SIZE in the salt master configuration file to see if we can accommodate the size of our messages. A 1MB response default size seems small for something like a highstate. |
@hedrickbt We have a similar issue, the return data for large orchestration states wind up being around 2-3 MB and are supposed to be returned to a client calling salt-api. In our case the exception is in For msgpack >=0.6.1, I believe the fix would be to pass |
I had a similar issue and I just ended up pinning msgpack to 0.5.6 in our pex single-binary build for now. |
salt 3000 introduced a dependency on Python msgpack >= 0.6. In msgpack 0.6 their developers changed the max length of a string that could be unpacked from 2GiB to 1MiB. They then proceeded to change it to 100MiB in msgpack 1.0. Now when using msgpack >=0.6 and < 1.0, any message that is unpacked larger than 1MiB will throw an error. For example a file state which tries to send a file larger than 1MiB will get the following error: Unable to manage file: 1048688 exceeds max_str_len(1048576) This error could send the master into a tailspin where subsequent file operations take a long time or just time out. This patch sets the keyword argument max_buffer_size for the Unpacker to 100MiB which is the msgpack 1.0 default now. It will allow people to use msgpack versions >.6 and < 1.0 without this crazy low limit. It should be discussed if we go back to the 2GiB size from < 0.6 days (my vote), or just anything larger than 100MB. This code does a version check, and will only set the keyword on msgpack > = 0.6 and < 1.0. The test checks that we have a buffer size of at least 100MiB in case the Python msgpack devs decide to lower this value again, and break things. We want enforce a decent minimum. fixes saltstack#53230, fixes saltstack#54884, fixes saltstack#55180, fixes saltstack#55184, fixes saltstack#57026, fixes saltstack#57921
salt 3000 introduced a dependency on Python msgpack >= 0.6. In msgpack 0.6 their developers changed the max length of a string that could be unpacked from 2GiB to 1MiB. They then proceeded to change it to 100MiB in msgpack 1.0. Now when using msgpack >=0.6 and < 1.0, any message that is unpacked larger than 1MiB will throw an error. For example a file state which tries to send a file larger than 1MiB will get the following error: Unable to manage file: 1048688 exceeds max_str_len(1048576) This error could send the master into a tailspin where subsequent file operations take a long time or just time out. This patch sets the keyword argument max_buffer_size for the Unpacker to 100MiB which is the msgpack 1.0 default now. It will allow people to use msgpack versions >.6 and < 1.0 without this crazy low limit. It should be discussed if we go back to the 2GiB size from < 0.6 days (my vote), or just anything larger than 100MB. This code does a version check, and will only set the keyword on msgpack > = 0.6 and < 1.0. The test checks that we have a buffer size of at least 100MiB in case the Python msgpack devs decide to lower this value again, and break things. We want enforce a decent minimum. fixes saltstack#53230, fixes saltstack#54884, fixes saltstack#55180, fixes saltstack#55184, fixes saltstack#57026, fixes saltstack#57921
salt 3000 introduced a dependency on Python msgpack >= 0.6. In msgpack 0.6 their developers changed the max length of a string that could be unpacked from 2GiB to 1MiB. They then proceeded to change it to 100MiB in msgpack 1.0. Now when using msgpack >=0.6 and < 1.0, any message that is unpacked larger than 1MiB will throw an error. For example a file state which tries to send a file larger than 1MiB will get the following error: Unable to manage file: 1048688 exceeds max_str_len(1048576) This error could send the master into a tailspin where subsequent file operations take a long time or just time out. This patch sets the keyword argument max_buffer_size for the Unpacker to 100MiB which is the msgpack 1.0 default now. It will allow people to use msgpack versions >.6 and < 1.0 without this crazy low limit. It should be discussed if we go back to the 2GiB size from < 0.6 days (my vote), or just anything larger than 100MB. This code does a version check, and will only set the keyword on msgpack > = 0.6 and < 1.0. The test checks that we have a buffer size of at least 100MiB in case the Python msgpack devs decide to lower this value again, and break things. We want enforce a decent minimum. fixes saltstack#53230, fixes saltstack#54884, fixes saltstack#55180, fixes saltstack#55184, fixes saltstack#57026, fixes saltstack#57921
salt 3000 introduced a dependency on Python msgpack >= 0.6. In msgpack 0.6 their developers changed the max length of a string that could be unpacked from 2GiB to 1MiB. They then proceeded to change it to 100MiB in msgpack 1.0. Now when using msgpack >=0.6 and < 1.0, any message that is unpacked larger than 1MiB will throw an error. For example a file state which tries to send a file larger than 1MiB will get the following error: Unable to manage file: 1048688 exceeds max_str_len(1048576) This error could send the master into a tailspin where subsequent file operations take a long time or just time out. This patch sets the keyword argument max_buffer_size for the Unpacker to 100MiB which is the msgpack 1.0 default now. It will allow people to use msgpack versions >.6 and < 1.0 without this crazy low limit. It should be discussed if we go back to the 2GiB size from < 0.6 days (my vote), or just anything larger than 100MB. This code does a version check, and will only set the keyword on msgpack > = 0.6 and < 1.0. The test checks that we have a buffer size of at least 100MiB in case the Python msgpack devs decide to lower this value again, and break things. We want enforce a decent minimum. fixes #53230, fixes #54884, fixes #55180, fixes #55184, fixes #57026, fixes #57921
salt 3000 introduced a dependency on Python msgpack >= 0.6. In msgpack 0.6 their developers changed the max length of a string that could be unpacked from 2GiB to 1MiB. They then proceeded to change it to 100MiB in msgpack 1.0. Now when using msgpack >=0.6 and < 1.0, any message that is unpacked larger than 1MiB will throw an error. For example a file state which tries to send a file larger than 1MiB will get the following error: Unable to manage file: 1048688 exceeds max_str_len(1048576) This error could send the master into a tailspin where subsequent file operations take a long time or just time out. This patch sets the keyword argument max_buffer_size for the Unpacker to 100MiB which is the msgpack 1.0 default now. It will allow people to use msgpack versions >.6 and < 1.0 without this crazy low limit. It should be discussed if we go back to the 2GiB size from < 0.6 days (my vote), or just anything larger than 100MB. This code does a version check, and will only set the keyword on msgpack > = 0.6 and < 1.0. The test checks that we have a buffer size of at least 100MiB in case the Python msgpack devs decide to lower this value again, and break things. We want enforce a decent minimum. fixes #53230, fixes #54884, fixes #55180, fixes #55184, fixes #57026, fixes #57921
Description of Issue/Question
i reinstalled requirements/base.txt with
pip -r
when i upgrade my salt-master. after thenException occurred while handling stream: 1048606 exceeds max_str_len(1048576)
error is occured.my previous version of saltstack is
v2017.7.4
and upgrading tov2017.7.8
.i search the issue and then i find out that is
msgpack
version issue.pip -r requirements/base.txt
will install latest version of msgpack (0.6.1 currently). i find this issue. so i installed msgpack 0.5.6 manually after uninstalling latest version of msgpack and the error is gone. the problem is solved.so how does saltstack solve this problem?
i thinks there is 2 options to fix it.
first option is simpler than second, so i can fix it myself and send pr(just update requirements).
but second one i can not fix it (it is so complicated).
So what do you think what should i do for?
could you guys fix it?
i need your opinion.
thanks in advance
Setup
Steps to Reproduce Issue
Versions Report
salt-master & salt-minion (same host)
The text was updated successfully, but these errors were encountered: