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 because of utility version incompatibility, but perhaps we could also/instead add "walks like a duck" sanity-check, e.g.:
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!