Skip to content
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

msgpack Exception: OverflowError: long too big to convert #12185

Closed
bbinet opened this issue Apr 22, 2014 · 21 comments
Closed

msgpack Exception: OverflowError: long too big to convert #12185

bbinet opened this issue Apr 22, 2014 · 21 comments
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@bbinet
Copy link
Contributor

bbinet commented Apr 22, 2014

Running salt-minion on Debian on a cubieboard v2 board, when running saltutil.kill_job function I get the following exception (this has also appeared once on a state.highstate run):

root@hl-srv-1-dev:~/salt-fileserver/pillar/master# salt '*' saltutil.kill_job 20140422142858458634
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
OverflowError: long too big to convert
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 135, in salt_main
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 138, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 553, in cmd_cli
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 272, in run_job
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 1385, in pub
    payload = sreq.send(payload_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 93, in send
    return self._uncrypted_transfer(load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 86, in _uncrypted_transfer
    return self.sreq.send(self.crypt, load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 181, in send
    pkg = self.serial.dumps(payload)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 118, in dumps
    return msgpack.dumps(msg)
  File "_msgpack.pyx", line 169, in msgpack._msgpack.packb (msgpack/_msgpack.c:2384)
  File "_msgpack.pyx", line 153, in msgpack._msgpack.Packer.pack (msgpack/_msgpack.c:2020)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 142, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1862)
  File "_msgpack.pyx", line 105, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1345)
OverflowError: long too big to convert
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 135, in salt_main
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 138, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 553, in cmd_cli
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 272, in run_job
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 1385, in pub
    payload = sreq.send(payload_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 93, in send
    return self._uncrypted_transfer(load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 86, in _uncrypted_transfer
    return self.sreq.send(self.crypt, load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 181, in send
    pkg = self.serial.dumps(payload)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 118, in dumps
    return msgpack.dumps(msg)
  File "_msgpack.pyx", line 169, in msgpack._msgpack.packb (msgpack/_msgpack.c:2384)
  File "_msgpack.pyx", line 153, in msgpack._msgpack.Packer.pack (msgpack/_msgpack.c:2020)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 142, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1862)
  File "_msgpack.pyx", line 105, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1345)
OverflowError: long too big to convert
root@hl-srv-1-dev:~/salt-fileserver/pillar/master# 

I suppose this is because salt-minion is running on an armhf Debian system?
Is salt/msgpack supposed to work on armhf architectures?

Please tell me how can I help provide more information to investigate this issue.

For information, here are the versions reports for salt-minion:

root@cubie:~# salt --versions-report
           Salt: 2014.1.3
         Python: 2.7.3 (default, Mar 14 2014, 17:55:54)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.3

And salt-master:

root@hl-srv-1-dev:~# salt-call --versions-report
           Salt: 2014.1.3
         Python: 2.7.3 (default, Mar 13 2014, 11:03:55)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.3
@bbinet
Copy link
Contributor Author

bbinet commented Apr 22, 2014

Sorry, it hasn't occured on a state.highstate function but only when running either saltutil.find_job or saltutil.kill_job functions.

@cachedout
Copy link
Contributor

This is quite interesting. The stacktrace is clearly coming from inside msgpack and so this may end up becoming an upstream bug with the msgpack folks but we'll investigate.

@cachedout cachedout added this to the Approved milestone Apr 22, 2014
@s0undt3ch
Copy link
Member

We're converting the jid to int right from the CLI when parsing args.

As a workaround we could try not to pass jid as an int for this specific platform?

Pedro Algarvio @ Phone

----- Reply message -----
From: "Mike Place" notifications@github.com
To: "saltstack/salt" salt@noreply.github.com
Subject: [salt] msgpack Exception: OverflowError: long too big to convert (#12185)
Date: Tue, Apr 22, 2014 17:52
This is quite interesting. The stacktrace is clearly coming from inside msgpack and so this may end up becoming an upstream bug with the msgpack folks but we'll investigate.


Reply to this email directly or view it on GitHub.

@cachedout
Copy link
Contributor

@s0undt3ch That might work, though we'll have to catch it on the other side and make sure we have it cast it back correctly or we'll run into more problems potentially.

@bbinet
Copy link
Contributor Author

bbinet commented Apr 23, 2014

Do you want me to test something to help with this issue?

@cachedout
Copy link
Contributor

@bbinet We're not yet in agreement on the right approach here, I think. Once we figure out the best way to solve this we'll definitely appreciate your help in testing this thoroughly. Thanks!

@aryanet
Copy link

aryanet commented Apr 23, 2014

I have the same issue with the same version. Although I am running Ubuntu 12.04. Why not keep the jids as strings for all platforms as a solution?

@s0undt3ch
Copy link
Member

@aryanet on which platform are you on? ARM?

@aryanet
Copy link

aryanet commented Apr 23, 2014

TL;DR: x86_64
Dedicated machine with this CPU:
Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
http://ark.intel.com/products/65727/Intel-Xeon-Processor-E3-1270-v2-8M-Cache-3_50-GHz
Kernel:
Linux 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

@basepi
Copy link
Contributor

basepi commented Apr 24, 2014

This is due to a change we made with argument parsing. I think @terminalmage already fixed it, if I remember correctly. He took long types out of the list of things we wanted to convert to.

@basepi
Copy link
Contributor

basepi commented Apr 24, 2014

(I may be wrong, because I think his fix was in 2014.1.3, which is what you're running.)

@replicant0wnz
Copy link
Contributor

Can confirm this bug in 2014.1.3 on x86_64 when doing a saltutil.find_job

@replicant0wnz
Copy link
Contributor

Is there a quick fix for this I can apply to my own branch while the debate continues on what the proper fix is? :)

@basepi
Copy link
Contributor

basepi commented Apr 30, 2014

Yes, the temporary fix is to double quote your jid:

salt '*' saltutil.find_job '"20140422142858458634"'

This will ensure that it is consumed as a string.

@basepi
Copy link
Contributor

basepi commented Apr 30, 2014

@terminalmage's fix definitely made it in, so there must be an additional problem here. The double quoting should work for now, but we'll investigate an actual fix.

@replicant0wnz
Copy link
Contributor

@basepi doh! Yup that did the trick. FYI it does seem to be via the command line only as it works via the API.

@terminalmage
Copy link
Contributor

This has been found and fixed in #12460, and the fix will be in 2014.1.4. Here's an example of the now-fixed behavior:

root@saltmine:~erik/saltdev# salt saltmine saltutil.find_job 20140501112515756618
saltmine:
    ----------
    arg:
        - sleep 120
    fun:
        cmd.run
    jid:
        20140501112515756618
    pid:
        4559
    ret:

    tgt:
        saltmine
    tgt_type:
        glob
    user:
        root
root@saltmine:~erik/saltdev# salt saltmine saltutil.kill_job 20140501112515756618
saltmine:
    Signal 9 sent to job 20140501112515756618 at pid 4559
root@saltmine:~erik/saltdev# salt saltmine saltutil.find_job 20140501112515756618
saltmine:
    ----------

And in the terminal that originally ran the command:

root@saltmine:~erik/saltdev# salt saltmine cmd.run 'sleep 120' -v
Executing job with jid 20140501112515756618
-------------------------------------------

Execution is still running on saltmine
Execution is still running on saltmine
saltmine:
    Minion did not return

@basepi
Copy link
Contributor

basepi commented May 1, 2014

Awesome!

@basepi basepi closed this as completed May 1, 2014
@7oku
Copy link
Contributor

7oku commented Nov 27, 2014

I have the same bug still in 2014.7.0 (but want to mention i could workaround this by wrapping it in quotes as mentioned above ...):

salt --version
salt 2014.7.0 (Helium)
salt \* saltutil.kill_job 20141125115342216725
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
OverflowError: long too big to convert
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 240, in salt_main
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 172, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 569, in cmd_cli
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 282, in run_job
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 1379, in pub
    payload = sreq.send(payload_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 237, in send
    return self._uncrypted_transfer(load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 230, in _uncrypted_transfer
    return self.sreq.send(self.crypt, load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 202, in send
    pkg = self.serial.dumps(payload)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 115, in dumps
    return msgpack.dumps(msg)
  File "_packer.pyx", line 259, in msgpack._packer.packb (msgpack/_packer.cpp:259)
  File "_packer.pyx", line 184, in msgpack._packer.Packer.pack (msgpack/_packer.cpp:184)
  File "_packer.pyx", line 159, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:159)
  File "_packer.pyx", line 159, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:159)
  File "_packer.pyx", line 173, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:173)
  File "_packer.pyx", line 124, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:124)
OverflowError: long too big to convert
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 240, in salt_main
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 172, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 569, in cmd_cli
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 282, in run_job
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 1379, in pub
    payload = sreq.send(payload_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 237, in send
    return self._uncrypted_transfer(load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 230, in _uncrypted_transfer
    return self.sreq.send(self.crypt, load, tries, timeout)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 202, in send
    pkg = self.serial.dumps(payload)
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 115, in dumps
    return msgpack.dumps(msg)
  File "_packer.pyx", line 259, in msgpack._packer.packb (msgpack/_packer.cpp:259)
  File "_packer.pyx", line 184, in msgpack._packer.Packer.pack (msgpack/_packer.cpp:184)
  File "_packer.pyx", line 159, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:159)
  File "_packer.pyx", line 159, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:159)
  File "_packer.pyx", line 173, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:173)
  File "_packer.pyx", line 124, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:124)
OverflowError: long too big to convert

@basepi
Copy link
Contributor

basepi commented Dec 1, 2014

Is your minion also on 2014.7.0, @7oku?

@spo0nman
Copy link

spo0nman commented Mar 2, 2015

This is also a problem with custom grains. If a grain returned is long int, it breaks salt.

'''
File "/opt/blue-python/2.7/lib/python2.7/site-packages/msgpack/init.py", line 47, in packb
return Packer(**kwargs).pack(o)
File "_packer.pyx", line 224, in msgpack._packer.Packer.pack (msgpack/_packer.cpp:224)
File "_packer.pyx", line 226, in msgpack._packer.Packer.pack (msgpack/_packer.cpp:226)
File "_packer.pyx", line 185, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:185)
File "_packer.pyx", line 185, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:185)
File "_packer.pyx", line 185, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:185)
File "_packer.pyx", line 141, in msgpack._packer.Packer._pack (msgpack/_packer.cpp:141)
OverflowError: long int too large to convert
'''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

9 participants