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

Logger process gets killed by xfce4-terminal #660

Closed
cherio opened this issue May 21, 2022 · 3 comments
Closed

Logger process gets killed by xfce4-terminal #660

cherio opened this issue May 21, 2022 · 3 comments
Labels

Comments

@cherio
Copy link

cherio commented May 21, 2022

When mounting with the following command line (Arch linux, latest version 2.2.1 from the standard Arch repo) the process list shows a zombie logger (screenshot)

cat "$KEY_FILE" | gocryptfs -nonempty -masterkey stdin "$VOLUME_PATH" "$ACCESS_DIR"

image

The mount seems to be fully operational.

$ gocryptfs -version
gocryptfs v2.2.1; go-fuse [vendored]; 2022-04-27 go1.18.1 linux/amd64
$ uname -a
Linux host_name 5.17.9-arch1-1 #1 SMP PREEMPT Wed, 18 May 2022 17:30:11 +0000 x86_64 GNU/Linux
$ go version
go version go1.18.2 linux/amd64

I do not manually specify neither "-fg" nor "-notifypid" options.
BTW the process with "notifypid" PID does not exists.

@cherio
Copy link
Author

cherio commented May 25, 2022

Turns out this was a side-effect of running this in a spawned terminal as in xfce4-terminal -x {script to execute}. The terminal apparently attempts to send HUP signals to all direct and indirect children upon shutting itself down.

I changed the original line to

cat "$KEY_FILE" | nohup gocryptfs -nonempty -masterkey stdin "$VOLUME_PATH" "$ACCESS_DIR" >/dev/null 2>&1

and have no more zombies.

Now, I can't say whether this is still a bug of daemonizing of a process or just a peculiar detail of this specific implementation. I didn't see it anywhere in the gocryptfs documentation about the need to use nohup in order to daemonize it correctly. I am not closing this, leaving it on the owner's discretion.

@rfjakob rfjakob added the bug label Jun 26, 2022
@rfjakob rfjakob changed the title Leaves a zombie "logger" process after mount Logger process gets killed by xfce4-terminal Jun 26, 2022
@rfjakob
Copy link
Owner

rfjakob commented Jun 26, 2022

I think this is a bug in gocryptfs. Daemonizing should put gocryptfs and also the logger process out of reach for xfce4-terminal.

@rfjakob
Copy link
Owner

rfjakob commented Jun 26, 2022

PS: "-fg" and "-notifypid" get added during daemonizing. The process at "-notifypid" exits once daemonization is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants