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

Memory overflow #3354

Closed
mfundul opened this issue Jun 23, 2021 · 0 comments · Fixed by #3355
Closed

Memory overflow #3354

mfundul opened this issue Jun 23, 2021 · 0 comments · Fixed by #3355
Assignees
Labels

Comments

@mfundul
Copy link
Contributor

mfundul commented Jun 23, 2021

Relevant system information:
Github action: https://github.com/timescale/timescaledb/runs/2888688560

Describe the bug

==postgres==20141==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000102680 at pc 0x55ca8235cf6a bp 0x7ffe33349460 sp 0x7ffe33348c08
READ of size 64 at 0x619000102680 thread T0
    #0 0x55ca8235cf69 in memcpy (/home/runner/postgresql/bin/postgres+0x2612f69)
    #1 0x55ca8244ab20 in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
    #2 0x55ca8244ab20 in fill_val /home/runner/pgbuild/src/backend/access/common/heaptuple.c:287
    #3 0x55ca8244ece5 in heap_fill_tuple /home/runner/pgbuild/src/backend/access/common/heaptuple.c:336
    #4 0x55ca8245380a in heap_form_tuple /home/runner/pgbuild/src/backend/access/common/heaptuple.c:1090
    #5 0x55ca8245513b in heap_modify_tuple /home/runner/pgbuild/src/backend/access/common/heaptuple.c:1153
    #6 0x7f30a39a2897 in ts_hypertable_compression_rename_column /home/runner/work/timescaledb/timescaledb/src/hypertable_compression.c:197
    #7 0x7f30a31352bd in tsl_process_compress_table_rename_column /home/runner/work/timescaledb/timescaledb/tsl/src/compression/create.c:1093
    #8 0x7f30a30e9e54 in tsl_process_rename_cmd /home/runner/work/timescaledb/timescaledb/tsl/src/process_utility.c:53
    #9 0x7f30a39e0396 in process_rename_column /home/runner/work/timescaledb/timescaledb/src/process_utility.c:1626
    #10 0x7f30a39ed908 in process_rename /home/runner/work/timescaledb/timescaledb/src/process_utility.c:1812
    #11 0x7f30a39e1c58 in process_ddl_command_start /home/runner/work/timescaledb/timescaledb/src/process_utility.c:3747
    #12 0x7f30a39ede36 in timescaledb_ddl_command_start /home/runner/work/timescaledb/timescaledb/src/process_utility.c:3982
    #13 0x55ca835eaddf in ProcessUtility /home/runner/pgbuild/src/backend/tcop/utility.c:520
    #14 0x55ca835dd475 in PortalRunUtility /home/runner/pgbuild/src/backend/tcop/pquery.c:1157
    #15 0x55ca835e09fa in PortalRunMulti /home/runner/pgbuild/src/backend/tcop/pquery.c:1303
    #16 0x55ca835e4730 in PortalRun /home/runner/pgbuild/src/backend/tcop/pquery.c:779
    #17 0x55ca835da9e8 in exec_execute_message /home/runner/pgbuild/src/backend/tcop/postgres.c:2195
    #18 0x55ca835dc5fc in PostgresMain /home/runner/pgbuild/src/backend/tcop/postgres.c:4390
    #19 0x55ca83349429 in BackendRun /home/runner/pgbuild/src/backend/postmaster/postmaster.c:4526
    #20 0x55ca83354533 in BackendStartup /home/runner/pgbuild/src/backend/postmaster/postmaster.c:4210
    #21 0x55ca833552b2 in ServerLoop /home/runner/pgbuild/src/backend/postmaster/postmaster.c:1739
    #22 0x55ca8335781b in PostmasterMain /home/runner/pgbuild/src/backend/postmaster/postmaster.c:1412
    #23 0x55ca82f5a30b in main /home/runner/pgbuild/src/backend/main/main.c:210
    #24 0x7f30b14b90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #25 0x55ca8234646d in _start (/home/runner/postgresql/bin/postgres+0x25fc46d)

0x619000102680 is located 0 bytes to the right of 1024-byte region [0x619000102280,0x619000102680)
allocated by thread T0 here:
    #0 0x55ca823d2da7 in malloc (/home/runner/postgresql/bin/postgres+0x2688da7)
    #1 0x55ca83bad873 in AllocSetContextCreateInternal /home/runner/pgbuild/src/backend/utils/mmgr/aset.c:468
    #2 0x55ca83aaaa83 in BuildCachedPlan /home/runner/pgbuild/src/backend/utils/cache/plancache.c:948
    #3 0x55ca83aac098 in GetCachedPlan /home/runner/pgbuild/src/backend/utils/cache/plancache.c:1170
    #4 0x55ca835d8982 in exec_bind_message /home/runner/pgbuild/src/backend/tcop/postgres.c:1965
    #5 0x55ca835dc5ac in PostgresMain /home/runner/pgbuild/src/backend/tcop/postgres.c:4373
    #6 0x55ca83349429 in BackendRun /home/runner/pgbuild/src/backend/postmaster/postmaster.c:4526
    #7 0x55ca83354533 in BackendStartup /home/runner/pgbuild/src/backend/postmaster/postmaster.c:4210
    #8 0x55ca833552b2 in ServerLoop /home/runner/pgbuild/src/backend/postmaster/postmaster.c:1739
    #9 0x55ca8335781b in PostmasterMain /home/runner/pgbuild/src/backend/postmaster/postmaster.c:1412
    #10 0x55ca82f5a30b in main /home/runner/pgbuild/src/backend/main/main.c:210
    #11 0x7f30b14b90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

@mfundul mfundul added the bug label Jun 23, 2021
@mfundul mfundul self-assigned this Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant