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

Interactive multi-threaded bots require multiple Keyboard Interrupts #1403

Closed
ghost opened this issue Apr 9, 2019 · 2 comments
Closed

Interactive multi-threaded bots require multiple Keyboard Interrupts #1403

ghost opened this issue Apr 9, 2019 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: intelmqctl
Milestone

Comments

@ghost
Copy link

ghost commented Apr 9, 2019

Using bots the new multihreading with instances_threads parameter requires multiple SIGTERMs to kill them.

It did work correctly at an intermediate step of developing this feature, so there must be a solution :)

For example:

wait-expert.0: Received message {'feed.accuracy': 100.0, 'feed.name': 'Spamhaus Drop', 'feed.provider': 'Spamhaus', 'feed.url': 'https://www.spamhaus.org/drop/drop.txt', 'time.observation': '2019-04-09T15:04:40+00:00', 'time.source': '2019-04-05T23:33:22+00:00', 'classification.type': 'spam', 'raw': 'MTU5LjIyOS4wLjAvMTYgOyBTQkwyMTQxNTU=', 'source.network': '159.229.0.0/16', 'extra.blocklist': 'SBL214155'}.
^CKeyboard interrupt.
^CException ignored in: <module 'threading' from '/usr/lib64/python3.6/threading.py'>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 1294, in _shutdown
    t.join()
  File "/usr/lib64/python3.6/threading.py", line 1056, in join
    self._wait_for_tstate_lock()
  File "/usr/lib64/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt
^C
wait-expert.0: Disconnected from source pipeline.
wait-expert.0: Disconnected from destination pipeline.
wait-expert.0: Bot stopped.
@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: core labels Apr 9, 2019
@ghost ghost added this to the 2.0.0 milestone Apr 9, 2019
@ghost ghost changed the title Multi-threaded bots require multiple SIGTERMs Interactive multi-threaded bots require multiple Keyboard Interrupts May 13, 2019
@ghost
Copy link
Author

ghost commented May 13, 2019

Only affects intelmqctl run

@ghost ghost modified the milestones: 2.0.0, 2.0.1 May 19, 2019
@ghost ghost closed this as completed in 1d5cad1 May 21, 2019
@ghost ghost self-assigned this May 21, 2019
@dipenpatel235
Copy link

intelmqctl run my-ip-collector
intelmqctl: Starting my-ip-collector...
Traceback (most recent call last):
File "/usr/local/bin/intelmqctl", line 11, in
load_entry_point('intelmq==2.0.1a1', 'console_scripts', 'intelmqctl')()
File "/usr/local/lib/python3.6/dist-packages/intelmq/bin/intelmqctl.py", line 1425, in main
return x.run()
File "/usr/local/lib/python3.6/dist-packages/intelmq/bin/intelmqctl.py", line 912, in run
retval, results = args.func(**args_dict)
File "/usr/local/lib/python3.6/dist-packages/intelmq/bin/intelmqctl.py", line 919, in bot_run
return self.bot_process_manager.bot_run(**kwargs), None
File "/usr/local/lib/python3.6/dist-packages/intelmq/bin/intelmqctl.py", line 165, in bot_run
loglevel=loglevel)
File "/usr/local/lib/python3.6/dist-packages/intelmq/lib/bot_debugger.py", line 47, in init
self.instance = bot(bot_id, disable_multithreading=True)
TypeError: init() got an unexpected keyword argument 'disable_multithreading'

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: intelmqctl
Projects
None yet
Development

No branches or pull requests

1 participant