Bug 1351695 - [5.7] Traceback: comparison method violates its general contract!
Summary: [5.7] Traceback: comparison method violates its general contract!
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 1353209
TreeView+ depends on / blocked
 
Reported: 2016-06-30 15:14 UTC by Pavel Studeník
Modified: 2016-07-18 13:57 UTC (History)
2 users (show)

Fixed In Version: spacewalk-java-2.3.8-146-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1353209 (view as bug list)
Environment:
Last Closed: 2016-07-18 13:57:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (3.77 KB, text/x-python)
2016-06-30 15:14 UTC, Pavel Studeník
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1430 0 normal SHIPPED_LIVE Moderate: java-1.7.0-ibm and java-1.7.1-ibm security update 2016-07-18 17:51:35 UTC

Description Pavel Studeník 2016-06-30 15:14:46 UTC
Created attachment 1174640 [details]
reproducer

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!

Comment 1 Grant Gainey 2016-07-05 22:46:27 UTC
spacewalk.github:
SystemSearchHelper: 822d97aa
Other suboptimal comparators: 660362d5

Comment 4 Pavel Studeník 2016-07-12 14:21:58 UTC
Verified with spacewalk-java-2.3.8-146.el6sat.noarch

>> java -version
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

Comment 6 errata-xmlrpc 2016-07-18 13:57:20 UTC
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


Note You need to log in before you can comment on or make changes to this bug.