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

hang in actix-http-0.1.5 ? #1684

Closed
matthiaskrgr opened this issue Aug 13, 2019 · 8 comments
Closed

hang in actix-http-0.1.5 ? #1684

matthiaskrgr opened this issue Aug 13, 2019 · 8 comments

Comments

@matthiaskrgr
Copy link

@matthiaskrgr matthiaskrgr commented Aug 13, 2019

crate: actix-http-0.1.5
running ra_cli analysis-stats . on the crate seems to hang at some point (only ram usage increased, no progress for several minutes).

Crates in this dir: 7
Total modules found: 142
Total declarations: 4256
Total functions: 1160
Item Collection: 15.979273852s, 0b allocated 0b resident
█████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 645/1160
processing: new ("src/ws/transport.rs" [569; 744))
@matklad

This comment has been minimized.

Copy link
Member

@matklad matklad commented Aug 13, 2019

Might be a good idea to get a stack trace there to understand what ra is doing. using something like

gdb -p PID
> thread apply all backtrace
@matthiaskrgr

This comment has been minimized.

Copy link
Author

@matthiaskrgr matthiaskrgr commented Aug 13, 2019

Attaching to process 30740
Reading symbols from /home/matthias/vcs/github/rust-analyzer/target/release/ra_cli...
Reading symbols from /usr/lib/libc.so.6...
(No debugging symbols found in /usr/lib/libc.so.6)
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
Reading symbols from /usr/lib/libdl.so.2...
(No debugging symbols found in /usr/lib/libdl.so.2)
Reading symbols from /usr/lib/libpthread.so.0...
(No debugging symbols found in /usr/lib/libpthread.so.0)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libgcc_s.so.1...
0x000055cedb6f7a4c in <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (iterator=...) at /rustc/60960a260f7b5c695fd0717311d72ce62dd4eb43/src/liballoc/vec.rs:1945
1945	/rustc/60960a260f7b5c695fd0717311d72ce62dd4eb43/src/liballoc/vec.rs: No such file or directory.
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/matthias/vcs/github/rust-analyzer/target/release/ra_cli.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7f0f6b91cf00 (LWP 30740)):
warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb7111c0 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

#0  0x000055cedb6f7a4c in <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (iterator=...) at /rustc/60960a260f7b5c695fd0717311d72ce62dd4eb43/src/liballoc/vec.rs:1945
warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

#1  0x000055cedb71120b in <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter (iter=...) at /rustc/60960a260f7b5c695fd0717311d72ce62dd4eb43/src/liballoc/vec.rs:1831
warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

#2  core::iter::traits::iterator::Iterator::collect (self=...) at /rustc/60960a260f7b5c695fd0717311d72ce62dd4eb43/src/libcore/iter/traits/iterator.rs:1464
warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

#3  chalk_solve::infer::instantiate::<impl chalk_solve::infer::InferenceTable>::fresh_subst (warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

self=<optimized out>, binders=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/infer/instantiate.rs:14
warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

#4  chalk_solve::infer::instantiate::<impl chalk_solve::infer::InferenceTable>::instantiate_canonical (warning: (Internal error: pc 0x55cedb71120a in read in psymtab, but not in symtab.)

self=<optimized out>, bound=0x7fff35900740) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/infer/instantiate.rs:29
#5  0x000055cedb6e1a07 in chalk_solve::solve::slg::resolvent::<impl chalk_engine::context::ResolventOps<chalk_solve::solve::slg::SlgContext,chalk_solve::solve::slg::SlgContext> for chalk_solve::solve::slg::TruncatingInferenceTable>::apply_answer_subst (self=<optimized out>, ex_clause=..., selected_goal=0x7fff35900440, answer_table_goal=<optimized out>, canonical_answer_subst=0x8) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/solve/slg/resolvent.rs:231
#6  0x000055cedb6b109a in chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::pursue_positive_subgoal (self=0x55cf025b7cd8, context=0x7fff35901698, depth=..., selected_subgoal=0x7fff35900500, strand=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:1144
#7  chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::pursue_strand (self=0x55cf025b7cd8, context=0x7fff35901698, depth=..., strand=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:566
#8  0x000055cedb6d0919 in <chalk_engine::logic::PursueStrand<C,CO> as chalk_engine::logic::WithInstantiatedStrand<C>>::with (self=..., strand=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:1459
#9  <chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::with_instantiated_strand::With<C,OP> as chalk_engine::context::WithInstantiatedExClause<C>>::with (self=..., infer=..., ex_clause=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:332
#10 0x000055cedb6e263b in <chalk_solve::solve::slg::SlgContextOps as chalk_engine::context::ContextOps<chalk_solve::solve::slg::SlgContext>>::instantiate_ex_clause (self=0x7fff35901698, num_universes=<optimized out>, canonical_ex_clause=<optimized out>, op=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/solve/slg.rs:163
#11 0x000055cedb6b5d34 in chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::with_instantiated_strand (context=0x7fff35901698, num_universes=1, canonical_strand=0x7fff35900fc0, op=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:310
#12 chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::pursue_next_strand (self=0x55cf025b7cd8, context=<optimized out>, depth=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:237
#13 chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::ensure_answer_recursively (self=0x55cf025b7cd8, context=0x7fff35901698, table=..., answer=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:203
#14 0x000055cedb6aef2e in chalk_engine::logic::<impl chalk_engine::forest::Forest<C>>::ensure_root_answer (self=0x55cf025b7cd8, context=0x7fff35901698, table=..., answer=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/logic.rs:108
#15 <chalk_engine::forest::ForestSolver<C,CO> as chalk_engine::context::AnswerStream<C>>::peek_answer (self=0x7fff359014f0) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/forest.rs:160
#16 0x000055cedb6dffea in chalk_solve::solve::slg::aggregate::<impl chalk_engine::context::AggregateOps<chalk_solve::solve::slg::SlgContext> for chalk_solve::solve::slg::SlgContextOps>::make_solution (self=<optimized out>, root_goal=0x7fff359018e0, simplified_answers=...) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/solve/slg/aggregate.rs:23
#17 0x000055cedb6ba3fe in chalk_engine::forest::Forest<C>::solve (self=0x55cf025b7cd8, context=0x7fff35901698, goal=0x7fff359018e0) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-engine/src/forest.rs:99
#18 0x000055cedb6aedb7 in chalk_solve::solve::Solver::solve (self=0x7fff358ffce0, program=..., goal=0x7fff358ffd38) at /home/matthias/.cargo/git/checkouts/chalk-7b02fa8caa2cec94/201775c/chalk-solve/src/solve.rs:128
#19 0x000055cedb13524a in ra_hir::ty::traits::solve (db=0x7fff359047c0, krate=..., goal=0x7fff359001c0) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/traits.rs:64
#20 ra_hir::ty::traits::trait_solve_query (db=0x7fff359047c0, krate=..., goal=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/traits.rs:130
#21 0x000055cedb0d6e57 in <ra_hir::db::TraitSolveQuery as salsa::plumbing::QueryFunction<DB>>::execute (db=0x7fff359047c0) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/db.rs:216
#22 salsa::derived::DerivedStorage<DB,Q,MP>::read_upgrade::{{closure}} () at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:451
#23 salsa::runtime::Runtime<DB>::execute_query_implementation (self=<optimized out>, db=<optimized out>, database_key=<optimized out>, execute=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/runtime.rs:319
#24 0x000055cedafca10e in salsa::derived::DerivedStorage<DB,Q,MP>::read_upgrade (self=<optimized out>, db=0x8, key=<optimized out>, database_key=0x7fff358ffd38, revision_now=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:444
#25 salsa::derived::DerivedStorage<DB,Q,MP>::read (self=<optimized out>, db=<optimized out>, key=<optimized out>, database_key=<optimized out>) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:364
#26 <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch (self=<optimized out>, db=<optimized out>, key=<optimized out>, database_key=<optimized out>) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:780
#27 0x000055cedb0ea2a0 in salsa::QueryTable<DB,Q>::get (warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf76650 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

self=0x0, key=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/lib.rs:461
warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

#28 0x000055cedaf77016 in <T as ra_hir::db::HirDatabase>::trait_solve (warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

self=<optimized out>, key0=..., key1=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/db.rs:149
warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

#29 ra_hir::ty::infer::InferenceContext<D>::resolve_obligations_as_possible (warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

self=0x7fff35903b60) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:336
warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)

#30 ra_hir::ty::infer::InferenceContext<D>::resolve_ty_as_possible (warning: (Internal error: pc 0x55cedaf77015 in read in psymtab, but not in symtab.)
--Type <RET> for more, q to quit, c to continue without paging--

warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6c800 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

self=0x7fff35903b60, warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

tv_stack=<optimized out>, ty=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:362
warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

#31 0x000055cedaf7068c in ra_hir::ty::infer::InferenceContext<D>::infer_expr (warning: (Internal error: pc 0x55cedaf7068b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6c800 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

self=0x7fff358ffce0, warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

tgt_expr=..., warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

expected=<optimized out>) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:1345
warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

#32 0x000055cedaf6fb9a in ra_hir::ty::infer::InferenceContext<D>::infer_expr (warning: (Internal error: pc 0x55cedaf6fb99 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6c800 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

self=0x7fff35903b60, warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

tgt_expr=..., warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

expected=0x7fff35903040) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:1057
warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

#33 0x000055cedaf6dc5f in ra_hir::ty::infer::InferenceContext<D>::infer_expr (warning: (Internal error: pc 0x55cedaf6dc5e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6c800 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

self=0x7fff35903b60, warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

tgt_expr=..., warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

expected=0x7fff35903a60) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:1127
warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

#34 0x000055cedaf6e3fc in ra_hir::ty::infer::InferenceContext<D>::infer_block (warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

self=0x7fff35903b60, statements=..., tail=..., expected=0x7fff35903a60) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:1376
warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

#35 ra_hir::ty::infer::InferenceContext<D>::infer_expr (warning: (Internal error: pc 0x55cedaf6e3fb in read in psymtab, but not in symtab.)

