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

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

Stack overflow with large single line text code blocks #827

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

Comments

@ad-si
Copy link

@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
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

This comment has been minimized.

Copy link
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

This comment has been minimized.

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

This comment has been minimized.

Copy link
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

This comment has been minimized.

Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.