atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.68k stars 562 forks source link

After logging out, atuin leaves lots of zombie processes #1302

Open ScuttleSE opened 1 year ago

ScuttleSE commented 1 year ago

Describe the bug After logging out from the atuin server and then continuing to use the machine I have dozens of zombie atuin processes in my processlist after a while

To Reproduce Steps to reproduce the behavior:

  1. Log on to a machine with atuin logged out
  2. Use the atuin history for a while
  3. Do "ps aux|grep atuin"
scuttle   528331  0.0  0.0      0     0 pts/0    Z    14:59   0:00 [atuin] <defunct>
scuttle   528530  0.0  0.0      0     0 pts/0    Z    14:59   0:00 [atuin] <defunct>
scuttle   528566  0.0  0.0      0     0 pts/0    Z    14:59   0:00 [atuin] <defunct>
scuttle   528594  0.0  0.0      0     0 pts/0    Z    14:59   0:00 [atuin] <defunct>
scuttle   528620  0.0  0.0      0     0 pts/0    Z    14:59   0:00 [atuin] <defunct>
scuttle   528821  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530098  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530152  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530267  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530292  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530316  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530407  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530453  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530477  0.0  0.0      0     0 pts/0    Z    15:00   0:00 [atuin] <defunct>
scuttle   530501  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530619  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530658  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530694  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530718  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530742  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530766  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530817  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530841  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530865  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530896  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530921  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530947  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   530971  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>
scuttle   531032  0.0  0.0      0     0 pts/0    Z    15:01   0:00 [atuin] <defunct>

Device (please complete the following information):

Self hosted Docker, running ghcr.io/atuinsh/atuin:16.0

Additional context Add any other context about the problem here.

bvergnaud commented 4 months ago

Hello,

Looks like this problem is still active in some form, as I've been experiencing similar defunct processes recently. However, there are a few differences worth pointing out:

Output from atuin doctor:

atuin:
  version: 18.2.0
  sync:
    cloud: false
    records: true
    auto_sync: true
    last_sync: 2024-06-05 13:03:35.178566384 +00:00:00
shell:
  name: fish
  default: unknown
  plugins:
  - atuin
system:
  os: Arch Linux
  arch: x86_64
  version: rolling
  disks:
  - name: /dev/mapper/cryptroot
    filesystem: ext4
  - name: systemd-1
    filesystem: autofs
  - name: systemd-1
    filesystem: autofs
  - name: systemd-1
    filesystem: autofs
  - name: systemd-1
    filesystem: autofs
  - name: systemd-1
    filesystem: autofs
  - name: /dev/nvme0n1p1
    filesystem: vfat
  - name: seadrive
    filesystem: fuse.seadrive

If this feels too separate from the original description, I'm happy to open another issue, just let me know. :)

mike-lloyd03 commented 2 months ago

I'm having this issue as well except I see this [atuin] <defunct> every time I resurrect a Zellij session. This appears in every pane that was at the command prompt. I'm not using a sync server at all.

image