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

swhkd doesn't start: Os Error, Function not implemented #59

Closed
loiccoyle opened this issue Mar 1, 2022 · 18 comments · Fixed by #62
Closed

swhkd doesn't start: Os Error, Function not implemented #59

loiccoyle opened this issue Mar 1, 2022 · 18 comments · Fixed by #62
Assignees
Labels
Bug Something isn't working

Comments

@loiccoyle
Copy link
Contributor

loiccoyle commented Mar 1, 2022

Version Information:

  • Distribution Information ( run uname -a ):
    Linux FrameWork 5.16.11-arch1-1 #1 SMP PREEMPT Thu, 24 Feb 2022 02:18:20 +0000 x86_64 GNU/Linux
  • swhkd version ( swhkd -V )
    swhkd 1.0.0

Describe the bug:
I installed from the AUR (swhkd-git), when I try to run start the daemon I get the following error msg:

$ swhks &
$ pkexec swhkd -c ~/.config/swhkd/swhkdrc
[2022-03-02T00:49:56Z WARN  swhkd] Running swhkd as root!
Error: Os { code: 38, kind: Unsupported, message: "Function not implemented" }

Expected behavior:
The daemon to start succefully.

Actual behavior:
Daemon doesn't start and crashes.

To Reproduce:

$ paru -S swhkd
$ swhks &
$ pkexec swhkd -c ~/.config/swhkd/swhkdrc

I also tried installing straight from the github:

$ git clone https://github.com/waycrate/swhkd
$ cd swhkd
$ git rev-parse HEAD
3986dd01a31c168e91a3de038911745293dfa574
$ make setup
$ make glibc
$ sudo make install

But the same crash happens.

@loiccoyle loiccoyle added the Bug Something isn't working label Mar 1, 2022
@Shinyzenith
Copy link
Member

Hm this is quite the odd bug.

@Shinyzenith
Copy link
Member

@vainiovano Could this possibly have something to do with tokio?

@vainiovano
Copy link
Contributor

Probably, but I can't reproduce this.

@Shinyzenith
Copy link
Member

Screenshot_20220302-151230_DuckDuckGo
Its failing here

@Shinyzenith
Copy link
Member

@loiccoyle Hi! try cloning the repo to some directory and then run git checkout -q d413ac820ad6c288da96363e1af76a22964ffcb1. Then recompile and install. If it works after that then it means that tokio is the reason for the problem.

@loiccoyle
Copy link
Contributor Author

@loiccoyle Hi! try cloning the repo to some directory and then run git checkout -q d413ac820ad6c288da96363e1af76a22964ffcb1. Then recompile and install. If it works after that then it means that tokio is the reason for the problem.

I just did that and no crash!

@Shinyzenith
Copy link
Member

@vainiovano definitely a tokio bug then^ would you mind taking a look?

@vainiovano
Copy link
Contributor

@loiccoyle could you run the command with strace or something similar and send the output? "Function not implemented" is the error message for ENOSYS, but I have no idea what causes that.

@Shinyzenith
Copy link
Member

image
I think one of these 3 are causing it.

@Shinyzenith
Copy link
Member

Since it's not a thread panic, meaning it's not a hard crash and probably a soft one introduced by one of the ?.

@Shinyzenith
Copy link
Member

Since ENOSYS is a libc error, I think it boils down to the first arrow in the image.

@Shinyzenith
Copy link
Member

Shinyzenith commented Mar 2, 2022

Oh! @loiccoyle can you try swhkd-musl-git from the AUR? since it will be dynamically linked, we rule out bugs in our codebase with it.
If it works it will indicate that the bug has something to do with your glibc version.

@loiccoyle
Copy link
Contributor Author

Here is the strace.

swhkd_strace.txt

oh and @loiccoyle while you're at it, would you mind checking if your system is uptodate?

Yep fully up to date.

Oh! @loiccoyle can you try swhkd-musl-git from the AUR? since it will be dynamically linked, we rule out bugs in our codebase with it.
If it works it will indicate that the bug has something to do with your glibc version.

Same behaviour.

@vainiovano
Copy link
Contributor

@loiccoyle Does #62 fix this?

@Shinyzenith
Copy link
Member

Closed by mistake, @loiccoyle try a recompile from main and let us know.

@loiccoyle
Copy link
Contributor Author

Yep it works ! Thanks!

@Shinyzenith
Copy link
Member

Sweet.

@Shinyzenith
Copy link
Member

Thank you @vainiovano <3

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

Successfully merging a pull request may close this issue.

6 participants