DISCLAIMER
I have not clearly identified whether this issue is related to the AWS plugin or the Steampipe engine. If this issue has already been reported or if it is a plugin-level problem, please let me know.
Describe the bug
As stated in the title, a segmentation violation occurs when using the ||(concat) operator in the on clause of a join.
Steampipe version (steampipe -v)
v0.23.2
To reproduce
select
fn.name function_name,
lg.retention_in_days log_retention
from aws_lambda_function fn
left join aws_cloudwatch_log_group lg on
lg.name = '/aws/lambda/%s' || fn.name
order by function_name;
Additional context
It works without any issues if I use format instead of ||(concat) as follows.
select
fn.name function_name,
lg.retention_in_days log_retention
from aws_lambda_function fn
left join aws_cloudwatch_log_group lg on
lg.name = format('/aws/lambda/%s', fn.name)
order by function_name;
I spent some time troubleshooting this, so I hope this information helps anyone experiencing the same issue.
DISCLAIMER I have not clearly identified whether this issue is related to the AWS plugin or the Steampipe engine. If this issue has already been reported or if it is a plugin-level problem, please let me know.
Describe the bug As stated in the title, a segmentation violation occurs when using the
||
(concat) operator in the on clause of a join.Steampipe version (
steampipe -v
) v0.23.2To reproduce
Expected behavior return without error
Actual behavior The following error occurs:
log
``` 2024/06/28 08:43:32 [INFO] Log level WARN SIGSEGV: segmentation violation PC=0x7f4b08 m=1 sigcode=1 signal arrived during cgo execution goroutine 17 [syscall, locked to thread]: runtime.cgocall(0x7fa625169de0, 0xc000a17820) /opt/hostedtoolcache/go/1.21.10/x64/src/runtime/cgocall.go:157 +0x4b fp=0xc000a177f8 sp=0xc000a177c0 pc=0x7fa62446f88b main._Cfunc_ExecEvalExpr(0x1ebeee8, 0x1ebbcf8, 0xc000c6c6f8) _cgo_gotypes.go:2971 +0x50 fp=0xc000a17820 sp=0xc000a177f8 pc=0x7fa625152af0 main.getQualValue.func4(0xc0000a8630?, 0x0?, 0x7fa6244d4852?) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/quals.go:411 +0x6a fp=0xc000a17868 sp=0xc000a17820 pc=0x7fa625161cea main.getQualValue(0x1ea9230, 0x1ebbae8, 0x1ebe2e8) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/quals.go:411 +0x21e fp=0xc000a17978 sp=0xc000a17868 pc=0x7fa62516167e main.qualFromOpExpr(0x1ebee48, 0x1ebbae8, 0x256328c0?) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/quals.go:114 +0x234 fp=0xc000a17a70 sp=0xc000a17978 pc=0x7fa62515e714 main.singleRestrictionToQual(0x7fa624470a9d?, 0xc000006680?, 0xc000a17b88?) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/quals.go:30 +0x165 fp=0xc000a17b00 sp=0xc000a17a70 pc=0x7fa62515db05 main.restrictionsToQuals(0x1ebbae8, 0x0?) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/quals.go:64 +0x105 fp=0xc000a17c20 sp=0xc000a17b00 pc=0x7fa62515df05 main.goFdwBeginForeignScan(0x1ebbae8, 0x10) /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/fdw.go:294 +0x3f2 fp=0xc000a17e10 sp=0xc000a17c20 pc=0x7fa625158bf2 _cgoexp_1d6c601d8730_goFdwBeginForeignScan(0x7ffd1db05f60?) _cgo_gotypes.go:4156 +0x1c fp=0xc000a17e30 sp=0xc000a17e10 pc=0x7fa6251667bc runtime.cgocallbackg1(0x7fa6251667a0, 0xc000a17fe0?, 0x0) /opt/hostedtoolcache/go/1.21.10/x64/src/runtime/cgocall.go:399 +0x2c2 fp=0xc000a17f00 sp=0xc000a17e30 pc=0x7fa62446ffc2 runtime.cgocallbackg(0x0?, 0x0?, 0x0?) /opt/hostedtoolcache/go/1.21.10/x64/src/runtime/cgocall.go:315 +0x125 fp=0xc000a17f90 sp=0xc000a17f00 pc=0x7fa62446fc65 runtime.cgocallbackg(0x7fa6251667a0, 0x7ffd1db0614c, 0x0)Additional context It works without any issues if I use
format
instead of||
(concat) as follows.I spent some time troubleshooting this, so I hope this information helps anyone experiencing the same issue.