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

debugpy: 1.0.0b12 -> 1.0.0rc2 #95237

Closed
wants to merge 1 commit into from
Closed

Conversation

kira-bruneau
Copy link
Contributor

Motivation for this change

Upgrade to latest version: https://github.com/microsoft/debugpy/releases/tag/v1.0.0rc1

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    No bin files, only a python library. Tested through dap-mode in Emacs.
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@risicle
Copy link
Contributor

risicle commented Sep 1, 2020

Hmm. Failed for me on both python 3.7 and 3.8, linux x86_64:

I+00000.281: sys.argv before parsing: ['/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy', '--connect', '127.0.0.1:40191', '--adapter-access-token', 'e3bb901d25dc48ecae2fd4b9278d0527630f52fc544fc605ef9ebf3c5ecbb4a5', '--pid', '14716']
                      after parsing:  ['/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy']

I+00000.281: Attaching to process with PID=14716

I+00000.281: Code to be injected: 
             import codecs;
             import json;
             import sys;
             decode = lambda s: codecs.utf_8_decode(bytearray(s))[0] if s is not None else None;
             script_dir = decode([47, 110, 105, 120, 47, 115, 116, 111, 114, 101, 47, 114, 112, 103, 107, 121, 103, 114, 98, 55, 103, 53, 104, 120, 57, 119, 50, 50, 108, 109, 51, 107, 105, 52, 53, 50, 51, 57, 55, 104, 122, 108, 106, 45, 112, 121, 116, 104, 111, 110, 51, 46, 55, 45, 100, 101, 98, 117, 103, 112, 121, 45, 49, 46, 48
, 46, 48, 114, 99, 49, 47, 108, 105, 98, 47, 112, 121, 116, 104, 111, 110, 51, 46, 55, 47, 115, 105, 116, 101, 45, 112, 97, 99, 107, 97, 103, 101, 115, 47, 100, 101, 98, 117, 103, 112, 121, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 115, 101, 114, 118, 101, 114]);
             setup = json.loads(decode([123, 34, 109, 111, 100, 101, 34, 58, 32, 34, 99, 111, 110, 110, 101, 99, 116, 34, 44, 32, 34, 97, 100, 100, 114, 101, 115, 115, 34, 58, 32, 91, 34, 49, 50, 55, 46, 48, 46, 48, 46, 49, 34, 44, 32, 52, 48, 49, 57, 49, 93, 44, 32, 34, 119, 97, 105, 116, 95, 102, 111, 114, 95, 99, 108, 105, 101
, 110, 116, 34, 58, 32, 102, 97, 108, 115, 101, 44, 32, 34, 108, 111, 103, 95, 116, 111, 34, 58, 32, 110, 117, 108, 108, 44, 32, 34, 97, 100, 97, 112, 116, 101, 114, 95, 97, 99, 99, 101, 115, 115, 95, 116, 111, 107, 101, 110, 34, 58, 32, 34, 101, 51, 98, 98, 57, 48, 49, 100, 50, 53, 100, 99, 52, 56, 101, 99, 97, 101, 50, 102, 100
, 52, 98, 57, 50, 55, 56, 100, 48, 53, 50, 55, 54, 51, 48, 102, 53, 50, 102, 99, 53, 52, 52, 102, 99, 54, 48, 53, 101, 102, 57, 101, 98, 102, 51, 99, 53, 101, 99, 98, 98, 52, 97, 53, 34, 125]));
             sys.path.insert(0, script_dir);
             import attach_pid_injected;
             del sys.path[0];
             attach_pid_injected.attach(setup);
             

I+00000.314: Injecting code into process with PID=14716 ...

E+00009.431: Code injection into PID=14716 failed:
             
             Traceback (most recent call last):
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/../debugpy/server/cli.py", line 395, in attach_to_pid
                 show_debug_info=int(os.getenv("DEBUGPY_ATTACH_BY_PID_DEBUG_INFO", "0")),
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py", line 334, in run_python_code_linux
                 print('stdout: %s' % (out,))
             BrokenPipeError: [Errno 32] Broken pipe
             
             Stack where logged:
               File "/nix/store/gxj5x8r403zkzdsai01m7hcgyl0q6vlg-python3-3.7.8/lib/python3.7/runpy.py", line 193, in _run_module_as_main
                 "__main__", mod_spec)
               File "/nix/store/gxj5x8r403zkzdsai01m7hcgyl0q6vlg-python3-3.7.8/lib/python3.7/runpy.py", line 85, in _run_code
                 exec(code, run_globals)
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/__main__.py", line 45, in <module>
                 cli.main()
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/../debugpy/server/cli.py", line 430, in main
                 run()
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/../debugpy/server/cli.py", line 398, in attach_to_pid
                 log.reraise_exception("Code injection into PID={0} failed:", pid)
               File "/nix/store/rpgkygrb7g5hx9w22lm3ki452397hzlj-python3.7-debugpy-1.0.0rc1/lib/python3.7/site-packages/debugpy/../debugpy/common/log.py", line 223, in reraise_exception
                 _exception(format_string, *args, **kwargs)
             


I+21.146: Not logging to "/build/source/tests/_logs/3.7-64/tests/debugpy/test_exception.py/test_systemexit[nan-zero-uncaught-raised-attach_pid-module]/tests-292.log" anymore.

=========================== short test summary info ============================
FAILED tests/debugpy/test_exception.py::test_systemexit[nan-zero-uncaught-raised-attach_pid-program]
FAILED tests/debugpy/test_exception.py::test_systemexit[0---raised-attach_pid-program]
FAILED tests/debugpy/test_exception.py::test_systemexit[nan-zero-uncaught-raised-attach_pid-module]

(testing the result merged with master.

@kira-bruneau
Copy link
Contributor Author

@risicle What commit of master were you using? I just pushed an update for rc2, but the commit for rc1 built on my machine for both Python 3.7 & 3.8. I also verified that the latest update also builds on both versions.

@kira-bruneau kira-bruneau changed the title debugpy: 1.0.0b12 -> 1.0.0rc1 debugpy: 1.0.0b12 -> 1.0.0rc2 Sep 14, 2020
@risicle
Copy link
Contributor

risicle commented Sep 15, 2020

nixpkgs-review now happy on my linux x86_64 machine.

@kira-bruneau
Copy link
Contributor Author

Replaced by #99213

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

Successfully merging this pull request may close these issues.

None yet

2 participants