Skip to content

Leaving pinentry input for a long time with age decryption crashes emacs #24

Description

@sochotnicky

I am not certain this belongs here but perhaps you'd be able to redirect.
I have a following confgi:

(use-package age
  :custom
  (age-program "rage")
  (age-default-identity '("~/.config/age/identity.age"))
  (age-default-recipient
   '( "age1yubikey1..."
     ;; Backup age key
     "age1...."))
  :config
  (age-file-enable))

Also have (pinentry-start). Emacs 30.2

When I start something that requests access to authinfo.age and leave pinentry request for a while (cutoff seems about 30 seconds), return and enter the pin emacs starts using 100% CPU and then crashes when I try to interrupt with ctrl-g. Traceback below (sorry no debuginfos, I can try to add that). I can try to prepare a mini reproducer if this helps as well. But maybe you'd have workaround idea to try?

Backtrace:nded  emacs -nw
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x16ca4f) [0x64aed888ea4f]                                                                                  7.97s       DuckDuckGo Enterprise Agreement ﴃ 
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x4aa6f) [0x64aed876ca6f]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x4b085) [0x64aed876d085]                                                                                                 DuckDuckGo Enterprise Agreement ﴃ 
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x4ad9d) [0x64aed876cd9d]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x16c0b9) [0x64aed888e0b9]
/nix/store/vr7ds8vwbl2fz7pr221d5y0f8n9a5wda-glibc-2.40-218/lib/libc.so.6(+0x419c0) [0x72c73e6419c0]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e2474) [0x64aed8904474]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1bb3d3) [0x64aed88dd3d3]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e3dce) [0x64aed8905dce]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e58a1) [0x64aed89078a1]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/pinentry-08be12ee-9b56700b.eln(F70696e656e7472792d2d70726f636573732d66696c746572_pinentry__process_filter_0+0x26e) [0x72c72c5fcf8e]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5e40) [0x64aed8907e40]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e6110) [0x64aed8908110]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e12da) [0x64aed89032da]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x245659) [0x64aed8967659]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x24d9eb) [0x64aed896f9eb]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x24febd) [0x64aed8971ebd]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/age-038a0cfb-cf9750f7.eln(F6167652d776169742d666f722d636f6d706c6574696f6e_age_wait_for_completion_0+0x9a) [0x72c72ad535aa]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/age-038a0cfb-cf9750f7.eln(F6167652d646563727970742d66696c65_age_decrypt_file_0+0x133) [0x72c72ad54fb3]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/age-038a0cfb-cf9750f7.eln(F6167652d66696c652d696e736572742d66696c652d636f6e74656e7473_age_file_insert_file_contents_0+0x8f0) [0x72c72ad58c90]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5e40) [0x64aed8907e40]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/age-038a0cfb-cf9750f7.eln(F6167652d66696c652d68616e646c6572_age_file_handler_0+0xfa) [0x72c72ad57eda]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x18aba7) [0x64aed88acba7]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/lib/emacs/30.2/native-lisp/30.2-cfa4b70e/auth-source-49df7eef-cdb89bfd.eln(F617574682d736f757263652d6e657472632d7061727365_auth_source_netrc_parse_0+0x5a2) [0x72c72c3a8fe2]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5e40) [0x64aed8907e40]
/home/sochotnicky/.config/doom-local/cache/eln/30.2-cfa4b70e/ghub-2a136109-005390ba.eln(F617574682d736f757263652d6e657472632d70617273654068616e646c652d73796d6c696e6b_auth_source_netrc_parsehandle_symlink_0+0xc2) [0x72c729a92b82]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5e40) [0x64aed8907e40]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x234e46) [0x64aed8956e46]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/lib/emacs/30.2/native-lisp/30.2-cfa4b70e/auth-source-49df7eef-cdb89bfd.eln(F617574682d736f757263652d6e657472632d736561726368_auth_source_netrc_search_0+0x31e) [0x72c72c3aac7e]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5e40) [0x64aed8907e40]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/lib/emacs/30.2/native-lisp/30.2-cfa4b70e/auth-source-49df7eef-cdb89bfd.eln(F617574682d736f757263652d7365617263682d6261636b656e6473_auth_source_search_backends_0+0x20a) [0x72c72c3a726a]
/nix/store/d409x1if0yrgdpkfpwxxs16rsv7n1yhk-emacs-pgtk-30.2/bin/emacs(+0x1e5993) [0x64aed8907993]
...
zsh: IOT instruction (core dumped)  emacs -nw

When the problem happens I see GETPIN error (error "Selecting deleted buffer") while the CPU spins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions