Re: Thinking of how to fix HAWQ-1381

2017-03-07 Thread Ming Li
Hi Hongxu, I don't know the impact of this change. But I think if we want to solve this problem completely, we should: 1. change segment id type from int to int32 or int64, which don't have different range on different platforms. 2. The buffer length can contain the max value of that type 3. if i

Re: Thinking of how to fix HAWQ-1381

2017-03-07 Thread Paul Guo
Intersting. sprintf kind of unsafe functions should be really avoided unless some strong limitation in fmt is set. Maybe you could enlarge the array length and use snprintf, but it risks truncating and you need to append NULL byte for string if needed, or you allocate the size in need. 2017-03-08

Thinking of how to fix HAWQ-1381

2017-03-07 Thread Ma Hongxu
Hi all I found a hawq core dump issue: https://issues.apache.org/jira/browse/HAWQ-1381 Briefly: buffer overflow here: src/backend/access/external/fileam.c:2610 sprintf(extvar->GP_SEGMENT_ID, "%d", GetQEIndex()); GetQEIndex() return -1 on master and GP_SEGMENT_ID is char[6], no more space for

[jira] [Created] (HAWQ-1382) Specify necessary setup for hawq_rm_stmt_nvseg and hawq_rm_stmt_vseg_memory

2017-03-07 Thread Jane Beckman (JIRA)
Jane Beckman created HAWQ-1382: -- Summary: Specify necessary setup for hawq_rm_stmt_nvseg and hawq_rm_stmt_vseg_memory Key: HAWQ-1382 URL: https://issues.apache.org/jira/browse/HAWQ-1382 Project: Apache

[jira] [Created] (HAWQ-1381) Core dump when execute 'select * from hawq_toolkit.__hawq_log_master_ext;' on macOS

2017-03-07 Thread Hongxu Ma (JIRA)
Hongxu Ma created HAWQ-1381: --- Summary: Core dump when execute 'select * from hawq_toolkit.__hawq_log_master_ext;' on macOS Key: HAWQ-1381 URL: https://issues.apache.org/jira/browse/HAWQ-1381 Project: Apache

[GitHub] incubator-hawq-docs pull request #99: HAWQ-1376 - clarify pxf host and port ...

2017-03-07 Thread lisakowen
GitHub user lisakowen opened a pull request: https://github.com/apache/incubator-hawq-docs/pull/99 HAWQ-1376 - clarify pxf host and port description clarify the pxf host and port description (create external table, location clause URI) across the docs - host - any pxf node -