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

Can't pickle local object ManticoreEVM.finalize on 0.3.6 #2496

Open
Pet3ris opened this issue Oct 19, 2021 · 1 comment
Open

Can't pickle local object ManticoreEVM.finalize on 0.3.6 #2496

Pet3ris opened this issue Oct 19, 2021 · 1 comment
Assignees
Labels

Comments

@Pet3ris
Copy link

Pet3ris commented Oct 19, 2021

Summary of the problem

Issues running manticore on a very simple contract.

Manticore version

Manticore 0.3.6

Python version

3.9

OS / Environment

Mac OS X 11.2.2

Dependencies

Step to reproduce the behavior

In a Conda environment

pip3 install manticore # installs latest 0.3.6
manticore example.sol

where example is:

contract Simple {
    function f(uint a) payable public{
        if (a == 65) {
            revert();
        }
    }
}

Expected behavior

Successful run.

Actual behavior

Raises the following error AttributeError: Can't pickle local object 'ManticoreEVM.finalize.<locals>.worker_finalize.

Any relevant logs

2021-10-19 15:57:00,199: [68957] m.c.manticore:WARNING: Manticore is only supported on Linux. Proceed at your own risk!
2021-10-19 15:57:00,359: [68957] m.main:INFO: Registered plugins: IntrospectionAPIPlugin, <class 'manticore.ethereum.plugins.SkipRevertBasicBlocks'>, <class 'manticore.ethereum.plugins.FilterFunctions'>
2021-10-19 15:57:00,359: [68957] m.main:INFO: Beginning analysis
2021-10-19 15:57:00,363: [68957] m.e.manticore:INFO: Starting symbolic create contract
2021-10-19 15:57:00,693: [68957] m.e.manticore:INFO: Starting symbolic transaction: 0
2021-10-19 15:57:01,274: [68957] m.e.manticore:INFO: 1 alive states, 1 terminated states
2021-10-19 15:57:01,343: [68957] m.e.manticore:INFO: Starting symbolic transaction: 1
2021-10-19 15:57:01,981: [68957] m.e.manticore:INFO: 1 alive states, 1 terminated states
Traceback (most recent call last):
  File "/usr/local/bin/manticore", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/manticore/__main__.py", line 42, in main
    ethereum_main(args, logger)
  File "/usr/local/lib/python3.9/site-packages/manticore/ethereum/cli.py", line 145, in ethereum_main
    m.finalize(only_alive_states=args.only_alive_testcases)
  File "/usr/local/lib/python3.9/site-packages/manticore/core/manticore.py", line 177, in newFunction
    return func(self, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/manticore/ethereum/manticore.py", line 1768, in finalize
    proc.start()
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'ManticoreEVM.finalize.<locals>.worker_finalize'
@ekilmer
Copy link
Contributor

ekilmer commented Sep 30, 2022

Update on this... I also recently encountered this issue. Python 3.7 doesn't show this error, but Python 3.8 has the error, so something changed from Python 3.7 and 3.8.

Unfortunately, I don't have or know of a fix for this 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants