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

Daemon crashes when the pass store directory doesn't exist #4

Open
zneix opened this issue Jan 22, 2022 · 3 comments
Open

Daemon crashes when the pass store directory doesn't exist #4

zneix opened this issue Jan 22, 2022 · 3 comments

Comments

@zneix
Copy link

zneix commented Jan 22, 2022

I have my pass' store directory set up at ~/.local/share/pass and I set it up through PASSWORD_STORE_DIR environment variable, however the systemd unit didn't have the said variable, so it tried to read from ~/.password-store and the service has died. After adding a systemd unit override to include the environment variable everything started working fine.
I suggest that pass' store directory missing could handled gracefully instead of dumping core due to an exception.

journalctl logs
Jan 22 21:05:34 uds systemd[936]: Starting Pass SecretService...
Jan 22 21:05:34 uds systemd[936]: Started Pass SecretService.
Jan 22 21:05:34 uds pass-secrets[2133]: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
Jan 22 21:05:34 uds pass-secrets[2133]:   what():  filesystem error: cannot create directory: No such file or directory [/home/zneix/.password-store/secretservice]
Jan 22 21:05:34 uds systemd-coredump[2139]: [🡕] Process 2133 (pass-secrets) of user 1000 dumped core.

                                            Module linux-vdso.so.1 with build-id f9fada32e91353254b262e357cb155d189cc0523
                                            Module libgpg-error.so.0 with build-id 3801187d42c4955bd93c605451430cdf1b164e63
                                            Module libgcrypt.so.20 with build-id db45f5d5e0f7af1e77324fea1885f974619ad268
                                            Module libcap.so.2 with build-id f56c6cd6ad4d35053340d7ff2f8f954498796739
                                            Module liblz4.so.1 with build-id e63600ab23b2f6997f42fac2fa56e1f02ce159a1
                                            Module libzstd.so.1 with build-id ea8f70c7c6816cee97c9890081a80259ca44d397
                                            Module liblzma.so.5 with build-id 8b615460aa230708c5183f16bede67aa0437d95e
                                            Module librt.so.1 with build-id 75484da2d6f1515189eefa076e0a40328834cd16
                                            Module ld-linux-x86-64.so.2 with build-id 040cc3dd10461562f177df39e3be2f3704258c3c
                                            Module libm.so.6 with build-id 2b8fd1f869ecab4e0b55e92f2f151897f6818acf
                                            Module libsystemd.so.0 with build-id 6a2a26aa5fff87c1eb61137339bc55a53956c9ac
                                            Module libc.so.6 with build-id 4b406737057708c0e4c642345a703c47a61c73dc
                                            Module libpthread.so.0 with build-id 07c8f95b4f3251d08550217ad8a1f31066229996
                                            Module libgcc_s.so.1 with build-id 7f8508bb914546ada778809b64b99d234337d835
                                            Module libstdc++.so.6 with build-id 9b5eeeb149bf3c4efe787fb398b44f00507aec87
                                            Module libsdbus-c++.so.1 with build-id 3b1e7345adc1d1bf90efd0a7789e2259b81b6e2a
                                            Module pass-secrets with build-id 7a3e759d73d8fbe5524afd43868c332ebbc8ba68
                                            Stack trace of thread 2133:
                                            #0  0x00007f8d52e1fd22 raise (libc.so.6 + 0x3cd22)
                                            #1  0x00007f8d52e09862 abort (libc.so.6 + 0x26862)
                                            #2  0x00007f8d53084802 _ZN9__gnu_cxx27__verbose_terminate_handlerEv (libstdc++.so.6 + 0x99802)
                                            #3  0x00007f8d53090c8a _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xa5c8a)
                                            #4  0x00007f8d53090cf7 _ZSt9terminatev (libstdc++.so.6 + 0xa5cf7)
                                            #5  0x00007f8d53090f8e __cxa_throw (libstdc++.so.6 + 0xa5f8e)
                                            #6  0x00007f8d530890a1 _ZNSt10filesystem16create_directoryERKNS_7__cxx114pathE (libstdc++.so.6 + 0x9e0a1)
                                            #7  0x000055cfb625e998 n/a (pass-secrets + 0x22998)
                                            #8  0x000055cfb624cf18 n/a (pass-secrets + 0x10f18)
                                            #9  0x000055cfb624acff n/a (pass-secrets + 0xecff)
                                            #10 0x00007f8d52e0ab25 __libc_start_main (libc.so.6 + 0x27b25)
                                            #11 0x000055cfb624b25e n/a (pass-secrets + 0xf25e)
                                            ELF object binary architecture: AMD x86-64
Jan 22 21:05:34 uds systemd[936]: pass-secrets.service: Main process exited, code=dumped, status=6/ABRT
Jan 22 21:05:34 uds systemd[936]: pass-secrets.service: Failed with result 'core-dump'.
Jan 22 21:15:00 uds systemd[936]: Starting Pass SecretService...
Jan 22 21:15:00 uds systemd[936]: Started Pass SecretService.
@nullobsi
Copy link
Owner

thanks for the issue!

I will add a case for this soon. :)

@ioalex
Copy link

ioalex commented Aug 23, 2022

Experienced the same issue, hope we can work towards a fix soon.

@Thaodan
Copy link

Thaodan commented Sep 7, 2022

This makes me question, how do multiple password stores work with the service?

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

4 participants