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

Stack overflow in s-structured-log-0.2.0, Rust 1.16 #38973

Closed
brson opened this issue Jan 10, 2017 · 10 comments
Closed

Stack overflow in s-structured-log-0.2.0, Rust 1.16 #38973

brson opened this issue Jan 10, 2017 · 10 comments
Assignees
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 10, 2017

http://github.com/siphilia/s-structured-log-rs a54b1a7d69261a952fcf8e597d751c5973986ceb

Not on stable/beta.

brian@ip-10-145-43-250:~⟫ rustc +nightly -Vv
rustc 1.16.0-nightly (47c8d9fdc 2017-01-08)
binary: rustc
commit-hash: 47c8d9fdcf2e6502cf4ca7d7f059fdc1a2810afa
commit-date: 2017-01-08
host: x86_64-unknown-linux-gnu
release: 1.16.0-nightly
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/s-structured-log-rs⟫ cargo +nightly test
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling itoa v0.1.1
   Compiling num-traits v0.1.36
   Compiling log v0.3.6
   Compiling serde v0.8.21
   Compiling dtoa v0.2.2
   Compiling serde_json v0.8.4
   Compiling s-structured-log v0.2.0 (file:///mnt2/dev/s-structured-log-rs)
    Finished debug [unoptimized + debuginfo] target(s) in 15.91 secs
     Running target/debug/deps/s_structured_log-e4fd371411732634

running 5 tests
test tests::json_format ... ok
test tests::no_escape_chars ... ok
test tests::only_escape_chars ... ok
test tests::random_escape_chars ... ok
test tests::simple_logger ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests s-structured-log

running 6 tests

thread '_1' has overflowed its stack
fatal runtime error: stack overflow
error: test failed

cc @siphilia

@brson brson added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 10, 2017
@brson
Copy link
Contributor Author

brson commented Jan 12, 2017

Need to try to extract a test case from the docs.

@brson
Copy link
Contributor Author

brson commented Jan 12, 2017

Stack trace. Stack overflow is in rustc.

@alexcrichton
Copy link
Member

The overflow happens on this example and doesn't reproduce in rustc alone, may have to do something with how rustdoc calls the compiler.

@nikomatsakis
Copy link
Contributor

Seems like rustdoc doesn't use the monitor that allocates a big ol' stack. Some stack size fluctuation does occur from time to time, could be that.

@nikomatsakis
Copy link
Contributor

triage: P-high

@rust-highfive rust-highfive added the P-high High priority label Jan 12, 2017
@nikomatsakis
Copy link
Contributor

Hmm, I can't reproduce the problem, but I can produce a PR to at least get rustdoc to run compiler the same way it runs everything else when doing tests.

@nikomatsakis
Copy link
Contributor

Hmm, so, I had thought to just run this code in driver::monitor, but that actually swallows panics and invokes exit(), and this code is running in the test harness, so that's not a particularly good idea.

@brson
Copy link
Contributor Author

brson commented Jan 17, 2017

I am testing @nikomatsakis's patch. FWIW I cannot repro on the 01-13 nightly, only the one listed in the op.

@brson
Copy link
Contributor Author

brson commented Jan 18, 2017

With @nikomatsakis's patch on top of the commit in the op the bug does not reproduce.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 20, 2017
run rustdoc tests in the same sort of thread rustc runs in

Not sure yet if this is the problem in rust-lang#38973 but seems like an improvement regardless.

r? @brson
@nikomatsakis
Copy link
Contributor

Given that #39142 landed I'm going to call this closed. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants