You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that pathspider is unable to finish, but also that it will not terminate after throwing the out of memory error.
Running Pathspider on a digital ocean VM with 2gb of ram and Debian 9.
Pathspider is invocated via a python script using subprocess.call().
Executing the webtest.ndjson in examples/webtest.ndjson works flawlessly.
The number of filedescriptors is always around 730. As exeeding this limit can also throw the same error.
stderr is:
WARNING: Failed to execute tcpdump. Check it is installed and in the PATH
INFO:pathspider:activating spider...
INFO:pathspider:starting pathspider
INFO:pathspider:Creating observer
INFO:pathspider:opening output file Gm8h6-fra1-ecn
ERROR:pathspider:exception occurred. terminating.
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pathspider-2.0.0.dev0-py3.5.egg/pathspider/base.py", line 403, in exception_wrapper
target(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pathspider-2.0.0.dev0-py3.5.egg/pathspider/sync.py", line 46, in configurator
self.configurations[config](self)
File "/usr/local/lib/python3.5/dist-packages/pathspider-2.0.0.dev0-py3.5.egg/pathspider/plugins/ecn.py", line 44, in config_ecn
stderr=subprocess.DEVNULL)
File "/usr/lib/python3.5/subprocess.py", line 266, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
INFO:pathspider:terminating pathspider
INFO:observer:processed 6038714 packets (24943 dropped, 0 short, 3535 non-ip) into 1053009 flows (0 ignored)
The current work-around is to split the inputfile in smaller junks. I split it into 4 pieces and also removed some information reseulting in an inputfile size of about 13mb instead of 200. I tested those with even 80 workers and they ran fine.
If I recall correctly the os.fork() is used by subprocess.poppen(). But this should be mentioned in the stack overflow discussion.
The problem is that pathspider is unable to finish, but also that it will not terminate after throwing the out of memory error.
Running Pathspider on a digital ocean VM with 2gb of ram and Debian 9.
Pathspider is invocated via a python script using subprocess.call().
Executing the webtest.ndjson in examples/webtest.ndjson works flawlessly.
The allocatet memory starts at around 200mb and slowly increases with time.
There has been similar problems with os.fork() that when a new proces is instanciated it allocates the same memory as the parent process in case it would need it.
See:https://stackoverflow.com/questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory
The number of filedescriptors is always around 730. As exeeding this limit can also throw the same error.
stderr is:
The relevant files on the machine are:
and the system memory
Also pathspider is not terminating after the error occurs
The text was updated successfully, but these errors were encountered: