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

Inifinite loop(?) in core::resolver #2170

Closed
SimonSapin opened this issue Nov 26, 2015 · 1 comment
Closed

Inifinite loop(?) in core::resolver #2170

SimonSapin opened this issue Nov 26, 2015 · 1 comment

Comments

@SimonSapin
Copy link
Contributor

When building https://github.com/ecoal95/rust-offscreen-rendering-context, Cargo seems to get in an infinite loop after printing "Updating git repository https://github.com/servo/libfontconfig"

Note: it is possible that my $CARGO_HOME is in a broken state which triggers the issue, and that you might not reproduce it easily.

Sample output from strace:

madvise(0x7f4efa643000, 376832, MADV_DONTNEED) = 0
madvise(0x7f4efa4b2000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa520000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa166000, 684032, MADV_DONTNEED) = 0
madvise(0x7f4efa643000, 376832, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa103000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa619000, 28672, MADV_DONTNEED) = 0
madvise(0x7f4efa166000, 684032, MADV_DONTNEED) = 0
madvise(0x7f4efa69a000, 20480, MADV_DONTNEED) = 0
madvise(0x7f4efa643000, 352256, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa166000, 684032, MADV_DONTNEED) = 0
madvise(0x7f4efa510000, 32768, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa103000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa166000, 684032, MADV_DONTNEED) = 0
madvise(0x7f4efa619000, 28672, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa721000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa166000, 61440, MADV_DONTNEED) = 0
madvise(0x7f4efa176000, 618496, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa176000, 618496, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa176000, 618496, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
getrandom(" \256\225Y\344\375\25c\2121r\320\331^\31\250R$\367\364|A\f(l\356{\0t1\257\357"..., 2048, 0) = 2048
madvise(0x7f4efa212000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa61a000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa18c000, 528384, MADV_DONTNEED) = 0
madvise(0x7f4efa176000, 86016, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 360448, MADV_DONTNEED) = 0
madvise(0x7f4efa630000, 4096, MADV_DONTNEED) = 0
madvise(0x7f4efa72a000, 28672, MADV_DONTNEED) = 0
madvise(0x7f4efa18c000, 503808, MADV_DONTNEED) = 0
madvise(0x7f4efa643000, 376832, MADV_DONTNEED) = 0
madvise(0x7f4efa18c000, 503808, MADV_DONTNEED) = 0
madvise(0x7f4efa6c4000, 385024, MADV_DONTNEED) = 0
madvise(0x7f4efa643000, 376832, MADV_DONTNEED) = 0

Sample stack from gdb:

#0  0x0000559fcb0565d6 in collections::hash::set::_$LT$impl$GT$::clone::clone::h16694492552681060282 ()
#1  0x0000559fcb055bec in core::resolver::_$LT$impl$GT$::clone::h0ae172b591c18f5b3Ze ()
#2  0x0000559fcb05b3c4 in core::resolver::_$LT$impl$GT$::clone::h09850ffffecf5d85X9e ()
#3  0x0000559fcb05d72d in core::resolver::activate_deps_loop::h36a601ba1ee5248cPif ()
#4  0x0000559fcb05c0ca in core::resolver::resolve::h056102269dfa3413xaf ()
#5  0x0000559fcb094e2a in ops::resolve::resolve_with_previous::h5e01604dc4e96231l4p ()
#6  0x0000559fcb0938c8 in ops::resolve::resolve_pkg::h0b5095fee43d8d02V2p ()
#7  0x0000559fcb092907 in ops::cargo_compile::resolve_dependencies::hbc91c43ac45df08csEh ()
#8  0x0000559fcb08dc8a in ops::cargo_compile::compile_pkg::h2e9bdb08763ca8e6uHh ()
#9  0x0000559fcb08c7c2 in ops::cargo_compile::compile::hb0f62d5be04d643eoBh ()
#10 0x0000559fcb1847be in ops::cargo_test::compile_tests::h88f6d000da6b812fr3o ()
#11 0x0000559fcb1808aa in ops::cargo_test::run_tests::h2152735aee659366sZo ()
#12 0x0000559fcb0029bd in call_main_without_stdin::call_main_without_stdin::h9555677425742150942 ()
#13 0x0000559fcaf9b26a in execute::hf7cebfaab2e8ad5b5ca ()
#14 0x0000559fcaf93777 in call_main_without_stdin::call_main_without_stdin::h8017624274300204301 ()
#15 0x0000559fcaf909d3 in main::h3d3ac0797c5e9e66Tca ()
#16 0x0000559fcb556bd5 in sys_common::unwind::try::try_fn::h8623127493126415308 ()
#17 0x0000559fcb5513b9 in __rust_try ()
#18 0x0000559fcb556870 in rt::lang_start::h426b3aba4736785fsbx ()
#19 0x00007f4f021d7610 in __libc_start_main () from /usr/lib/libc.so.6
#20 0x0000559fcaf902c5 in _start ()
@alexcrichton
Copy link
Member

This is unlikely to be an infinite loop but rather just a pathological case in resolve. Sometimes if constraints are too strict the resolver will spend basically all day backtracking.

I think this is a dupe of #2090 so I'm going to close this in favor of that.

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

No branches or pull requests

2 participants