self=0x7fff35903b60, tgt_expr=..., expected=0x7fff35903a60) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:987
#36 0x000055cedaf6befc in ra_hir::ty::infer::InferenceContext<D>::infer_body (self=0x7fff35903b60) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:1395
#37 ra_hir::ty::infer::infer_query (db=<optimized out>, def=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/ty/infer.rs:72
#38 0x000055cedb0d441e in <ra_hir::db::InferQuery as salsa::plumbing::QueryFunction<DB>>::execute (db=0x7fff358ffcc8, key0=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/db.rs:154
#39 salsa::derived::DerivedStorage<DB,Q,MP>::read_upgrade::{{closure}} () at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:451
#40 salsa::runtime::Runtime<DB>::execute_query_implementation (self=<optimized out>, db=<optimized out>, database_key=<optimized out>, execute=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/runtime.rs:319
#41 0x000055cedaf80963 in salsa::derived::DerivedStorage<DB,Q,MP>::read_upgrade (self=<optimized out>, db=0x8, key=<optimized out>, database_key=0x7fff358ffd38, revision_now=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:444
#42 salsa::derived::DerivedStorage<DB,Q,MP>::read (self=<optimized out>, db=<optimized out>, key=<optimized out>, database_key=<optimized out>) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:364
#43 <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch (self=<optimized out>, db=<optimized out>, key=<optimized out>, database_key=0x7fff359043b8) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/derived.rs:780
#44 0x000055cedb0e4ca1 in salsa::QueryTable<DB,Q>::get (self=0x7fff359044f0, key=...) at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.12.3/src/lib.rs:461
#45 0x000055cedb16a6c5 in <T as ra_hir::db::HirDatabase>::infer (self=0x7fff358ffd38, key0=...) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/db.rs:149
#46 ra_hir::code_model::Function::infer (self=..., db=<optimized out>) at /home/matthias/vcs/github/rust-analyzer/crates/ra_hir/src/code_model.rs:637
--Type <RET> for more, q to quit, c to continue without paging--
#47 ra_cli::analysis_stats::run (verbose=<optimized out>, memory_usage=<optimized out>, path=<optimized out>, only=...) at crates/ra_cli/src/analysis_stats.rs:86
#48 0x000055cedb0e21e5 in ra_cli::main () at crates/ra_cli/src/main.rs:78
@flodiebold

This comment has been minimized.

Copy link
Member

@flodiebold flodiebold commented Aug 14, 2019

So as I would have guessed, it's in Chalk. This is not really surprising, since the potential of exponential blowups in trait solving still exists, it was just reduced by floundering... It may be interesting to run the analysis for that function with RUST_LOG=ra_hir::ty::traits=debug CHALK_DEBUG=1 to see where it's actually taking so long, though it will probably produce a huge amount of logs.

@matthiaskrgr

This comment has been minimized.

Copy link
Author

@matthiaskrgr matthiaskrgr commented Aug 15, 2019

Mh, I'm quickly getting several hundred megabytes worth of log data ....

There's a lot of

: : : | creating new table TableIndex(88569) and goal UCanonical {
: : : : : | creating new table TableIndex(88570) and goal UCanonical {
: : : | creating new table TableIndex(88571) and goal UCanonical {
: : : : : | creating new table TableIndex(88572) and goal UCanonical {
: : : | creating new table TableIndex(88573) and goal UCanonical {
: : : : : | creating new table TableIndex(88574) and goal UCanonical {
: : : | creating new table TableIndex(88575) and goal UCanonical {
: : : : : | creating new table TableIndex(88576) and goal UCanonical {
: : : | creating new table TableIndex(88577) and goal UCanonical {
: : : : : | creating new table TableIndex(88578) and goal UCanonical {

but I'm not sure if that's it.

@flodiebold

This comment has been minimized.

Copy link
Member

@flodiebold flodiebold commented Aug 15, 2019

I hope it's printing more than that -- this basically just means Chalk is doing what it does, the interesting part would be what goal it is trying to solve, and with which intermediate goals. The easiest part to find that is to go to the end, then search backwards for the last log from ra_hir, which will probably be that it's solving some trait goal, and then go down from there to see the subgoals Chalk chooses.

@matthiaskrgr

This comment has been minimized.

Copy link
Author

@matthiaskrgr matthiaskrgr commented Aug 15, 2019

DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(96)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 59 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls
DEBUG [ra_hir::ty::traits::chalk] split_projection (TypeId(14928))<^0> = <?0 as Encoder>::Error
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait TraitId(195)
DEBUG [ra_hir::ty::traits::chalk] impls_for_trait returned 14 impls

does this help?

@kiljacken

This comment has been minimized.

Copy link
Contributor

@kiljacken kiljacken commented Aug 30, 2019

I've bisected the issue to commit 6265497 in case that helps with resolving the issue.

@matklad

This comment has been minimized.

Copy link
Member

@matklad matklad commented Sep 9, 2019

will be closed by #1800

@matklad matklad closed this Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.