Commit 6b92dce
committed
Clear the hypertable cache pointer on invalidation
Failure to do this results in the possible use after free if
hypertable_cache_create fails due to out of memory.
Possibly (not reproducible, since there is no OOMs anymore) observed on the running instance with:
```
[1034109]: [69d02db8.fc77d-15] [XX000] ERROR: cache "(null)" is not initialized
[1034109]: [69d02db8.fc77d-16] 0 tsdbadmin@tsdb,app=PostgreSQL JDBC Driver [XX000] STATEMENT: INSERT INTO sample_table (a_id, timestamp, metric, b_text, c_text, d_text, created, updated, e_bool) VALUES ($1, $2, $3, $4, $5, $6, NOW(), NOW(), false) ON CONFLICT (a_id, timestamp, metric, b_text) DO NOTHING
[891]: [69c81ac3.37b-1174] 0 @,app= [00000] LOG: server process (PID 1034109) was terminated by signal 11: Segmentation fault
[891]: [69c81ac3.37b-1175] 0 @,app= [00000] DETAIL: Failed process was running: INSERT INTO sample_table (a_id, timestamp, metric, b_text, c_text, d_text, created, updated, e_bool) VALUES ($1, $2, $3, $4, $5, $6, NOW(), NOW(), false) ON CONFLICT (a_id, timestamp, metric, b_text) DO NOTHING1 parent c6cf17a commit 6b92dce
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
0 commit comments