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

rust-lldb (completely) broken on nightly (daf8c1dfc 2016-12-05)) #38347

Closed
sanmai-NL opened this issue Dec 13, 2016 · 15 comments
Closed

rust-lldb (completely) broken on nightly (daf8c1dfc 2016-12-05)) #38347

sanmai-NL opened this issue Dec 13, 2016 · 15 comments
Assignees
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.

Comments

@sanmai-NL
Copy link

sanmai-NL commented Dec 13, 2016

The command cannot be invoked without encountering an error. Update: rust-gdb works okay, correction.

rust-lldb
error: infinite recursion detected

exits with status 1.

This happens with or without lldb available via the PATH env var (tested with lldb uninstalled as well as installed). lldb starts normally.

Meta

rustup show
Default host: x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

asmjs-unknown-emscripten
wasm32-unknown-emscripten
x86_64-apple-darwin
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
rustc --version --verbose
rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
binary: rustc
commit-hash: daf8c1dfce3b448fc581cc319f64632ec22bd0e1
commit-date: 2016-12-05
host: x86_64-unknown-linux-gnu
release: 1.15.0-nightly
LLVM version: 3.9
@sanmai-NL sanmai-NL changed the title rust-lldb and rust-gdb (completely) broken on nightly (daf8c1dfc 2016-12-05)) rust-lldb (completely) broken on nightly (daf8c1dfc 2016-12-05)) Dec 13, 2016
@michaelwoerister
Copy link
Member

Interesting. I'll try to reproduce that.

@sanxiyn sanxiyn added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Dec 13, 2016
@michaelwoerister
Copy link
Member

I cannot reproduce that. I did, however, notice that the lldb_rust_formatters.py seems to be missing on Linux. Has rust-lldb ever worked for you on Linux? If so, did you get any error messages during startup?

@sanmai-NL
Copy link
Author

I only tried rust-lldb today.

I found these copies (preceded by SHA256 hash values):

ea57ea882914af06edfaee01b321261de744a04abae7b72ea5f2b2a74413c7f2  ~/devel/github.com/rust-lang/rust/src/etc/lldb_rust_formatters.py
450212f8c8c1ecf4c75bd9b93b674be1bc6eaa86c060d642fb32b1c3bc623fb4  ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/etc/lldb_rust_formatters.py

@michaelwoerister
Copy link
Member

@brson: I do get an error when invoking the rust-lldb provided by rustup:

rust-lldb --help
error: command failed: 'rust-lldb'
info: caused by: No such file or directory (os error 2)

~/.cargo/bin/rust-lldb --help
error: command failed: '/home/mw/.cargo/bin/rust-lldb'
info: caused by: No such file or directory (os error 2)

I also cannot find the actual rust-lldb script anywhere in the installation. How does rustup's rust-lldb invoke the actual rust-lldb?

@michaelwoerister
Copy link
Member

OK, after updating rustup I can reproduce this as well. @brson, is it possible that rustup causes this error when it tries to invoke rust-lldb?

@Emilgardis
Copy link
Contributor

The lldb_rust_formatters.py script is not found, it should live in rustlib/etc, currently it lives in rustlib/src/rust/src/etc. I believe there is an open issue for it on rustup. This recursion issue is most likely something mac specific, as I've gotten rust-lldb to work on linux by softlinking the py script.

@Emilgardis
Copy link
Contributor

#38380 could be related.

@jcbritobr
Copy link

jcbritobr commented Dec 23, 2016

It also happens in release 1.14 with rust-gdb. :(

@brson brson added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Dec 30, 2016
@brson
Copy link
Contributor

brson commented Dec 30, 2016

@michaelwoerister Yes, this is rustup messing up somehow.

@brson
Copy link
Contributor

brson commented Jan 12, 2017

Still on my plate for 1.15.

@brson
Copy link
Contributor

brson commented Jan 25, 2017

There are a few interrelated things in this thread. As far as I can tell, the underlying issue in the op is actually that Rust 1.14 (stable) does not package rust-lldb on Linux. Rust 1.15 does, and that particular issue is fixed in beta, which will be released on Feb 2.

The error message about infinite recursion is a bug in rustup where it is not detecting that the toolchain doesn't contain rust-lldb, which looks to me will be fixed by rust-lang/rustup#917.

I cannot explain @jcbritobr's observation with rust-gdb, though I'm hoping they are using windows-msvc, where we (I believe) do not distribute the script.

I have not investigated @Emilgardis's issue with lldb_rust_formatters.py.

@brson
Copy link
Contributor

brson commented Jan 25, 2017

It is installed for beta and nightly to rustlib/etc/lldb_rust_formatters.py

@brson
Copy link
Contributor

brson commented Jan 25, 2017

Does anybody still see incorrect behavior with rust-lldb on beta on Linux?

@Emilgardis
Copy link
Contributor

Pretty sure that it works correctly now. It is imported from the correct place.

@brson brson closed this as completed Jan 26, 2017
@nixpulvis
Copy link

@Emilgardis @brson update on Linux I believe I'm still seeing the issue with lldb_rust_formatters.py. On both nightly and beta I get the following message (example from nightly):

(lldb) command script import "/home/nixpulvis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/usr/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
error: module importing failed: name '__swig_getmethods__' is not defined
  File "temp.py", line 1, in <module>
  File "/home/nixpulvis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py", line 1, in <module>
    import lldb
  File "/usr/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/usr/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule

If I'm just missing a dependency I'm sorry for the noise, otherwise should I open a new issue in rustup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Projects
None yet
Development

No branches or pull requests

7 participants