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

bug cannot allocated memory #17

Closed
darcosion opened this issue Dec 16, 2015 · 4 comments
Closed

bug cannot allocated memory #17

darcosion opened this issue Dec 16, 2015 · 4 comments
Assignees
Labels

Comments

@darcosion
Copy link

darcosion commented Dec 16, 2015

Trying to start the soft in an ubuntu 14.04 :

:~/maltrail$ sudo python sensor.py
Maltrail (sensor) #v0.8.187

[i] using configuration file '/home/user/maltrail/maltrail.conf'
[i] loading trails file...
[i] 921,479 trails loaded
[i] using '/var/log/maltrail' for log storage
[!] in case of any problems with packet capture on virtual interface 'any', please put all monitoring interfaces to promiscuous mode manually (e.g. 'sudo ifconfig eth0 promisc')
[i] opening interface 'any'
[i] setting filter '(tcp[13] == 2) or (tcp[13] & 8 != 0) or not tcp'
[i] creating 3 more processes (4 CPU cores detected)
[!] unhandled exception occurred ('[Errno 12] Cannot allocate memory')

[x] please report the following details at 'https://github.com/stamparm/maltrail/issues':

'Traceback (most recent call last):
File "sensor.py", line 531, in
main()
File "sensor.py", line 524, in main
init()
File "sensor.py", line 443, in init
_init_multiprocessing()
File "sensor.py", line 470, in _init_multiprocessing
_buffer = mmap.mmap(-1, BUFFER_LENGTH) # http://www.alexonlinux.com/direct-io-in-python
error: [Errno 12] Cannot allocate memory

'

If a can adding another data for fix this bug...

@stamparm
Copy link
Owner

I'll make a more graceful exit and a warning, but it would be great to know what went wrong in your case.

Have you changed CAPTURE_BUFFER? If yes, to what value? If no, can you please write down what's your server's memory capacity. I've experienced this kind of behavior on low memory VPSes

stamparm added a commit that referenced this issue Dec 17, 2015
@stamparm stamparm self-assigned this Dec 17, 2015
@stamparm
Copy link
Owner

@darcosion there has been a related bug fixed today. can you please update and retry?

@stamparm
Copy link
Owner

CAPTURE_BUFFER has not been taken into the consideration (it was always 512 MB :). sorry for that

@darcosion
Copy link
Author

Apparently, that's work. :)

Thanks for this anwsome tool.

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

2 participants