Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in EXPLAIN VERBOSE on dist table #3961

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

nikkhils
Copy link
Contributor

@nikkhils nikkhils commented Jan 6, 2022

The crash is occurring in "fdw_scan_explain" function because the
fsstate passed in is NULL and we try to access the "fetcher_type" field
from it in VERBOSE mode.

When we are doing EXPLAIN, we short circuit the init foreign scan calls
and that's why fsstate is not filled up.

Fixes #3960

@nikkhils nikkhils self-assigned this Jan 6, 2022
@nikkhils nikkhils requested a review from a team as a code owner January 6, 2022 14:35
@nikkhils nikkhils requested review from mkindahl and removed request for a team January 6, 2022 14:35
tsl/src/fdw/scan_exec.c Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #3961 (518993a) into master (4762908) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3961      +/-   ##
==========================================
- Coverage   90.78%   90.74%   -0.04%     
==========================================
  Files         213      213              
  Lines       38468    38468              
==========================================
- Hits        34923    34908      -15     
- Misses       3545     3560      +15     
Impacted Files Coverage Δ
tsl/src/fdw/scan_exec.c 91.07% <100.00%> (+0.65%) ⬆️
src/bgw/scheduler.c 83.04% <0.00%> (-2.64%) ⬇️
src/loader/bgw_launcher.c 89.50% <0.00%> (-2.47%) ⬇️
src/bgw/job.c 92.93% <0.00%> (-0.29%) ⬇️
tsl/src/nodes/data_node_dispatch.c 97.10% <0.00%> (-0.25%) ⬇️
tsl/src/bgw_policy/job.c 88.01% <0.00%> (-0.05%) ⬇️
tsl/src/fdw/fdw.c 92.85% <0.00%> (+3.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4762908...518993a. Read the comment docs.

tsl/src/fdw/scan_exec.c Outdated Show resolved Hide resolved
The crash is occurring in "fdw_scan_explain" function because the
fsstate passed in is NULL and we try to access the "fetcher_type" field
from it in VERBOSE mode.

When we are doing EXPLAIN, we short circuit the init foreign scan calls
and that's why fsstate is not filled up.

Fixes timescale#3960
@nikkhils nikkhils merged commit 4aeb133 into timescale:master Jan 10, 2022
@nikkhils nikkhils deleted the verbose_crash branch January 10, 2022 14:32
akuzm added a commit to akuzm/timescaledb that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* timescale#3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* timescale#3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* timescale#3943 Optimize first/last
* timescale#3945 Add support for ALTER SCHEMA on multi-node
* timescale#3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* timescale#3808 Properly handle max_retries option
* timescale#3863 Fix remote transaction heal logic
* timescale#3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* timescale#3944 Fix segfault in add_compression_policy
* timescale#3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* timescale#4015 Eliminate float rounding instabilities in interpolate
* timescale#4019 Update ts_extension_oid in transitioning state
* timescale#4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
akuzm added a commit that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* #3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* #3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* #3943 Optimize first/last
* #3945 Add support for ALTER SCHEMA on multi-node
* #3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* #3808 Properly handle max_retries option
* #3863 Fix remote transaction heal logic
* #3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* #3944 Fix segfault in add_compression_policy
* #3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* #4015 Eliminate float rounding instabilities in interpolate
* #4019 Update ts_extension_oid in transitioning state
* #4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
svenklemm pushed a commit that referenced this pull request Feb 17, 2022
This release is medium priority for upgrade. We recommend that you
upgrade at the next available opportunity.

This release adds major new features since the 2.5.2 release,
including:

Compression in continuous aggregates Experimental support for timezones
in continuous aggregates Experimental support for monthly buckets in
continuous aggregates It also includes several bug fixes. Telemetry
reports are switched to a new format, and now include more detailed
statistics on compression, distributed hypertables and indexes.

**Features**

* #3768 Allow ALTER TABLE ADD COLUMN with DEFAULT on compressed
hypertable
* #3769 Allow ALTER TABLE DROP COLUMN on compressed hypertable
* #3943 Optimize first/last
* #3945 Add support for ALTER SCHEMA on multi-node
* #3949 Add support for DROP SCHEMA on multi-node

**Bugfixes**

* #3808 Properly handle max_retries option
* #3863 Fix remote transaction heal logic
* #3869 Fix ALTER SET/DROP NULL contstraint on distributed hypertable
* #3944 Fix segfault in add_compression_policy
* #3961 Fix crash in EXPLAIN VERBOSE on distributed hypertable
* #4015 Eliminate float rounding instabilities in interpolate
* #4019 Update ts_extension_oid in transitioning state
* #4073 Fix buffer overflow in partition scheme

**Improvements**

Query planning performance is improved for hypertables with a large
number of chunks.

**Thanks**

* @fvannee for reporting a first/last memory leak
* @mmouterde for reporting an issue with floats and interpolate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: crash on EXPLAIN VERBOSE UPDATE on a distributed hypertable
4 participants