Opened 20 months ago

Closed 12 months ago

Last modified 12 months ago

#25302 closed defect (worksforme)

Cannot quit after using Control Interpreter

Reported by: slopdog Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Nyx Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Overview:

After using the control interpreter to send a command and returning to the graph screen, 'qq' does not exit to shell. Nyx seems to get stuck and never exits.

Steps to Reproduce:

Run nyx, cycle through to Control Interpreter, press [Enter] to start interpreter, type SIGNAL RELOAD[Enter], Press [Enter] to quit, cycle back to graph panel, type 'qq' to quit. Window disappears but hangs and never exits back to shell.

Expected Results:

Program should exit and return to the original shell.

Actual Results:

Nyx disappears but does not return control to shell.

Pressing control-C from here yields:

Traceback (most recent call last): File "/bin/nyx", line 9, in <module> load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')() File "/usr/lib/python3.4/site-packages/nyx/__init__.py", line 176, in main nyx.starter.main() File "/usr/lib/python3.4/site-packages/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, kwargs) File "/usr/lib/python3.4/site-packages/nyx/starter.py", line 123, in main _shutdown_daemons(controller) File "/usr/lib/python3.4/site-packages/nyx/starter.py", line 239, in _shutdown_daemons controller.close() File "/usr/lib/python3.4/site-packages/stem/control.py", line 1083, in close super(Controller, self).close() File "/usr/lib/python3.4/site-packages/stem/control.py", line 746, in close t.join() File "/usr/lib64/python3.4/threading.py", line 1051, in join self._wait_for_tstate_lock() File "/usr/lib64/python3.4/threading.py", line 1067, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt

Misc Info:

Nyx Version: nyx version 2.0.4 (released November 5, 2017)
OS: CentOS Linux release 7.4.1708 (Core)
Kernel: 4.4.96-mainline-rev1
Python version: Python 3.4.5 (default, Dec 11 2017, 14:22:24) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
Nyx installed via npm.

I run nyx using: sudo -u tor nyx

Additionally, the direction by which you access the control interpreter and subsequently the graph screen may matter.

If I go "left" from Screen 1 to Screen 5, use the interpreter, exit it, then go left to screen 4 all the way to 1, qq seems to return to shell normally.

If I go "left" from Screen 1 to Screen 5, use the interpreter, exit it, then go right from screen 5 to 1, qq hangs with the symptoms described above.

Child Tickets

Change History (7)

comment:1 Changed 20 months ago by slopdog

Sorry for the bad looking stack trace, it looked good in the preview!

Traceback (most recent call last):

File "/bin/nyx", line 9, in <module>

load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')()

File "/usr/lib/python3.4/site-packages/nyx/__init__.py", line 176, in main

nyx.starter.main()

File "/usr/lib/python3.4/site-packages/stem/util/conf.py", line 289, in wrapped

return func(*args, config = config, kwargs)

File "/usr/lib/python3.4/site-packages/nyx/starter.py", line 123, in main

_shutdown_daemons(controller)

File "/usr/lib/python3.4/site-packages/nyx/starter.py", line 239, in _shutdown_daemons

controller.close()

File "/usr/lib/python3.4/site-packages/stem/control.py", line 1083, in close

super(Controller, self).close()

File "/usr/lib/python3.4/site-packages/stem/control.py", line 746, in close

t.join()

File "/usr/lib64/python3.4/threading.py", line 1051, in join

self._wait_for_tstate_lock()

File "/usr/lib64/python3.4/threading.py", line 1067, in _wait_for_tstate_lock

elif lock.acquire(block, timeout):

KeyboardInterrupt

comment:2 Changed 20 months ago by atagar

Status: newneeds_information

Hi slopdog, thanks for the detailed repro steps! I just gave this a whirl with the current git codebase with both python 2.7 and 3.5 but both worked for me. Mind running the current git codebase to see if this still freezes for you?

% git clone https://git.torproject.org/nyx.git
% cd nyx
% ./run_nyx

If that still causes this freeze then please add the '--debug' argument and send me the log (minus anything you feel is secret).

comment:3 Changed 14 months ago by traumschule

Ran into this and failed to reproduce it with above steps. Testing from git now to catch it again.

comment:4 Changed 12 months ago by wagon

Run nyx, cycle through to Control Interpreter, press [Enter] to start interpreter, type SIGNAL RELOAD[Enter], Press [Enter] to quit, cycle back to graph panel, type 'qq' to quit.

I think you mean "Press [ESC] to quit" instead of "Press [Enter] to quit." Anyway, I cannot reproduce this problem on my Debian.

comment:5 Changed 12 months ago by wagon

Also, I don't understand why do you need qq instead of q. Simply q should be enough to quit.

comment:6 Changed 12 months ago by atagar

Resolution: worksforme
Status: needs_informationclosed

I cannot reproduce this problem on my Debian.

Great, thanks wagon!

Also, I don't understand why do you need qq instead of q. Simply q should be enough to quit.

It's so a single accidental keystroke doesn't shut nyx down. You can include "confirm_quit false" in your nyxrc to turn that off.

comment:7 Changed 12 months ago by wagon

Thanks, atagar! I don't know whether it matters or not, but I didn't use su or sudo in my tests. If reporter still has this problem, he should try to reproduce it without su/sudo, to check different shells and to use clean shell environment.

Note: See TracTickets for help on using tickets.