turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.92k stars 274 forks source link

Dashboard crash with nil pointer exception following file watcher event #1943

Closed kaidaguerre closed 1 year ago

kaidaguerre commented 2 years ago

Steampipe 0.14.0-alpha

[Raj](https://app.slack.com/team/U4U7LJ8DU)  [2 hours ago](https://turbothq.slack.com/archives/C01AC8JQNHH/p1650978629204519?thread_ts=1650966819.383629&cid=C01AC8JQNHH)
Also after a long time I got this crash today - this was when I wan modifying some HCL content in the file (fyi),
[ Wait    ] Dashboard execution started: ibm_insights.dashboard.ibm_is_vpc_detail
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x280 pc=0x40695a9]

goroutine 703 [running]:
github.com/turbot/steampipe/db/db_client.(*DbClient).LoadForeignSchemaNames(0xc00083cb40, {0x55523d8?, 0xc000e98280?})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client.go:156 +0x165
github.com/turbot/steampipe/db/db_client.(*DbClient).AcquireSession(0xc00083cb40, {0x55523d8, 0xc000e98280})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client_session.go:35 +0x137
github.com/turbot/steampipe/db/db_client.(*DbClient).ExecuteSync(0xc00007e0a0?, {0x55523d8, 0xc000e98280}, {0xc0010f4000, 0x9e})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client_execute.go:26 +0x70
github.com/turbot/steampipe/db/db_local.(*LocalDbClient).ExecuteSync(0x52ab3e8?, {0x55523d8?, 0xc000e98280?}, {0xc0010f4000?, 0x500b120?})
        /Users/raj/raj-official/plugins/steampipe/db/db_local/local_db_client.go:115 +0x2b
github.com/turbot/steampipe/dashboard/dashboardexecute.(*LeafRun).Execute(0xc000663d00, {0x55523d8, 0xc000e98280})
        /Users/raj/raj-official/plugins/steampipe/dashboard/dashboardexecute/leaf_run.go:121 +0x19b
created by github.com/turbot/steampipe/dashboard/dashboardexecute.(*DashboardContainerRun).Execute
        /Users/raj/raj-official/plugins/steampipe/dashboard/dashboardexecute/container_run.go:128 +0x35e
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x280 pc=0x40695a9]

goroutine 616 [running]:
github.com/turbot/steampipe/db/db_client.(*DbClient).LoadForeignSchemaNames(0xc00083cb40, {0x55523d8?, 0xc000e98280?})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client.go:156 +0x165
github.com/turbot/steampipe/db/db_client.(*DbClient).AcquireSession(0xc00083cb40, {0x55523d8, 0xc000e98280})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client_session.go:35 +0x137
github.com/turbot/steampipe/db/db_client.(*DbClient).ExecuteSync(0xc00007e0a0?, {0x55523d8, 0xc000e98280}, {0xc000fca160, 0xa9})
        /Users/raj/raj-official/plugins/steampipe/db/db_client/db_client_execute.go:26 +0x70
github.com/turbot/steampipe/db/db_local.(*LocalDbClient).ExecuteSync(0x52ab3e8?, {0x55523d8?, 0xc000e98280?}, {0xc000fca160?, 0x0?})
        /Users/raj/raj-official/plugins/steampipe/db/db_local/local_db_client.go:115 +0x2b
github.com/turbot/steampipe/dashboard/dashboardexecute.(*LeafRun).Execute(0xc000438300, {0x55523d8, 0xc000e98280})
        /Users/raj/raj-official/plugins/steampipe/dashboard/dashboardexecute/leaf_run.go:121 +0x19b
created by github.com/turbot/steampipe/dashboard/dashboardexecute.(*DashboardContainerRun).Execute
        /Users/raj/raj-official/plugins/steampipe/dashboard/dashboardexecute/container_run.go:128 +0x35e
➜  steampipe-mod-ibm-insights git:(issue-6) ✗ 
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

kaidaguerre commented 1 year ago

cannot reproduce in v0.20.0