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

thread 'main' has overflowed its stack when deal with long line text #1176

Closed
CSUwangj opened this issue Sep 20, 2020 · 8 comments
Closed

thread 'main' has overflowed its stack when deal with long line text #1176

CSUwangj opened this issue Sep 20, 2020 · 8 comments
Labels
bug done in pr Already done in a PR

Comments

@CSUwangj
Copy link

Bug Report

Environment

Zola version: 0.11.0 on Windows 10

Expected Behavior

build/serve success

Current Behavior

Building site...
-> Creating 1 pages (0 orphan), 0 sections, and processing 0 images

thread 'main' has overflowed its stack

Step to reproduce

zola init test

then download https://gist.githubusercontent.com/CSUwangj/8ba2d160fcc080a9117761aa629d949c/raw/c38452fb393d89ea0d48af11ba7ca5930150cb39/test.md into content/test.md

then go to zola root and zola serve or zola build

@CSUwangj
Copy link
Author

there is a very long line at rust code, I think it makes situation similar to #827

@Keats
Copy link
Collaborator

Keats commented Sep 21, 2020

It builds fine my macbook :/ Can you try on 0.12?
Any chance you can dig into it? At least to know where the stack overflow is happening?

@Keats Keats added the bug label Sep 21, 2020
@CSUwangj
Copy link
Author

absolutely yes, i'll try to find which thing cause stack overflow later

@Keats
Copy link
Collaborator

Keats commented Sep 21, 2020

Thanks!

@CSUwangj
Copy link
Author

CSUwangj commented Sep 21, 2020

sorry for missing steps for reproducing, just change config.toml to build_search_index = true then you should trigger this problem.

and I believe errors occur at components/search/src/lib.rs:L99, where index is too deep to serialize. If you add a statement said println!("{:?}", index); before this line, you can get the log below:

Snipaste_2020-09-21_17-19-12

now we could believe that there is too much depth in children to deal with.

I have no idea how to fix it in a short time, I think there might be some problems in the algorithm of building the search index?

@CSUwangj
Copy link
Author

BTW there is same issue on 0.12

@Keats
Copy link
Collaborator

Keats commented Sep 21, 2020

Oh that's interesting, I would have never guessed it came from there. Should we remove the tags from the search index?

@CSUwangj
Copy link
Author

because I still not configure search in my blog, so I have no idea if we should remove the tags from the search index.

but I think that would be nice if put a FAQ or something similar to warn users.

@Keats Keats mentioned this issue Sep 21, 2020
6 tasks
Keats added a commit that referenced this issue Jan 17, 2023
@Keats Keats added the done in pr Already done in a PR label Jan 20, 2023
@Keats Keats closed this as completed in 0c5ffa8 Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

2 participants