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

Management command 'shutdown' causes exception #8

Open
cmarxer opened this issue Jan 31, 2018 · 1 comment
Open

Management command 'shutdown' causes exception #8

cmarxer opened this issue Jan 31, 2018 · 1 comment
Labels

Comments

@cmarxer
Copy link
Collaborator

cmarxer commented Jan 31, 2018

Sending 'shutdown' is not handled properly (sent with Mgmt.py):

2018-01-31 16:36:17,998 - MgmtSys 	 INFO: 	 Shutdown
Process Process-6:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/claudio/software/PiCN/PiCN/Mgmt/Mgmt.py", line 157, in _run
    self.mgmt(mgmt_sock)
  File "/home/claudio/software/PiCN/PiCN/Mgmt/Mgmt.py", line 79, in mgmt
    self.shutdown()
  File "/home/claudio/software/PiCN/PiCN/ProgramLibs/ICNForwarder/ICNForwarder.py", line 86, in stop_forwarder
    self.mgmt.stop_process()
  File "/home/claudio/software/PiCN/PiCN/Mgmt/Mgmt.py", line 165, in stop_process
    self.process.terminate()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 116, in terminate
    self._popen.terminate()
AttributeError: 'NoneType' object has no attribute 'terminate'
@cmarxer cmarxer added the bug label Jan 31, 2018
@cmarxer
Copy link
Collaborator Author

cmarxer commented Feb 1, 2018

Also termination with Ctrl+C should be handled properly:

~> picn-relay 
2018-02-01 14:52:35,320 - ICNForwarder 	 INFO: 	 Starting a CCN Forwarder...
2018-02-01 14:52:35,320 - ICNForwarder 	 INFO: 	 UDP Port:       9000
2018-02-01 14:52:35,320 - ICNForwarder 	 INFO: 	 Log Level:      info
2018-02-01 14:52:35,320 - ICNForwarder 	 INFO: 	 Packet Format:  ndntlv
^CTraceback (most recent call last):
  File "/home/claudio/software/PiCN/PiCN/Executable/ICNForwarder.py", line 47, in <module>
    main(args)
  File "/home/claudio/software/PiCN/PiCN/Executable/ICNForwarder.py", line 38, in main
    forwarder.linklayer.process.join()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 124, in join
    res = self._popen.wait(timeout)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 57, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 35, in poll
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Process Process-6:
Process Process-4:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/claudio/software/PiCN/PiCN/Processes/LayerProcess.py", line 118, in _run
    self._run_poll(from_lower, from_higher, to_lower, to_higher)
  File "/home/claudio/software/PiCN/PiCN/Processes/LayerProcess.py", line 76, in _run_poll
    ready_vars = poller.poll()
KeyboardInterrupt
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/claudio/software/PiCN/PiCN/Mgmt/Mgmt.py", line 156, in _run
    ready_vars = poller.poll()
KeyboardInterrupt
Process Process-3:
Process Process-5:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()

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

1 participant