Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Crash in BuildQueue::build #306

Closed
jrmuizel opened this issue May 10, 2017 · 11 comments
Closed

Crash in BuildQueue::build #306

jrmuizel opened this issue May 10, 2017 · 11 comments

Comments

@jrmuizel
Copy link

I get the following crash in rls when running it with rls_vscode on webrender_traits:

* thread #2: tid = 0x262f75, 0x00007fff8b725b9d libsystem_platform.dylib`_platform_memmove$VARIANT$Unknown + 157, stop reason = EXC_BAD_ACCESS (code=1, address=0x801)
  * frame #0: 0x00007fff8b725b9d libsystem_platform.dylib`_platform_memmove$VARIANT$Unknown + 157
    frame #1: 0x000000010656a9b8 libstd-438eba4cd7d88a45.dylib`_$LT$collections..string..String$u20$as$u20$core..clone..Clone$GT$::clone::h5d3749e8702c4290 + 72
    frame #2: 0x0000000100461c16 rls`_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..clone..Clone$GT$::clone::h9269e0d96f9b13fc + 86
    frame #3: 0x00000001004c52df rls`rls::build::BuildQueue::build::hcc38af3c28a263b1 + 9535
    frame #4: 0x00000001004b6426 rls`rls::actions::ActionHandler::build::h632308cd975f741c + 3142
    frame #5: 0x00000001004d6ab9 rls`rls::server::LsService::handle_message::_$u7b$$u7b$closure$u7d$$u7d$::h070c039dee676ada + 27225
    frame #6: 0x0000000100419efe rls`std::panicking::try::do_call::h9dfd3df794188b9a + 46
    frame #7: 0x00000001065669cb libstd-438eba4cd7d88a45.dylib`__rust_maybe_catch_panic + 27
    frame #8: 0x00000001004553c7 rls`_$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hba1580c1e07344c7 + 167
    frame #9: 0x00000001065604d6 libstd-438eba4cd7d88a45.dylib`std::sys::imp::thread::Thread::new::thread_start::h5852519f9f48a1f2 + 134
    frame #10: 0x00007fff944b6899 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x00007fff944b672a libsystem_pthread.dylib`_pthread_start + 137
    frame #12: 0x00007fff944bafc9 libsystem_pthread.dylib`thread_start + 13
@jrmuizel
Copy link
Author

Perhaps more interesting I get:

running 10 tests
test build::test::test_dedup_flags ... ok
test test::test_parse_error_on_malformed_input ... ok
error: process didn't exit successfully: `/Users/jrmuizel/src/rls/target/debug/deps/rls-f3053e13c6cb9152` (signal: 11, SIGSEGV: invalid memory reference)

When running cargo test

@jrmuizel
Copy link
Author

Here's the stack:

