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

server crash during ingestion #244

Closed
min-mwei opened this issue Oct 8, 2017 · 3 comments
Closed

server crash during ingestion #244

min-mwei opened this issue Oct 8, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@min-mwei
Copy link

min-mwei commented Oct 8, 2017

The line numbers are missing, I probably should custom the build flags. Hopefully this has something to look at. Thanks

(gdb) bt
#0 0x00007f4b40bfe2bf in parse_one_specmb (format=format@entry=0x96fd42 "%u/%u%s", posn=posn@entry=0, spec=spec@entry=0x7ffcabc53ca0, max_ref_arg=max_ref_arg@entry=0x7ffcabc53c68) at printf-parsemb.c:248
#1 0x00007f4b40bdce29 in printf_positional (s=s@entry=0x7ffcabc54690, format=format@entry=0x96fd3d "base/%u/%u
%s", readonly_format=readonly_format@entry=0, ap=ap@entry=0x7ffcabc54830,
ap_savep=ap_savep@entry=0x7ffcabc54228, done=5, nspecs_done=0, lead_str_end=0x96fd42 "%u/%u_%s", work_buffer=0x7ffcabc54260 "", save_errno=0, grouping=0x0, thousands_sep=0x7f4b40d1eae5 "")
at vfprintf.c:1762
#2 0x00007f4b40bdf4a6 in IO_vfprintf_internal (s=s@entry=0x7ffcabc54690, format=, format@entry=0x96fd3d "base/%u/%u%s", ap=ap@entry=0x7ffcabc54830) at vfprintf.c:1677
#3 0x00007f4b40ca8856 in __vsnprintf_chk (s=0x2c3e7e8 "base/", maxlen=, flags=1, slen=, format=0x96fd3d "base/%u/%u%s", args=0x7ffcabc54830) at vsnprintf_chk.c:63
#4 0x00000000007f8baf in pvsnprintf ()
#5 0x00000000007f8d4d in psprintf ()
#6 0x00000000006c2f04 in mdopen.part ()
#7 0x00000000006c344f in mdexists ()
#8 0x00000000006a5c0a in fsm_readbuf ()
#9 0x00000000006a5f11 in fsm_search ()
#10 0x00000000006a6c62 in GetFreeIndexPage ()
#11 0x00000000004b1125 in _bt_getbuf.part.1 ()
#12 0x00000000004afa61 in _bt_insertonpg ()
#13 0x00000000004b0f57 in _bt_doinsert ()
#14 0x00000000004b36f1 in btinsert ()
#15 0x00000000005bbc60 in ExecInsertIndexTuples ()
#16 0x00007f4b40767e0d in timescaledb_DoCopy () from /mnt/pg/lib/postgresql/timescaledb.so
#17 0x00007f4b40760990 in timescaledb_ddl_command_start () from /mnt/pg/lib/postgresql/timescaledb.so
#18 0x00000000006cb67e in PortalRunUtility ()
#19 0x00000000006cc185 in PortalRunMulti ()
#20 0x00000000006cccce in PortalRun ()
#21 0x00000000006c9dcb in PostgresMain ()
#22 0x000000000046d06e in ServerLoop ()
#23 0x000000000066d362 in PostmasterMain ()
#24 0x000000000046e080 in main ()

@mfreed mfreed added the bug label Oct 8, 2017
@min-mwei
Copy link
Author

min-mwei commented Oct 8, 2017

Here is a better stack now I have the symbols enabled
(gdb) bt
#0 0x00007f454b6302bf in parse_one_specmb (format=format@entry=0x96fd62 "%u/%u%s", posn=posn@entry=0, spec=spec@entry=0x7ffc57dc81b0, max_ref_arg=max_ref_arg@entry=0x7ffc57dc8178) at printf-parsemb.c:248
#1 0x00007f454b60ee29 in printf_positional (s=s@entry=0x7ffc57dc8ba0, format=format@entry=0x96fd5d "base/%u/%u
%s", readonly_format=readonly_format@entry=0, ap=ap@entry=0x7ffc57dc8d40,
ap_savep=ap_savep@entry=0x7ffc57dc8738, done=5, nspecs_done=0, lead_str_end=0x96fd62 "%u/%u_%s", work_buffer=0x7ffc57dc8770 "", save_errno=0, grouping=0x0, thousands_sep=0x7f454b750ae5 "")
at vfprintf.c:1762
#2 0x00007f454b6114a6 in IO_vfprintf_internal (s=s@entry=0x7ffc57dc8ba0, format=, format@entry=0x96fd5d "base/%u/%u%s", ap=ap@entry=0x7ffc57dc8d40) at vfprintf.c:1677
#3 0x00007f454b6da856 in __vsnprintf_chk (s=s@entry=0x19d6848 "base/", maxlen=, maxlen@entry=128, flags=flags@entry=1, slen=slen@entry=18446744073709551615,
format=format@entry=0x96fd5d "base/%u/%u
%s", args=args@entry=0x7ffc57dc8d40) at vsnprintf_chk.c:63
#4 0x00000000007f8baf in vsnprintf (__ap=0x7ffc57dc8d40, _fmt=0x96fd5d "base/%u/%u%s", __n=128, s=0x19d6848 "base/") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:77
#5 pvsnprintf (buf=buf@entry=0x19d6848 "base/", len=len@entry=128, fmt=fmt@entry=0x96fd5d "base/%u/%u
%s", args=args@entry=0x7ffc57dc8d40) at psprintf.c:121
#6 0x00000000007f8d4d in psprintf (fmt=0x96fd5d "base/%u/%u
%s") at psprintf.c:64
#7 0x00000000006c2f04 in mdopen (reln=reln@entry=0x25fe4a8, forknum=forknum@entry=FSM_FORKNUM, behavior=behavior@entry=2) at md.c:585
#8 0x00000000006c344f in mdopen (behavior=2, forknum=FSM_FORKNUM, reln=0x25fe4a8) at md.c:287
#9 mdexists (reln=0x25fe4a8, forkNum=FSM_FORKNUM) at md.c:286
#10 0x00000000006a5c0a in fsm_readbuf (rel=rel@entry=0x7f3d1675b7a8, addr=..., addr@entry=..., extend=extend@entry=0 '\000') at freespace.c:574
#11 0x00000000006a5f11 in fsm_search (rel=0x7f3d1675b7a8, min_cat=128 '\200') at freespace.c:712
#12 0x00000000006a62e2 in GetPageWithFreeSpace (rel=rel@entry=0x7f3d1675b7a8, spaceNeeded=spaceNeeded@entry=4096) at freespace.c:136
#13 0x00000000006a6c62 in GetFreeIndexPage (rel=rel@entry=0x7f3d1675b7a8) at indexfsm.c:40
#14 0x00000000004b1125 in _bt_getbuf (rel=rel@entry=0x7f3d1675b7a8, access=2, blkno=) at nbtpage.c:613
#15 0x00000000004b14da in _bt_getbuf (rel=rel@entry=0x7f3d1675b7a8, blkno=blkno@entry=4294967295, access=access@entry=2) at nbtpage.c:573
#16 0x00000000004afa61 in _bt_split (newitemonleft=1 '\001', newitem=0x1c175f8, newitemsz=24, newitemoff=118, firstright=138, cbuf=0, buf=350855, rel=0x7f3d1675b7a8) at nbtinsert.c:986
#17 _bt_insertonpg (rel=rel@entry=0x7f3d1675b7a8, buf=buf@entry=350855, cbuf=cbuf@entry=0, stack=stack@entry=0x1fddad8, itup=itup@entry=0x1c175f8, newitemoff=118, split_only_page=0 '\000') at nbtinsert.c:781
#18 0x00000000004b0f57 in _bt_doinsert (rel=rel@entry=0x7f3d1675b7a8, itup=itup@entry=0x1c175f8, checkUnique=checkUnique@entry=UNIQUE_CHECK_NO, heapRel=heapRel@entry=0x7f3d164c6a58) at nbtinsert.c:204
#19 0x00000000004b36f1 in btinsert (rel=0x7f3d1675b7a8, values=, isnull=, ht_ctid=0x25e217c, heapRel=0x7f3d164c6a58, checkUnique=UNIQUE_CHECK_NO) at nbtree.c:284
#20 0x00000000005bbc60 in ExecInsertIndexTuples (slot=0x2156a80, tupleid=tupleid@entry=0x25e217c, estate=estate@entry=0x1d23918, noDupErr=noDupErr@entry=0 '\000', specConflict=specConflict@entry=0x0,
arbiterIndexes=arbiterIndexes@entry=0x0) at execIndexing.c:388
#21 0x00007f454b199e0d in timescaledb_CopyFrom (ht=0x24b6df0, range_table=, main_rel=0x7f3d16808ed8, cstate=0x1a6b908) at src/copy.c:315
#22 timescaledb_DoCopy (stmt=stmt@entry=0x191acb8,
queryString=queryString@entry=0x1919da8 "copy "measures_ds" ( "measureid", "measureclass", "measureversion", "eventdatetime", "dimensions", "customdimensions", "sum", "cardinality" ) from stdin binary;", processed=processed@entry=0x7ffc57dc9450, ht=ht@entry=0x24b6df0) at src/copy.c:637
#23 0x00007f454b192990 in process_copy (completion_tag=0x7ffc57dc9950 "",
query_string=0x1919da8 "copy "measures_ds" ( "measureid", "measureclass", "measureversion", "eventdatetime", "dimensions", "customdimensions", "sum", "cardinality" ) from stdin binary;", parsetree=0x191acb8) at src/process_utility.c:229
#24 process_ddl_command_start (completion_tag=0x7ffc57dc9950 "", context=PROCESS_UTILITY_TOPLEVEL,
query_string=0x1919da8 "copy "measures_ds" ( "measureid", "measureclass", "measureversion", "eventdatetime", "dimensions", "customdimensions", "sum", "cardinality" ) from stdin binary;", parsetree=0x191acb8) at src/process_utility.c:1267
#25 timescaledb_ddl_command_start (parsetree=0x191acb8,
query_string=0x1919da8 "copy "measures_ds" ( "measureid", "measureclass", "measureversion", "eventdatetime", "dimensions", "customdimensions", "sum", "cardinality" ) from stdin binary;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, dest=0x191b018, completion_tag=0x7ffc57dc9950 "") at src/process_utility.c:1336
#26 0x00000000006cb67e in PortalRunUtility (portal=0x19a7b18, utilityStmt=0x191acb8, isTopLevel=, setHoldSnapshot=, dest=0x191b018, completionTag=0x7ffc57dc9950 "")
at pquery.c:1193
#27 0x00000000006cc185 in PortalRunMulti (portal=portal@entry=0x19a7b18, isTopLevel=isTopLevel@entry=1 '\001', setHoldSnapshot=setHoldSnapshot@entry=0 '\000', dest=dest@entry=0x191b018,
altdest=altdest@entry=0x191b018, completionTag=completionTag@entry=0x7ffc57dc9950 "") at pquery.c:1349
#28 0x00000000006cccce in PortalRun (portal=portal@entry=0x19a7b18, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=1 '\001', dest=dest@entry=0x191b018, altdest=altdest@entry=0x191b018,
completionTag=completionTag@entry=0x7ffc57dc9950 "") at pquery.c:815
#29 0x00000000006c9dcb in exec_simple_query (
query_string=0x1919da8 "copy "measures_ds" ( "measureid", "measureclass", "measureversion", "eventdatetime", "dimensions", "customdimensions", "sum", "cardinality" ) from stdin binary;") at postgres.c:1086
#30 PostgresMain (argc=, argv=argv@entry=0x1898628, dbname=0x1898608 "measures", username=) at postgres.c:4074
#31 0x000000000046d06e in BackendRun (port=0x1880f70) at postmaster.c:4294
#32 BackendStartup (port=0x1880f70) at postmaster.c:3968
#33 ServerLoop () at postmaster.c:1719
#34 0x000000000066d362 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x185da40) at postmaster.c:1327
#35 0x000000000046e080 in main (argc=3, argv=0x185da40) at main.c:228

@erimatnor erimatnor self-assigned this Oct 10, 2017
@erimatnor
Copy link
Contributor

I believe this should be solved by #248

@min-mwei
Copy link
Author

@erimatnor, please feel free to close this as timescaledb has been stable for me for the past few days. Thanks!

@mfreed mfreed closed this as completed Oct 17, 2017
@mfreed mfreed added this to the 0.6.0 milestone Nov 21, 2017
syvb pushed a commit to syvb/timescaledb that referenced this issue Sep 8, 2022
244: `->` accessor r=JLockerman a=JLockerman

This PR adds `aggregate -> accessor()` to many aggregates.

This allows us to do things like
```SQL
SELECT counter_agg(ts, val)->with_bounds('[2020-01-01 00:00:00+00, 2020-01-01 00:02:00.001+00)')->extrapolated_delta('prometheus')
```
instead of
```SQL
SELECT extrapolated_delta(with_bounds(counter_agg(ts, val), '[2020-01-01 00:00:00+00, 2020-01-01 00:02:00.001+00)'), 'prometheus')
```

See the individual commits for more info.

Co-authored-by: Joshua Lockerman <josh@timescale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants