[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15504954#comment-15504954 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user zuyu commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 LGTM. Merged. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15499107#comment-15499107 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user pateljm commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 Thanks @zuyu and @hbdeshmukh for excellent mentorship on this PR! > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15490861#comment-15490861 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user tarunbansal commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 Thanks @hbdeshmukh and @zuyu for the suggestions and help. I have squashed all the commits into one. Please merge this PR if it is good to go now. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15490581#comment-15490581 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user hbdeshmukh commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78760896 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -19,6 +19,12 @@ #include "relational_operators/TextScanOperator.hpp" +#include "relational_operators/RelationalOperatorsConfig.h" // For QUICKSTEP_HAVE_UNISTD. --- End diff -- Ah, good catch. Thanks @zuyu > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15490583#comment-15490583 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user zuyu commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 @tarunbansal Before we merge this PR, please squash all the commits into one. Thanks! https://cwiki.apache.org/confluence/display/QUICKSTEP/Workflow+For+Contributors > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15490574#comment-15490574 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user zuyu commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78760515 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -19,6 +19,12 @@ #include "relational_operators/TextScanOperator.hpp" +#include "relational_operators/RelationalOperatorsConfig.h" // For QUICKSTEP_HAVE_UNISTD. --- End diff -- @hbdeshmukh No, this line is ok, as the next line immediately uses `QUICKSTEP_HAVE_UNISTD` defined in the header file. See https://github.com/apache/incubator-quickstep/blob/master/storage/StorageManager.cpp#L20 for more info and examples. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15490533#comment-15490533 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user hbdeshmukh commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78755999 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -19,6 +19,12 @@ #include "relational_operators/TextScanOperator.hpp" +#include "relational_operators/RelationalOperatorsConfig.h" // For QUICKSTEP_HAVE_UNISTD. --- End diff -- Can you move this include between line 39 and 50, i.e. in the block of included files from quickstep modules. When you do that, make sure the list is sorted. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15484280#comment-15484280 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user hbdeshmukh commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 Hi @tarunbansal I have given some comments. After you address them, I will merge this PR. Thanks. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15484277#comment-15484277 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user hbdeshmukh commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78382769 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -18,6 +18,11 @@ **/ #include "relational_operators/TextScanOperator.hpp" +#include "relational_operators/RelationalConfig.h" --- End diff -- Can you sort the above two included files alphabetically? We follow a convention that lists of included files are sorted. If you are dealing with a large list of included files, you may use your IDE's sorting feature, instead of manual effort. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15483980#comment-15483980 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user tarunbansal commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 Hi @zuyu Thanks for the welcome and the information about coding style. I have made the suggested changes and reverted file permission change which was done erroneously in the last commit by me. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15480673#comment-15480673 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user zuyu commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78285930 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -91,6 +91,15 @@ bool TextScanOperator::getAllWorkOrders( if (blocking_dependencies_met_ && !work_generated_) { for (const std::string : files) { // Use standard C libary to retrieve the file size. + + // Check file permissions before trying to open it + #ifdef QUICKSTEP_HAVE_UNISTD --- End diff -- Hi @tarunbansal Welcome to the team, and please get familiar with our code style at https://cwiki.apache.org/confluence/display/QUICKSTEP/Quickstep+Coding+Standards. Also, I noticed that you made the file mode from `644` to `755`. Please revert this change first. Finally, I would have written the code as following: ``` // Add in Line 21. #include "relational_operators/RelationalConfig.h" // For QUICKSTEP_HAVE_UNISTD. #ifdef QUICKSTEP_HAVE_UNISTD #include #endif // QUICKSTEP_HAVE_UNISTD // Start from Line 95. #ifdef QUICKSTEP_HAVE_UNISTD // Check file permissions before trying to open it. const int access_result = access(file.c_str(), R_OK); CHECK_EQ(0, access_result) << "File " << file << " is not readable due to permission issues."; #endif // QUICKSTEP_HAVE_UNISTD ``` > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15480655#comment-15480655 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user zuyu commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r78285790 --- Diff: relational_operators/RelationalConfig.h.in --- @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + **/ + +#cmakedefine QUICKSTEP_HAVE_UNISTD --- End diff -- Code style: miss the end-of-line symbol. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15475820#comment-15475820 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user tarunbansal commented on the issue: https://github.com/apache/incubator-quickstep/pull/99 Thanks @hbdeshmukh for noticing this possible ambiguity. I am still digging around the code and will update the PR once the fix is ready. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (QUICKSTEP-36) Quickstep gives segmentation fault when it imports table from a file that does not have access rights.
[ https://issues.apache.org/jira/browse/QUICKSTEP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15472798#comment-15472798 ] ASF GitHub Bot commented on QUICKSTEP-36: - Github user hbdeshmukh commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/99#discussion_r77946830 --- Diff: relational_operators/TextScanOperator.cpp --- @@ -91,6 +91,12 @@ bool TextScanOperator::getAllWorkOrders( if (blocking_dependencies_met_ && !work_generated_) { for (const std::string : files) { // Use standard C libary to retrieve the file size. + + // Check file permissions before trying to open it + int rval = access(file.c_str(), R_OK); --- End diff -- Hi @tarunbansal - This is a neat change. The ``access`` function may not be available on all the platforms that are used in Quickstep. On unix, it comes from the header ``unistd.h``. To solve such issues, typically we check the availability of this header file using CMake. If the function is available, we create a variable, e.g. in this case it could be QUICKSTEP_HAVE_UNISTD and guard this line with ``#ifdef QUICKSTEP_HAVE_UNISTD`` and ``#endif QUICKSTEP_HAVE_UNISTD``. You can dig around in the code to find such usage patterns. > Quickstep gives segmentation fault when it imports table from a file that > does not have access rights. > -- > > Key: QUICKSTEP-36 > URL: https://issues.apache.org/jira/browse/QUICKSTEP-36 > Project: Apache Quickstep > Issue Type: Bug > Components: Relational Operators > Environment: Cloudlab Instance >Reporter: Hakan Memisoglu >Priority: Minor > > When we give a file that does not exist, TextScanOperator notifies the user > with an appropriate message. > {quote} > quickstep> COPY foo FROM '/there-is-no-such-file' WITH (DELIMITER '|'); > F0706 18:09:22.318012 8658 TextScanOperator.cpp:85] Check failed: > files.size() != 0u (0 vs. 0) No files matched '/there-is-no-such-file'. > Exiting. > *** Check failure stack trace: *** > @ 0x301b343 (unknown) > @ 0x301b79a (unknown) > @ 0x301ebec (unknown) > @ 0x310ea99 (unknown) > @ 0x305f710 (unknown) > @ 0x305e626 (unknown) > @ 0x305e4af (unknown) > @ 0x305c714 (unknown) > @ 0x302f085 (unknown) > @ 0x7fc0e28f7350 (unknown) > @ 0x7fc0e308e182 start_thread > @ 0x7fc0e207f47d (unknown) > @ (nil) (unknown) > Aborted > {quote} > However, when we give a file that exist but Quickstep does not have access to > it, we receive segmentation fault. > {quote} > quickstep> COPY foo FROM '/fastdisk/you-have-no-access.txt' WITH (DELIMITER > '|'); > Segmentation fault > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)