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

Windows下vizviewer在使用被占用的端口时无法使用Ctrl+C退出 #353

Closed
Dealizey opened this issue Jul 8, 2023 · 1 comment · Fixed by #354
Closed

Windows下vizviewer在使用被占用的端口时无法使用Ctrl+C退出 #353

Dealizey opened this issue Jul 8, 2023 · 1 comment · Fixed by #354

Comments

@Dealizey
Copy link

Dealizey commented Jul 8, 2023

系统软件版本:
Windows 11 22H2

(web) PS F:\> python -V
Python 3.9.12
(web) PS F:\> viztracer --version
0.15.6

BUG:

(web) PS F:\***> viztracer .\test.py
Total Entries: 1000002
Use the following command to open the report:
vizviewer F:\***\result.json
(web) PS F:\***> vizviewer .\result.json -p 9901 # 此处9901是一个被占用的端口,换成其他端口就不会报错
Exception in thread Thread-1:
Traceback (most recent call last):
  File "F:\ProgramData\Miniconda3\envs\web\lib\threading.py", line 973, in _bootstrap_inner
    self.run()
  File "F:\ProgramData\Miniconda3\envs\web\lib\site-packages\viztracer\viewer.py", line 301, in run
    self.retcode = self.view()
  File "F:\ProgramData\Miniconda3\envs\web\lib\site-packages\viztracer\viewer.py", line 341, in view
    with VizViewerTCPServer(('0.0.0.0', self.port), Handler) as self.httpd:
  File "F:\ProgramData\Miniconda3\envs\web\lib\socketserver.py", line 452, in __init__
    self.server_bind()
  File "F:\ProgramData\Miniconda3\envs\web\lib\socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试。
# 此时程序卡住了,无论怎么按Ctrl+C都不会退出

程序卡住了,无论怎么按Ctrl+C都不会退出。这也许是一个BUG

@gaogaotiantian gaogaotiantian linked a pull request Jul 17, 2023 that will close this issue
@gaogaotiantian
Copy link
Owner

vizviewer的threading的lock没有处理exception的情况,导致副线程在exception的情况下始终没有释放一个主线程在等的锁。#354会修复这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants