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

'zk init' terminated by signal SIGTERM (Polite quit request) #118

Closed
j-steinbach opened this issue Dec 13, 2021 · 10 comments · Fixed by #119
Closed

'zk init' terminated by signal SIGTERM (Polite quit request) #118

j-steinbach opened this issue Dec 13, 2021 · 10 comments · Fixed by #119
Labels
bug Something isn't working

Comments

@j-steinbach
Copy link

My tried-and-tested ZK install doesn't work anymore. No matter which command I give, my RAM + SWAP go to 100% (~32GB combined), my computer freezes, and then the command quits.

This only happens in my "real" ZK folder. I created a new empty folder in /tmp/test and ran zk init there -- it worked.

This happens to me on both v0.7.0 and 0.8.0. I removed my .zk directory and tried re-creating it, but to no avail.

The first time this bug happened was when I ran a zk new command whilst playing/idling the paperclip game. My PC was already on heavy load/dying, and the zk command just died. Afterwards, even after restarting, zk just stopped working. So maybe this has to do with memory.

@mickael-menu
Copy link
Collaborator

There might be an issue during the indexing phase. Could you try running this in your notebook and see if you can identify the culprit note?

mkdir .zk
zk index --verbose

Making an empty .zk is enough to let zk recognize a directory as a notebook.

@j-steinbach
Copy link
Author

Is --verbose a valid flag?

 ↳ zk index --verbose
zk: error: unknown flag --verbose

@mickael-menu
Copy link
Collaborator

Yes since 0.8.0, you should see it in zk index -h

@j-steinbach
Copy link
Author

Maybe I am blind, but I don't see it:

image

@mickael-menu
Copy link
Collaborator

That's weird... Where did you get your zk binary?

@j-steinbach
Copy link
Author

j-steinbach commented Dec 13, 2021

I built it myself (NixOS), from commit = "9ae8e5b041fc26a1e5aba03bc899b7cd7037c5d2"; shortcommit = "9ae8e5b";. Still, my build might be faulty, so I am going to re-check that.

But the problem has been happening with the old 0.7.0 as well, which I built weeks ago. And that one had been working until yesterday.

E: I am going to try this without the --verbose, I am just copying my files around until I get it working and narrow down the offending file(s) this way.

@mickael-menu
Copy link
Collaborator

mickael-menu commented Dec 13, 2021

The commit sounds about right, I'm not sure why you don't get the --verbose flag. I double-checked and I get it building zk with make locally.

--verbose would help you narrow down the problematic files as it prints the name of each file while indexing:

$ zk index --verbose
- added automation.md
- added config-alias.md
- added config-extra.md
- added config-filter.md
- added config-group.md
- added config-lsp.md
- added config-note.md
- added config.md
- added daily-journal.md
- added editors-integration.md
- added external-call.md
- added external-processing.md
- added future-proof.md
...

But the problem has been happening with the old 0.7.0 as well, which I built weeks ago. And that one had been working until yesterday.

I think it's a good hint that zk is choking on one of your recent notes.

@j-steinbach
Copy link
Author

j-steinbach commented Dec 13, 2021

Yes, and I found that note already. And I can reproduce it! Simply add #A to any file :)

E: This is a tag that is only one character long.

My guess: This tries to look up a lot of stuff and then crashes.

@mickael-menu mickael-menu added the bug Something isn't working label Dec 13, 2021
@mickael-menu
Copy link
Collaborator

Thanks, I'll take a look into this one!

@j-steinbach
Copy link
Author

Np, thank you creating this tool and for taking the time and going through this with me. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants