Skip to content

Don't kill plugin process with signal SIGKILL #2402

@zhanhb

Description

@zhanhb

What version of shadowsocks-libev are you using?

shadowsocks-libev 3.2.0(installed through dnf)

What operating system are you using?

Linux 2.6.32-042stab127.2 # 1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
NAME="CentOS Linux"
VERSION="7 (Core)"

What did you do?

I wrote a plugin wrapper to support SIP003 protocol with a plugin kcptun-sip003-wrapper. So ss-server will start my shell and the shell will start the plugin binary. Then I execute the command killall ss-server

What did you expect to see?

ss-server can kill all the child process or ss-server not to kill my wrpper process with signal SIGKILL.

What did you see instead?

Process ss-server got killed and leave the kcptun process still alive.

What is your config in detail (with all sensitive info masked)?

ss-server --plugin kcptun --plugin-opts 'key=some_key_here'

Here is the command I executed. kcptun is a shell script in the repository mentioned above. And binary file server_linux_amd64 in the same directory.

I searched the source of this repository, and found this line

cork_subprocess_abort(sub);

IMO, maybe something should changed here.

I have the control of signal, but When my wrapper process got signal SIGKILL, it has no chance to clean child process.

https://libcork.readthedocs.io/en/0.14.0/subprocess/#c.cork_subprocess_wait

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions