Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 720FC200C11 for ; Sat, 4 Feb 2017 20:19:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 696E6160B63; Sat, 4 Feb 2017 19:19:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8E72D160B54 for ; Sat, 4 Feb 2017 20:18:59 +0100 (CET) Received: (qmail 3942 invoked by uid 500); 4 Feb 2017 19:18:58 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 3931 invoked by uid 99); 4 Feb 2017 19:18:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2017 19:18:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3A8721A01FB for ; Sat, 4 Feb 2017 19:18:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Azk1zO2mYk79 for ; Sat, 4 Feb 2017 19:18:56 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 428D95F30A for ; Sat, 4 Feb 2017 19:18:55 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BC21CE0146 for ; Sat, 4 Feb 2017 19:18:52 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 43C9024D2F for ; Sat, 4 Feb 2017 19:18:52 +0000 (UTC) Date: Sat, 4 Feb 2017 19:18:51 +0000 (UTC) From: "Harald Brennich (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1812) CloseableHttpClient.execute generates SIGSEGV in jvm MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 04 Feb 2017 19:19:00 -0000 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852901#comment-15852901 ] Harald Brennich commented on HTTPCLIENT-1812: --------------------------------------------- 1. Evidently Java code should not be able to crash the JVM. But CloseableHttpClient.execute under certain conditions seems to be able to do so. 2. After modifying the applications source code from CloseableHttpClient client = HttpClients.custom().setConnectionManager(connManager).build(); to clientBuilder = HttpClients.custom(); clientBuilder.setConnectionManager(connManager); ... CloseableHttpClient client = clientBuilder.build(); the SIGSEGV disappears, but the qually mysterious OutOfMemory Exception appears. 3. The execute works only after specifying a suitable useragent via clientBuilder = HttpClients.custom(); clientBuilder.setConnectionManager(connManager); . if (!useragent.isEmpty()) clientBuilder.setUserAgent( useragent); This gives me the impression .that the client can not handle the server response in the case when no useragent was specified. Maybe because the response does not conform to HTTP protocol, but even in this case some other exception should be thrown. > CloseableHttpClient.execute generates SIGSEGV in jvm > ---------------------------------------------------- > > Key: HTTPCLIENT-1812 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1812 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (classic) > Affects Versions: 4.5.2, 4.5.3 > Environment: openjdk version "1.8.0_121" > OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-6.4-x86_64) > OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) > Reporter: Harald Brennich > Attachments: hs_error.log > > > I am using HttpComponents to read a specific web page. This worked fine until yesterday (02/03/2017). Now, on executing a request to the URI http://www.timeanddate.com/astronomy/germany/munich, the JVM reports a SIGSEGV. See attachment.for version 4.53. Version 4.5.2 was similar. > On slightly modifying the calling java code by instantiating the HttpClientBuilder before building the CloseableHttpClient, instead of sigsegving an exception is thrown: > " > java.lang.OutOfMemoryError: Java heap space > sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method) > sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:126) > java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:704) > sun.security.ssl.ECDHCrypt.(ECDHCrypt.java:78) > sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:717) > sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:278) > sun.security.ssl.Handshaker.processLoop(Handshaker.java:913) > sun.security.ssl.Handshaker.process_record(Handshaker.java:849) > sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033) > sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342) > sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369) > sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353) > org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) > org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355) > org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) > org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359) > org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) > org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) > org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) > org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) > org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) > org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) > " > Finally, on setting the user agent (via HttpClientBuilder.setUserAgent) to > "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" the CloseableHttpClient.execute works again (as it did previously) -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org