+++ This bug was initially created as a clone of Bug #1351695 +++ Description of problem: We have satellite with 1000+ registered systems. If I try to search a system according by hardware then I received traceback. I upload here script and the reproducer is this command: >> python search.py localhost <user> <pass> device usb Jun 30, 2016 9:27:07 AM redstone.xmlrpc.XmlRpcDispatcher writeError WARNING: redstone.xmlrpc.XmlRpcFault: unhandled internal exception: Comparison method violates its general contract! Version-Release number of selected component (if applicable): java-1.7.1-ibm-1.7.1.3.40-1jpp.1.el6_7.x86_64 spacewalk-java-2.3.8-145.el6sat.noarch How reproducible: On satellite with many systems Steps to Reproduce: 1. register some systems to satellite 2. call API self.client.system.search.deviceDescription(...) which searches by hardware (script as attachment) Actual results: Client: >> python search.py localhost <user> <pass> device usb .... File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1313, in single_request return self.parse_response(response) File "/usr/lib64/python2.7/xmlrpclib.py", line 1490, in parse_response return u.close() File "/usr/lib64/python2.7/xmlrpclib.py", line 799, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: Comparison method violates its general contract!'> Server: >> tail /var/log/tomcat6/catalina.out 2016-06-30 09:27:07,209 [TP-Processor7] ERROR com.redhat.rhn.frontend.xmlrpc.BaseHandler - Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:884) at java.util.TimSort.mergeAt(TimSort.java:501) at java.util.TimSort.mergeCollapse(TimSort.java:426) at java.util.TimSort.sort(TimSort.java:230) at java.util.TimSort.sort(TimSort.java:189) at java.util.Arrays.sort(Arrays.java:867) at java.util.Collections.sort(Collections.java:229) at com.redhat.rhn.frontend.action.systems.SystemSearchHelper.processResultMap(SystemSearchHelper.java:736) at com.redhat.rhn.frontend.action.systems.SystemSearchHelper.systemSearch(SystemSearchHelper.java:247) at com.redhat.rhn.frontend.xmlrpc.system.search.SystemSearchHandler.performSearch(SystemSearchHandler.java:51) .... at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:809) Jun 30, 2016 9:27:07 AM redstone.xmlrpc.XmlRpcDispatcher writeError WARNING: redstone.xmlrpc.XmlRpcFault: unhandled internal exception: Comparison method violates its general contract! --- Additional comment from Grant Gainey on 2016-07-05 18:46:27 EDT --- spacewalk.github: SystemSearchHelper: 822d97aa Other suboptimal comparators: 660362d5
Verified with spacewalk-java-2.0.2-109.el6sat.noarch java version "1.7.0" Java(TM) SE Runtime Environment (build pxa6470_27sr3fp40-20160422_01(SR3 FP40)) IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20160406_298393 (JIT enabled, AOT enabled) J9VM - R27_Java727_SR3_20160406_0942_B298393 JIT - tr.r13.java_20160328_114186 GC - R27_Java727_SR3_20160406_0942_B298393_CMPRSS J9CL - 20160406_298393) JCL - 20160421_01 based on Oracle jdk7u101-b14
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2016:1430