ExtraData: unpack(b) recieved extra data. Salt: 2016.3.1
ExtraData: unpack(b) recieved extra data.
Setup
ran into this with salt-cloud when spawning multiple machines in parallel.
[INFO ] Cloud pool size: 4
[WARNING ] Unable to obtain lock for /var/cache/salt/cloud/index.p
[WARNING ] Unable to obtain lock for /var/cache/salt/cloud/index.p
[WARNING ] Unable to obtain lock for /var/cache/salt/cloud/index.p
[WARNING ] Unable to obtain lock for /var/cache/salt/cloud/index.p
[ERROR ] Caught Exception, terminating workers
TRACE: unpack(b) recieved extra data.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 60, in _call
ret = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 2288, in create_multiprocessing
local_master=parallel_data['local_master']
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2402, in create
vm_['name'], vm_['profile'], 'ec2', vm_['driver']
File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 2475, in cachedir_index_add
index = msgpack.load(fh_)
File "_unpacker.pyx", line 130, in msgpack._unpacker.unpack (msgpack/_unpacker.cpp:132)
File "_unpacker.pyx", line 114, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:114)
ExtraData: unpack(b) recieved extra data.
Error: There was a query error: Exception caught
Caught Exception, terminating workers
TRACE: unpack(b) recieved extra data.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 60, in _call
ret = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 2288, in create_multiprocessing
local_master=parallel_data['local_master']
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2402, in create
vm_['name'], vm_['profile'], 'ec2', vm_['driver']
File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 2475, in cachedir_index_add
index = msgpack.load(fh_)
File "_unpacker.pyx", line 130, in msgpack._unpacker.unpack (msgpack/_unpacker.cpp:132)
File "_unpacker.pyx", line 114, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:114)
ExtraData: unpack(b) recieved extra data.
Steps to Reproduce Issue
spawn/destroy multiple machines in parallel on the same master for a coupld of days.
Versions Report
Salt Version:
Salt: 2016.3.1
Dependency Versions:
cffi: Not Installed
cherrypy: 3.2.2
dateutil: 2.5.3
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.3.0
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-66-generic
system: Linux
version: Ubuntu 14.04 trusty
@damaex17 i'm having a hard time replicate this with the following test case:
map file:
ec2_ubuntu_14:
- ch3ll-mom
- ch3ll-syndic1
Running the following command sudo salt-cloud -P -m /etc/salt/cloud.maps.d/syndic.sls -ldebug it correctly sets up the VMs and I do not see the error.
I am using msgpack 0.4.7 version. If you upgrade your version of msgpack do you still see this error?
If still seeing the error can you provide any additional information that might help to replicate this behavior?
Ch3LL, this problem doesn't show up immediately. Sometimes it goes fine for a couple of days until the issue shows up and after that I can only get the machine back working again by deleting /var/cache/salt/cloud/index.p.
It seems like a certain race condition is corrupting this file.
I will check for an newer version of msgpack and update this issue.
@damaex17 ahhh gotchya. yeah i only tried it once. Let us know once you are able to try a newer version to see if you are not seeing the issue anymore thanks.
I updated python-msgpack and salt. I will check back once the issue comes up again.
Salt Version:
Salt: 2016.3.2
Dependency Versions:
cffi: Not Installed
cherrypy: 3.2.2
dateutil: 2.5.3
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-66-generic
system: Linux
version: Ubuntu 14.04 trusty
This was happening again with an updated msgpack-python.
[ERROR ] Caught Exception, terminating workers
TRACE: unpack(b) received extra data.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 60, in _call
ret = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 2293, in create_multiprocessing
local_master=parallel_data['local_master']
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2402, in create
vm_['name'], vm_['profile'], 'ec2', vm_['driver']
File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 2476, in cachedir_index_add
index = msgpack.load(fh_)
File "_unpacker.pyx", line 159, in msgpack._unpacker.unpack (msgpack/_unpacker.cpp:159)
File "_unpacker.pyx", line 142, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:142)
ExtraData: unpack(b) received extra data.
Error: There was a query error: Exception caught
Caught Exception, terminating workers
TRACE: unpack(b) received extra data.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 60, in _call
ret = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 2293, in create_multiprocessing
local_master=parallel_data['local_master']
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2402, in create
vm_['name'], vm_['profile'], 'ec2', vm_['driver']
File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 2476, in cachedir_index_add
index = msgpack.load(fh_)
File "_unpacker.pyx", line 159, in msgpack._unpacker.unpack (msgpack/_unpacker.cpp:159)
File "_unpacker.pyx", line 142, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:142)
ExtraData: unpack(b) received extra data.
@Ch3LL FWIW, typically these errors aren't related to msgpack but instead an attempt to serialize a data structure (like an exception) that can't be serialized.
@cachedout thanks for pointing that out, I apparently triaged this incorrectly. So in this case from the stack trace it appears there is an issue with salt-cloud when it attempts to call msgpack.load(fh_). I am not able to replicate this issue so triage wise what sort of information could we query from @damaex17 to ensure we get this fixed up for him? Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.