You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2020/03/20 06:20:13 UTC

[GitHub] [fluo-uno] ctubbsii opened a new issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

ctubbsii opened a new issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243
 
 
   Uno uses pgrep (and pkill) to locate processes (and terminate them).
   
   However, it also tends to start processes with long command lines. Unfortunately, this hits an annoying limit of pgrep and pkill, which can only match on the first 4096 characters in a command name. This means sometimes processes aren't found, and can be left running.
   
   This seems to be a hard-limit (see https://unix.stackexchange.com/questions/570819/pgrep-f-matches-on-first-4096-characters-only) that would require recompiling pgrep and pkill to work around.
   
   Some initial ideas:
   
   1. We write our own custom pgrep and pkill functions which use `ps -eo pid,comm`, `grep -E`, and `awk '{print $1}'` internally.
   2. Try to see if the command-lines can be shortened (export CLASSPATH instead of use `-cp` for java, as one example).
   3. Create wrapper controller scripts which are easier to pattern match with pgrep/pkill, and which terminate the process they control when they trap a specific termination signal that uno scripts send.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-uno] ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

Posted by GitBox <gi...@apache.org>.
ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243#issuecomment-601553260
 
 
   I might only have noticed this since #239, because the command-line for ZooKeeper 3.5.7 seems longer than 3.4.14. However, the underlying problem is with pgrep / pkill, and not any specific version of ZooKeeper (though ZK's launch scripts might be making things worse, if they create long command-lines unnecessarily).
   
   EDIT: See https://issues.apache.org/jira/browse/ZOOKEEPER-3766

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-uno] ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

Posted by GitBox <gi...@apache.org>.
ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243#issuecomment-601559200
 
 
   It looks like pgrep/pkill [fixed this in 3.3.16](https://gitlab.com/procps-ng/procps/-/merge_requests/85/diffs?commit_id=be0e43523208030c4495b8fb07a5b00d31350549). It might be a non-issue for Uno, so long as users understand they could encounter this bug if they don't have 3.3.16 or later.
   
   I'm pushing for the update in my distro (Fedora) at https://bugzilla.redhat.com/show_bug.cgi?id=1782309

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-uno] ctubbsii commented on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243#issuecomment-601559200
 
 
   It looks like pgrep/pkill [fixed this in 3.3.16](https://gitlab.com/procps-ng/procps/-/merge_requests/85/diffs?commit_id=be0e43523208030c4495b8fb07a5b00d31350549). It might be a non-issue for Uno, so long as users understand they could encounter this bug if they don't have 3.3.16 or later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-uno] ctubbsii commented on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243#issuecomment-601553260
 
 
   I might only have noticed this since #239, because the command-line for ZooKeeper 3.5.7 seems longer than 3.4.14. However, the underlying problem is with pgrep / pkill, and not any specific version of ZooKeeper (though ZK's launch scripts might be making things worse, if they create long command-lines unnecessarily).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-uno] ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations

Posted by GitBox <gi...@apache.org>.
ctubbsii edited a comment on issue #243: uno kill (and uno stop, etc.) doesn't always work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243#issuecomment-601553260
 
 
   I might only have noticed this since #239, because the command-line for ZooKeeper 3.5.7 seems longer than 3.4.14. However, the underlying problem is with pgrep / pkill, and not any specific version of ZooKeeper (though ZK's launch scripts might be making things worse, if they create long command-lines unnecessarily).
   
   EDIT: I checked. They do. See https://issues.apache.org/jira/browse/ZOOKEEPER-3766

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services