Segfault in postgres
The following simple query results in a segfault: steampipe query 'select distinct cidr_ipv4 from aws_vpc_security_group_rule'
Log entries from ~/.steampipe/logs/database-2023-01-21.log:
2023-01-21 17:41:12.065 UTC [182076] LOG: disconnection: session time: 0:00:00.088 user=root database=steampipe host=127.0.0.1 port=44156 2023-01-21 17:41:13.088 UTC [161652] LOG: server process (PID 182074) was terminated by signal 11: Segmentation fault 2023-01-21 17:41:13.088 UTC [161652] DETAIL: Failed process was running: select distinct cidr_ipv4 from aws_vpc_security_group_rule
Environment:
steampipe version 0.18.1 +--------------------------------------------------+---------+-------------+ | Installed Plugin | Version | Connections | +--------------------------------------------------+---------+-------------+ | hub.steampipe.io/plugins/turbot/aws@latest | 0.92.0 | awsdev | | hub.steampipe.io/plugins/turbot/steampipe@latest | 0.6.0 | steampipe | +--------------------------------------------------+---------+-------------+
Virtualization: vmware Operating System: Ubuntu 20.04.5 LTS Kernel: Linux 5.15.0-56-generic Architecture: x86-64
Welcome to Steampipe @nobuggy and thanks for raising this issue 👍 .
I was able to replicate this issue in my local and came up with the following observations:
- Running
select cidr_ipv4 from aws_vpc_security_group_ruleresults in no error. - I am able to run
select * from aws_vpc_security_group_rulesuccessfully without any errors. - When I use distinct on any column with a
cidrdata type, I get the segmentation fault error.
I will move this issue to the https://github.com/turbot/steampipe-plugin-sdk repo for better tracking 👍 .
Thanks once again for providing good details on the issue 👍 .
I was able to reproduce it
2025-03-11 13:31:01.960 UTC [1] LOG: server process (PID 8811) was terminated by signal 11: Segmentation fault
2025-03-11 13:31:01.960 UTC [1] DETAIL: Failed process was running: select distinct(cidr_ipv4) from aws_prod.aws_vpc_security_group_rule;
2025-03-11 13:31:01.960 UTC [1] LOG: terminating any other active server processes
2025-03-11 13:31:01.961 UTC [8850] postgres@postgres FATAL: the database system is in recovery mode
but we also have Segmentation fault without any Failed process was running (so I can't understand why it fails in our case)