JVM crash in JIT-compiled org.apache.http.impl.cookie.BestMatchSpec.formatCookies() method

Solution Verified - Updated -

Issue

  • Our JBoss server crashes with the fatal error log containing:

    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGSEGV (0xb) at pc=0x00007f5b73e6d705, pid=31205, tid=140029100357376
    #
    # Problematic frame:
    # J  org.apache.http.impl.cookie.BestMatchSpec.formatCookies(Ljava/util/List;)Ljava/util/List;
    
  • Using Apache http client libary in our application, we sporadically get the following exception:

    Caused by: java.util.NoSuchElementException: 
        at java.util.ArrayList$Itr.next(ArrayList.java:757)
        at org.apache.http.impl.cookie.BestMatchSpec.formatCookies(BestMatchSpec.java:189)
        at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:196)
        at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
        at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) 
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x
  • Java 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content