-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
panic: invalid paginator state for "Example.com" #5885
Comments
Is the source code available somewhere? Also, have you tested this with Hugo 0.55.2? |
I just tested 0.55.2 and it has the same problem. The sourcecode is not public. However I made the theme public: https://github.com/Noki/optitheme Best regards |
We have the same issues (server only) on several of our sites only it mentions the paginator internal template but I suppose this revolves around the Paginator. |
No yet anything shareable but here is the error we get:
The error happens, not when I navigate to the mentioned URL (/categories/awards/) but when we go the the Reloading the server while I'm visiting
|
@bep - just send you a link by mail with a repo to reproduce. |
@Noki I'm not even able to start a server with that site on my MacBool. I get "socket: too many open files", which I could probably fix (I tried to raise the ulimit some), but it tells me that that site wouldn't be ... ideal to use to debug this. Let's wait for someone to dig up a simpler example. |
@bep Looks like that's exactly the problem. I tried to reproduce the error with a small number of files but I could not. It is only there if I have a couple of thousand files, however I could not find any information about the file limit on a windows 10 installation. |
btw.: in addion I ran into a concurrency issue when I copied a large number of files to the content directory to increase the number of files.
|
We'll hit with something in private. |
Here's a repo that could help: https://github.com/theNewDynamic/pagination-issue If this is too much work to indentify what part of the code may trigger it (a lot of template files in there), then please let us know how we could help. In order to reproduce the problem:
Thanks a lot! |
In the source this seems interesting, but maybe there’s more to it. Lines 71 to 74 in 527cf1a
|
@larzza what exactly do you mean by "race already at yarn deploy"? |
@bep What I didn’t know when I wrote that was that I always get a race at site generation time, even for my own site/theme. This race dissapears when setting HUGO_NUMWORKERMULTIPLIER=1. This race might be the same as the one that you found in a test and wrote report stating ”probably a bug in Go” (#5926). I have been meaning to ask you about it but other things come between. I have deep dived in the code, but if it is a bug in Hugo it is deep down, I think. Because the parallelism at the top level seeems right to me. The race is apparent also when buildng Hugo with Go 1.11. I can elaborate on this another day if you like. Line 71 in 527cf1a
|
I don't need elaboration, I need some kind of stack trace (i.e. the log when this happens). That said, I have tested the site in question, and I did get this error once, but I could not repeat it. My best guess is this: There are situations where we get concurrent rebuilds, which I guess we currently do not protect against. I wish I had a better test case, but I can and probably also should put in some kind of top level lock. |
I think this is two different errors. One at page rendering time (the one I’m talking about). And one at hugo server time... When setting HUGO_NUMWORKERMULTIPLIER=2 it is more random, sometimes I get the race somtimes not. Stacktrace tomorrow! |
Ok, I don't know if this will help, but I finally found the piece of code that, if removed, prevented the bug to happen. I have no idea why, but this may help. If you go into the repo I shared and remove this line: https://github.com/theNewDynamic/pagination-issue/blob/de798e7f9c7854c53d7e016cb3d9d63ef1c27c67/layouts/_default/baseof.html#L8 Then I am not longer able to reproduce the bug. You can check that partial file here https://github.com/theNewDynamic/pagination-issue/blob/master/components/layout_module-base/layouts/partials/_head/scripts.html I tried removing Fingerprinting, but the bug was still there, only when I stopped calling this partial all together does the bug stops happening 🤷♂ Sorry I cannot be of better help. |
Before you ask, it’s there so we can build js with a tier bundle and still use Hugo pipes to fingerprint etc.. I did suspect fingerprinting was the culprit (on server) but after removing it it still triggered the bug. |
maybe |
@regisphilibert I'm pretty sure I can fix this issue if I can reproduce it reliably -- that is, in a way that I know that it's fixed when I have applied my "fix". |
Note that I'm pretty sure that I have a fix for it, and if I don't manage to reproduce this, I will just issue that patch -- as it should be in there anyway. |
Running |
@bep Do you have a branch with the fix? |
@bep Thanks! Might not get around to it today.... |
The above patch fixes it for me. |
@bep The fix doesn't solve the race at render time (which probably is another issue anyway, so no surprise).
In this test I got:
|
@larzza that data race is already in an issue somewhere (and is probably a bug in Go that I have not been able to create a standalone repro for). For the future: I almost never read comments on closed issues. Which isn't a way of saying that I guarantee that it is fixed, it's just a way to reduce the number of notifications. So, if an issue isn't fixed => new issue. Also, it would be good if we could make one issue about one thing, and that thing only. |
Sorry I was no better help 🛌 ... Anyhow, after hours of trying to isolate this bug, I'm confident I would be able to reproduce it, was it still around on 55.6. Thanks a ton for this quick fix and release. |
Works for me now... thanks... |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi!
I just upgraded vom
v0.54/extended windows/amd64
tov0.55.3/extended windows/amd64
and now hugo crashes when I access localhost:1313 in server mode. The generation of the website still works without any errors if I just use the hugo command.Let me know if you need any additional information to track this down.
Best regards
Tobias
The text was updated successfully, but these errors were encountered: