zoukankan      html  css  js  c++  java
  • VSCode调试data层时自身的一个bug

    使用VSCode在pytorch下进行调试有的时候会遇到下面这个错误:

    E00037.671: Exception escaped from start_client
                
                Traceback (most recent call last):
                  File "/home/gzz/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/log.py", line 110, in g
                    return f(*args, **kwargs)
                  File "/home/gzz/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/pydevd_hooks.py", line 74, in start_client
                    sock, start_session = daemon.start_client((host, port))
                  File "/home/gzz/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/daemon.py", line 214, in start_client
                    with self.started():
                  File "/media/hdd/yike/anaconda3/envs/pytorch-netvlad/lib/python3.6/contextlib.py", line 81, in __enter__
                    return next(self.gen)
                  File "/home/gzz/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/daemon.py", line 110, in started
                    self.start()
                  File "/home/gzz/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/daemon.py", line 145, in start
                    raise RuntimeError('already started')
                RuntimeError: already started
                
    Traceback (most recent call last):
    
    Error in atexit._run_exitfuncs:
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):

    原因:VSCode对多线程支持得不够好,解决方法:在使用多线程得脚本中添加如下代码:

    import multiprocessing
    multiprocessing.set_start_method('spawn',True)

    但有的时候可能还会出现如下得错误:

    OMP: Error #13: Assertion failure at z_Linux_util.cpp(2361).
    OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
    /media/hdd/yike/anaconda3/envs/pytorch-netvlad/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 26 leaked semaphores to clean up at shutdown
      len(cache))

    发现这个问题是由于intel-openmp版本太新造成的bug,通过重新安装intel-openmp=2019.4即可解决。

    conda install -y intel-openmp=2019.4
  • 相关阅读:
    简单查询plan
    EXP AND IMP
    (4.16)sql server迁移DB文件(同一DB内)
    sql server日志传送实践(基于server 2008 R2)
    (1.3)学习笔记之mysql体系结构(C/S整体架构、内存结构、物理存储结构、逻辑结构、SQL查询流程)
    (1.2)学习笔记之mysql体系结构(数据库文件)
    (1.1)学习笔记之mysql体系结构(内存、进程、线程)
    SSAS(SQL Server 分析服务)、***S(SQL Server报表服务)、SSIS(SQL Server集成服务)
    教你使用SQL查询(1-12)
    Sql Server内置函数实现MD5加密
  • 原文地址:https://www.cnblogs.com/zf-blog/p/11898009.html
Copyright © 2011-2022 走看看