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 with large single line text code blocks #827

Closed
ad-si opened this issue Oct 26, 2019 · 10 comments
Closed

Stack overflow with large single line text code blocks #827

ad-si opened this issue Oct 26, 2019 · 10 comments

Comments

@ad-si
Copy link
Contributor

@ad-si ad-si commented Oct 26, 2019

Bug Report

$ zola serve
Building site...
-> Creating 1799 pages (0 orphan), 0 sections, and processing 0 images

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
fish: 'zola serve' terminated by signal SIGABRT (Abort)

zola build yields the same error.

The sites contains a lot of markdown files with code in different languages.

File size distribution:

  1k:   1059
  2k:     53
  4k:     86
  8k:     69
 16k:     73
 32k:    157
 64k:    223
128k:     68
256k:     12

Environment

OS: macOS 10.15 19A602 x86_64
Host: Macmini8,1
Kernel: 19.0.0
CPU: Intel i7-8700B (12) @ 3.20GHz
GPU: Intel UHD Graphics 630
Memory: 14488MiB / 32768MiB
$ zola --version
zola 0.9.0
@Keats
Copy link
Collaborator

@Keats Keats commented Oct 26, 2019

Is the site open-source by any chance or can you make a reproduction? I can render 10k pages without issues in my benchmark site:

Building site...
-> Creating 10000 pages (0 orphan), 0 sections, and processing 0 images
Done in 5.2s.

@ad-si
Copy link
Contributor Author

@ad-si ad-si commented Oct 27, 2019

This file (as markdown file) caused it to crash:

arithmetic-geometric_mean_calculate_pi.txt

Can you reproduce it?

@ad-si
Copy link
Contributor Author

@ad-si ad-si commented Oct 27, 2019

The problem were the way too long printings of π …

@ad-si ad-si changed the title Stack overflow with many files Stack overflow large single line text code blocks Oct 27, 2019
@ad-si ad-si changed the title Stack overflow large single line text code blocks Stack overflow with large single line text code blocks Oct 27, 2019
@Keats
Copy link
Collaborator

@Keats Keats commented Oct 28, 2019

I can't reproduce it locally :/
An issue that might or might not be related is that you open <pre> to display the results but you close them with three bacticks, which actually opens a new code block. I'm guessing it might cause an issue in syntect, the library used for highlighting maybe?

@ad-si
Copy link
Contributor Author

@ad-si ad-si commented Nov 7, 2019

Might be, after fixing all tags it worked ...
Of the few thousand files i converted this was the only one causing problems, so I guess it's not to bad. Maybe someone can do some fuzzy testing to create a similar broken file. Otherwise feel free to close the issue ...

@ad-si
Copy link
Contributor Author

@ad-si ad-si commented Dec 3, 2019

@Keats Btw: https://github.com/ad-si/rosettagit is now public. Feel free to use it as a benchmark project. It's around 5000 files with lots of text and code.

@Keats
Copy link
Collaborator

@Keats Keats commented Feb 7, 2020

Closing as cannot reproduce.
https://rosettagit.org/ is really cool!

@Keats Keats closed this as completed Feb 7, 2020
@CSUwangj
Copy link

@CSUwangj CSUwangj commented Sep 19, 2020

seems met same problem, found zola hangs or thread 'main' has overflowed its stack when zola serve or zola build with large single line text, trying to get a minimum poc to prove this problem. BTW I'm on Windows

@Keats
Copy link
Collaborator

@Keats Keats commented Sep 20, 2020

Which version of zola? Do you have a repo I can use to reproduce it?

@CSUwangj
Copy link

@CSUwangj CSUwangj commented Sep 20, 2020

0.11, i'll open an issue when i got a minimum poc

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

3 participants