* thread #12: tid = 0x2745b5, 0x00007fff8b725b9d libsystem_platform.dylib`_platform_memmove$VARIANT$Unknown + 157, stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
  * frame #0: 0x00007fff8b725b9d libsystem_platform.dylib`_platform_memmove$VARIANT$Unknown + 157
    frame #1: 0x0000000108e319b8 libstd-438eba4cd7d88a45.dylib`_$LT$collections..string..String$u20$as$u20$core..clone..Clone$GT$::clone::h5d3749e8702c4290 + 72
    frame #2: 0x000000010020165b rls-f3053e13c6cb9152`rls_data::{{impl}}::clone(self=0x000000010f822020) + 139 at lib.rs:81
    frame #3: 0x000000010021c118 rls-f3053e13c6cb9152`core::option::{{impl}}::clone<rls_data::CratePreludeData>(self=0x000000010f822020) + 120 at option.rs:165
    frame #4: 0x00000001001d5792 rls-f3053e13c6cb9152`rls_data::{{impl}}::clone(self=0x000000010f822020) + 226 at lib.rs:37
    frame #5: 0x000000010021c003 rls-f3053e13c6cb9152`core::option::{{impl}}::clone<rls_data::Analysis>(self=0x000000010f822020) + 131 at option.rs:165
    frame #6: 0x00000001002eab05 rls-f3053e13c6cb9152`rls::build::{{impl}}::rustc(self=0x000000010b00c1d0, args=&[collections::string::String] at 0x000000010d5ff9c0, envs=0x000000010b0180c0, build_dir=0x000000010ec14030) + 2277 at build.rs:503
    frame #7: 0x00000001002e62ac rls-f3053e13c6cb9152`rls::build::{{impl}}::build(self=0x000000010b00c1d0) + 972 at build.rs:263
    frame #8: 0x00000001002e553c rls-f3053e13c6cb9152`rls::build::{{impl}}::request_build(self=0x000000010b00c1d0, build_dir=0x000000010b0150c0, priority=Immediate) + 2124 at build.rs:197
    frame #9: 0x00000001002db39e rls-f3053e13c6cb9152`rls::actions::{{impl}}::build(self=0x000000010b02f030, project_path=0x000000010b0150c0, priority=Immediate, out=&Output at 0x000000010d600e48) + 814 at mod.rs:122
    frame #10: 0x00000001002dafac rls-f3053e13c6cb9152`rls::actions::{{impl}}::init(self=0x000000010b02f030, root_path=PathBuf at 0x000000010d601850, out=&Output at 0x000000010d601868) + 540 at mod.rs:70
    frame #11: 0x00000001002efbfc rls-f3053e13c6cb9152`rls::server::{{impl}}::init(self=0x000000010b02f010, id=0, init=InitializeParams at 0x000000010d6019d8) + 1804 at server.rs:259
    frame #12: 0x00000001002f1054 rls-f3053e13c6cb9152`rls::server::{{impl}}::handle_message::{{closure}} + 4100 at server.rs:357
    frame #13: 0x00000001002c304b rls-f3053e13c6cb9152`std::panic::{{impl}}::call_once<(self=AssertUnwindSafe<closure> at 0x000000010d604fd8, _args=<unavailable>),closure> + 171 at panic.rs:296
    frame #14: 0x00000001000e396a rls-f3053e13c6cb9152`std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,(data=0x000000010d605ed8)> + 298 at panicking.rs:454
    frame #15: 0x0000000108e2d9cb libstd-438eba4cd7d88a45.dylib`__rust_maybe_catch_panic + 27
    frame #16: 0x00000001000e2fad rls-f3053e13c6cb9152`std::panicking::try<(f=AssertUnwindSafe<closure> at 0x000000010d605bb8),std::panic::AssertUnwindSafe<closure>> + 317 at panicking.rs:433
    frame #17: 0x00000001000d8d86 rls-f3053e13c6cb9152`std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,(f=AssertUnwindSafe<closure> at 0x000000010d606278)> + 182 at panic.rs:361
    frame #18: 0x00000001000df751 rls-f3053e13c6cb9152`std::thread::{{impl}}::spawn::{{closure}}<closure,()> + 369 at mod.rs:368
    frame #19: 0x00000001001c3e24 rls-f3053e13c6cb9152`alloc::boxed::{{impl}}::call_box<(self=0x000000010b0281c0, args=<unavailable>),closure> + 84 at boxed.rs:648
    frame #20: 0x0000000108e274d6 libstd-438eba4cd7d88a45.dylib`std::sys::imp::thread::Thread::new::thread_start::h5852519f9f48a1f2 + 134

@tetsuharuohzeki
Copy link
Contributor

I feel this crash is caused by rust-lang/rust#41833.

@tetsuharuohzeki
Copy link
Contributor

At this time, the version of rls-data is different between rls and save-analysis.

I feel it would not crash after we merged #300

@jrmuizel
Copy link
Author

That sounds reasonable given what I saw in a debugger when trying to look at this.

@nrc
Copy link
Member

nrc commented May 10, 2017

#300 has landed, this should be fixed now.

@tetsuharuohzeki
Copy link
Contributor

@nrc

Should rls installed via rustup be also fixed in the next nightly?

@nrc
Copy link
Member

nrc commented May 10, 2017

it will need a submodule update, I'll do that now

@tetsuharuohzeki
Copy link
Contributor

it will need a submodule update, I'll do that now

Thank you.

@nrc
Copy link
Member

nrc commented May 10, 2017

rust-lang/rust#41900

Thanks for the reminder!

@nrc
Copy link
Member

nrc commented Oct 30, 2017

Assuming this is fixed

@nrc nrc closed this as completed Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants