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

Segfault in cagg_update_view_definition #2042

Closed
svenklemm opened this issue Jun 30, 2020 · 0 comments · Fixed by #2043
Closed

Segfault in cagg_update_view_definition #2042

svenklemm opened this issue Jun 30, 2020 · 0 comments · Fixed by #2043
Labels
bug segfault Segmentation fault
Milestone

Comments

@svenklemm
Copy link
Member

svenklemm commented Jun 30, 2020

(gdb) #0  0x00007feee2ec44cc in list_length (l=0x7f7f7f7f7f7f7f7f)
    at /home/runner/postgresql/include/server/nodes/pg_list.h:91
No locals.
#1  0x00007feee2ecbaa1 in cagg_update_view_definition (agg=0x55be8a3c2878, 
    mat_ht=0x55be8a3f4f20, with_clause_options=0x55be8a3c2ac8)
    at /home/runner/work/timescaledb/timescaledb/tsl/src/continuous_aggs/create.c:1845
        lc1 = 0x7ffd639787d0
        lc2 = 0x55be8a3f4e08
        sec_ctx = 32765
        uid = 21950
        saved_uid = 2318254872
        user_view_oid = 110231
        user_view_rel = 0x7feee254f3d8
        user_query = 0x55be8a3fd320
        fqi = {final_seltlist = 0x55be8a4b0930, final_havingqual = 0x0, 
          final_userquery = 0x55be8a3881a0}
        mattblinfo = {matcollist = 0x55be8a4b09a0, 
          partial_seltlist = 0x55be8a4b0968, 
          partial_grouplist = 0x55be8a4b0b28, mat_groupcolname_list = 0x0, 
          matpartcolno = 0, matpartcolname = 0x55be8a4b16f8 "time_bucket"}
        mataddress = {classId = 1259, objectId = 110221, objectSubId = 0}
        direct_view_oid = 110244
        direct_view_rel = 0x7feee3553e98
        direct_query = 0x55be8a402848
        rtable = 0x55be8a3c2bf8
        timebucket_exprinfo = {htid = 1, htoid = 109115, htpartcolno = 3, 
          htpartcoltype = 1184, htpartcol_interval_len = 604800000000, 
          bucket_width = 86400000000}
        view_query = 0x55be8a516838
#2  0x00007feee2ed6f8f in continuous_agg_update_options (agg=0x55be8a3c2878, 
    with_clause_options=0x55be8a3c2ac8)
    at /home/runner/work/timescaledb/timescaledb/tsl/src/continuous_aggs/options.c:277
        hcache = 0x55be8a3f4e08
        mat_ht = 0x55be8a3f4f20
        materialized_only = false
        __func__ = "continuous_agg_update_options"
#3  0x00007feee326d6c8 in process_altercontinuousagg_set_with (
    cagg=0x55be8a3c2878, view_relid=110231, defelems=0x55be8a2dc158)
    at /home/runner/work/timescaledb/timescaledb/src/process_utility.c:2631
        parse_results = 0x55be8a3c2ac8
        pg_options = 0x0
        cagg_options = 0x55be8a3c2a90
        __func__ = "process_altercontinuousagg_set_with"
#4  0x00007feee326db29 in process_altertable_start_view (args=0x7ffd63978b20)
    at /home/runner/work/timescaledb/timescaledb/src/process_utility.c:2675
        cmd = 0x55be8a2dc190
        stmt = 0x55be8a2dc248
        view_relid = 110231
        view_name = {data = "metrics_summary", '\000' <repeats 48 times>}
        view_schema = {data = "public", '\000' <repeats 57 times>}
        cagg = 0x55be8a3c2878
        lc = 0x55be8a2dc1e8
        vtyp = ContinuousAggUserView
        __func__ = "process_altertable_start_view"
#5  0x00007feee326dcd7 in process_altertable_start (args=0x7ffd63978b20)
    at /home/runner/work/timescaledb/timescaledb/src/process_utility.c:2697
        stmt = 0x55be8a2dc248
#6  0x00007feee326fea2 in process_ddl_command_start (args=0x7ffd63978b20)
    at /home/runner/work/timescaledb/timescaledb/src/process_utility.c:3255
        check_read_only = true
        handler = 0x7feee326dc5c <process_altertable_start>
#7  0x00007feee3270b5d in timescaledb_ddl_command_start (
    pstmt=0x55be8a2dc318, 
    query_string=0x55be8a2db558 "ALTER VIEW metrics_summary SET (timescaledb.materialized_only=false);", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, 
    queryEnv=0x0, dest=0x55be8a2dc608, completion_tag=0x7ffd63978df0 "")
    at /home/runner/work/timescaledb/timescaledb/src/process_utility.c:3488
        args = {hcache = 0x0, pstmt = 0x55be8a2dc318, queryEnv = 0x0, 
          parse_state = 0x55be8a4026e8, parsetree = 0x55be8a2dc248, 
          query_string = 0x55be8a2db558 "ALTER VIEW metrics_summary SET (timescaledb.materialized_only=false);", context = PROCESS_UTILITY_TOPLEVEL, 
          params = 0x0, dest = 0x55be8a2dc608, hypertable_list = 0x0, 
          completion_tag = 0x7ffd63978df0 ""}
        altering_timescaledb = false
        result = (unknown: 21950)
#8  0x000055be8805b452 in PortalRunUtility (portal=0x55be8a382f98, 
    pstmt=0x55be8a2dc318, isTopLevel=<optimized out>, 
    setHoldSnapshot=<optimized out>, dest=<optimized out>, 
    completionTag=0x7ffd63978df0 "") at pquery.c:1178
        utilityStmt = <optimized out>
        snapshot = 0x55be8a3a6900
#9  0x000055be8805bfd1 in PortalRunMulti (portal=portal@entry=0x55be8a382f98, 
    isTopLevel=isTopLevel@entry=true, 
    setHoldSnapshot=setHoldSnapshot@entry=false, 
    dest=dest@entry=0x55be8a2dc608, altdest=altdest@entry=0x55be8a2dc608, 
    completionTag=completionTag@entry=0x7ffd63978df0 "") at pquery.c:1331
        pstmt = <optimized out>
        active_snapshot_set = false
        stmtlist_item = 0x55be8a2dc5a8
#10 0x000055be8805cdaa in PortalRun (portal=portal@entry=0x55be8a382f98, 
    count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, 
    run_once=run_once@entry=true, dest=dest@entry=0x55be8a2dc608, 
    altdest=altdest@entry=0x55be8a2dc608, completionTag=0x7ffd63978df0 "")
    at pquery.c:799
        save_exception_stack = 0x7ffd63978fe0
        save_context_stack = 0x0
        local_sigjmp_buf = {{__jmpbuf = {1, 7420372319743521521, 
              94276850401976, 140726274330096, 94276851085208, 2, 
              3638246662117536497, 7420367806850937585}, 
            __mask_was_saved = 0, __saved_mask = {__val = {94276817462453, 
                94276851096792, 94276851093568, 0, 94274532147200, 64, 
                94276851093416, 94276817462453, 94276851085208, 
                94276817462453, 1, 112, 94276850398272, 94276850401976, 
                94276817248410, 94276850402768}}}}
        result = <optimized out>
        nprocessed = <optimized out>
        saveTopTransactionResourceOwner = 0x55be8a33a348
        saveTopTransactionContext = 0x55be8a3a67b0
        saveActivePortal = 0x0
        saveResourceOwner = 0x55be8a33a348
        savePortalContext = 0x0
        saveMemoryContext = 0x55be8a3a67b0
        __func__ = "PortalRun"
#11 0x000055be88058762 in exec_simple_query (
    query_string=0x55be8a2db558 "ALTER VIEW metrics_summary SET (timescaledb.materialized_only=false);") at postgres.c:1145
        parsetree = <optimized out>
        portal = 0x55be8a382f98
        snapshot_set = <optimized out>
        commandTag = <optimized out>
        completionTag = "\000\216\227c\375\177\000\000\310șc\375\177\000\000\020\354\062\212\276U\000\000\310șc\375\177\000\000\316:\373^\000\000\000\000X\265-\212\276U\000\000X\265-\212\276U\000\000\210\207\063\212\276U\000"
        querytree_list = <optimized out>
        plantree_list = <optimized out>
        receiver = 0x55be8a2dc608
        format = 0
        dest = DestRemote
        oldcontext = <optimized out>
        parsetree_list = 0x55be8a2dc2e0
        parsetree_item = 0x55be8a2dc2b8
        save_log_statement_stats = false
        was_logged = false
        use_implicit_block = false
        msec_str = "\000\216\227c\375\177\000\000\310șc\375\177\000\000\020\354\062\212\276U\000\000\310șc\375\177\000"
        __func__ = "exec_simple_query"
#12 0x000055be8805a6fc in PostgresMain (argc=<optimized out>, 
    argv=argv@entry=0x55be8a338ac0, dbname=<optimized out>, 
    username=<optimized out>) at postgres.c:4193
        query_string = 0x55be8a2db558 "ALTER VIEW metrics_summary SET (timescaledb.materialized_only=false);"
        firstchar = <optimized out>
        input_message = {
          data = 0x55be8a2db558 "ALTER VIEW metrics_summary SET (timescaledb.materialized_only=false);", len = 70, maxlen = 1024, cursor = 70}
        local_sigjmp_buf = {{__jmpbuf = {140726274330528, 
              -3637173666416413967, 94276850780040, 94276850780864, 
              94276820659776, 94276850740240, 3638246662058816241, 
              7420367804649190129}, __mask_was_saved = 1, __saved_mask = {
              __val = {0, 94276850404170, 94276815564368, 94276850398792, 
                94276850780368, 94276850780792, 4451518794916203264, 
                94276850741312, 94276817122311, 140726274331424, 0, 
                140726274332464, 94276850780040, 94276850740240, 
                140664153968789, 206158430256}}}}
        send_ready_for_query = false
        disable_idle_in_transaction_timeout = false
        __func__ = "PostgresMain"
#13 0x000055be87d29bda in BackendRun (port=0x55be8a32f040)
    at postmaster.c:4364
        ac = 1
        secs = 646838093
        usecs = 488226
        i = 1
        av = 0x55be8a338ac0
        maxac = <optimized out>
        av = <optimized out>
        maxac = <optimized out>
        ac = <optimized out>
        secs = <optimized out>
        usecs = <optimized out>
        i = <optimized out>
#14 BackendStartup (port=0x55be8a32f040) at postmaster.c:4036
        bn = 0x55be8a32ec10
        pid = <optimized out>
        bn = <optimized out>
        pid = <optimized out>
        save_errno = <optimized out>
#15 ServerLoop () at postmaster.c:1707
        port = <optimized out>
        i = <optimized out>
        rmask = {fds_bits = {16, 0 <repeats 15 times>}}
        selres = <optimized out>
        now = <optimized out>
        readmask = {fds_bits = {16, 0 <repeats 15 times>}}
        nSockets = <optimized out>
        last_lockfile_recheck_time = 1593522885
        last_touch_time = 1593522825
        __func__ = "ServerLoop"
#16 0x000055be87fd7dd5 in PostmasterMain (argc=8, argv=0x55be8a2d4de0)
    at postmaster.c:1380
        opt = <optimized out>
        status = <optimized out>
        userDoption = <optimized out>
        listen_addr_saved = <optimized out>
        i = <optimized out>
        output_config_variable = <optimized out>
        __func__ = "PostmasterMain"
#17 0x000055be87d2b855 in main (argc=8, argv=0x55be8a2d4de0) at main.c:228
No locals.
(gdb) quit
           PID: 12324 (postgres)
           UID: 1001 (runner)
           GID: 116 (docker)
        Signal: 11 (SEGV)
     Timestamp: Tue 2020-06-30 13:14:54 UTC (58s ago)
  Command Line: postgres: default_perm_user db_continuous_aggs_union_view-11 127.0.0.1(45574) ALTER VIEW
    Executable: /home/runner/postgresql/bin/postgres
 Control Group: /system.slice/runner-provisioner.service
          Unit: runner-provisioner.service
         Slice: system.slice
       Boot ID: 80c599cc465c4060908db16e3087718d
    Machine ID: 148a6750218645a5a5c641e7072ea97f
      Hostname: fv-az50
       Storage: /var/lib/systemd/coredump/core.postgres.1001.80c599cc465c4060908db16e3087718d.12324.1593522894000000.lz4
       Message: Process 12324 (postgres) of user 1001 dumped core.
                
                Stack trace of thread 12324:
                #0  0x00007feee2ec44cc n/a (/home/runner/postgresql/lib/timescaledb-tsl-2.0.0-dev.so)
                #1  0x00007feee2ecbaa1 n/a (/home/runner/postgresql/lib/timescaledb-tsl-2.0.0-dev.so)
                #2  0x00007feee2ed6f8f n/a (/home/runner/postgresql/lib/timescaledb-tsl-2.0.0-dev.so)
                #3  0x00007feee326d6c8 n/a (/home/runner/postgresql/lib/timescaledb-2.0.0-dev.so)
                #4  0x00007feee326db29 n/a (/home/runner/postgresql/lib/timescaledb-2.0.0-dev.so)
                #5  0x00007feee326dcd7 n/a (/home/runner/postgresql/lib/timescaledb-2.0.0-dev.so)
                #6  0x00007feee326fea2 n/a (/home/runner/postgresql/lib/timescaledb-2.0.0-dev.so)
                #7  0x00007feee3270b5d n/a (/home/runner/postgresql/lib/timescaledb-2.0.0-dev.so)
                #8  0x000055be8805b452 n/a (/home/runner/postgresql/bin/postgres)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug segfault Segmentation fault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant