[
https://issues.apache.org/jira/browse/HAWQ-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleksandr Diachenko resolved HAWQ-1486.
---------------------------------------
Resolution: Fixed
Merged to master.
> PANIC accessing PXF HDFS table
> ------------------------------
>
> Key: HAWQ-1486
> URL: https://issues.apache.org/jira/browse/HAWQ-1486
> Project: Apache HAWQ
> Issue Type: Bug
> Components: External Tables, PXF
> Reporter: John Gaskin
> Assignee: Vineet Goel
> Fix For: 2.3.0.0-incubating
>
>
> This code doesn't catch the case when churl_init_download() returns NULL.
> This seems to trigger a segfault at libcurl level.
> {code}
> Looks like we failed to connect to PXF (?).
> Piece of code in HAWQ handling cUrl calls (pxfutils.c):
> 100 static void process_request(ClientContext* client_context, char *uri)
> 101 {
> 102 size_t n = 0;
> 103 char buffer[RAW_BUF_SIZE];
> 104
> 105 print_http_headers(client_context->http_headers);
> 106 client_context->handle = churl_init_download(uri,
> client_context->http_headers);
> 107 memset(buffer, 0, RAW_BUF_SIZE);
> 108 resetStringInfo(&(client_context->the_rest_buf));
> 109
> 110 /*
> 111 * This try-catch ensures that in case of an exception during the
> "communication with PXF and the accumulation of
> 112 * PXF data in client_context->the_rest_buf", we still get to
> terminate the libcurl connection nicely and avoid
> 113 * leaving the PXF server connection hung.
> 114 */
> 115 PG_TRY();
> 116 {
> 117 /* read some bytes to make sure the connection is established */
> 118 churl_read_check_connectivity(client_context->handle);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)