[
https://issues.apache.org/jira/browse/SOLR-16191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534419#comment-17534419
]
Michael Gibney commented on SOLR-16191:
---------------------------------------
Yes, that sounds like a good way to go. I notice that {{ps}} is invoked in a
number of different ways in that script at the moment. I wonder (while we're at
it) if it would be possible to normalize all the invocations to use similar
syntax variants?
> Sanity-check assumptions about Linux `ps` command in `solr/bin/solr` script
> ---------------------------------------------------------------------------
>
> Key: SOLR-16191
> URL: https://issues.apache.org/jira/browse/SOLR-16191
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: scripts and tools
> Affects Versions: 9.0, 8.11.2, main (10.0)
> Reporter: Michael Gibney
> Priority: Minor
>
> SOLR-15558 made more apparent some assumptions/implicit dependencies on the
> Linux {{ps}} command in the {{solr/bin/solr}} script. The script already
> [disables running in
> cygwin|https://github.com/apache/solr/blob/f5e927ed1ed9cb43ac843cac4e12b6edc1b8a904/solr/bin/solr#L58-L63]
> because of utility version incompatibility, but perhaps we could
> also/instead add "walks like a duck" sanity-check, e.g.:
> {code:sh}
> if [ "$$" != "`ps -o pid='' $$`" ]; then
> exit 1
> fi
> {code}
> The issue arose while running {{gradlew :solr:packaging:integrationTests}}
> for Alpine Linux with BusyBox {{ps}} installed, for which {{ps -o pid=''
> $WHATEVER}} dumps all running pids, regardless of the value of {{$WHATEVER}}.
> The behavior observed appeared mainly to affect {{solr stop}}, where the
> command watches for the PID to exit, but the pid is never detected as having
> exited. I'm not sure, it's possible that jstack/kill was being run against
> random PIDs!
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]