This issue was raised by the community, and under certain circumstances, SonarQube won't start with the following error:
This can happen when starting SonarQube with no ES folder, which triggers the asynchronous index recreation. During this step, if one/several projects have no snapshot, the comparator used to sort the project by popularity can throw this error. The error comes from the comparator itself, which does not respect the transitivity contract of the Comparator interface.
Edit: the issue is likely to occur with a few hundred of projects, with a mix of analyzed and never analyzed projects.