Coredump with text search dictionary

Поиск
Список
Период
Сортировка
От Japin Li
Тема Coredump with text search dictionary
Дата
Msg-id MEYP282MB16690107AAF04EBB3B9AADD8B6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: Coredump with text search dictionary  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
When attempting use text search, here is a core dump
(reported from my friend, Song Jinzhou).

CREATE TEXT SEARCH TEMPLATE public.my_ts_template (
  init = varchar_support,
  lexize = dispell_lexize
);

CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (
  template = public.my_ts_template
);

server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.

Here is backtrace:

#0  0x00005605671bce72 in varchar_support (fcinfo=0x7ffd0c87a070)
    at /home/japin/Codes/postgresql/build/../src/backend/utils/adt/varchar.c:565
#1  0x0000560567205842 in FunctionCall1Coll (flinfo=0x7ffd0c87a0d0, collation=0, arg1=0)
    at /home/japin/Codes/postgresql/build/../src/backend/utils/fmgr/fmgr.c:1124
#2  0x000056056720675d in OidFunctionCall1Coll (functionId=3097, collation=0, arg1=0)
    at /home/japin/Codes/postgresql/build/../src/backend/utils/fmgr/fmgr.c:1402
#3  0x0000560566d650ad in verify_dictoptions (tmplId=24576, dictoptions=0x0)
    at /home/japin/Codes/postgresql/build/../src/backend/commands/tsearchcmds.c:381
#4  0x0000560566d652d1 in DefineTSDictionary (names=0x5605678ad4d8, parameters=0x5605678ad720)
    at /home/japin/Codes/postgresql/build/../src/backend/commands/tsearchcmds.c:442
#5  0x0000560567042a96 in ProcessUtilitySlow (pstate=0x5605678cd940, pstmt=0x5605678adae8,
    queryString=0x5605678aca10 "CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (\n  template =
public.my_ts_template\n);",context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x5605678adbd8,
qc=0x7ffd0c87aa40)
    at /home/japin/Codes/postgresql/build/../src/backend/tcop/utility.c:1430
#6  0x0000560567041e84 in standard_ProcessUtility (pstmt=0x5605678adae8,
    queryString=0x5605678aca10 "CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (\n  template =
public.my_ts_template\n);",readOnlyTree=false, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0,
dest=0x5605678adbd8,
    qc=0x7ffd0c87aa40) at /home/japin/Codes/postgresql/build/../src/backend/tcop/utility.c:1074
#7  0x0000560567040dfe in ProcessUtility (pstmt=0x5605678adae8,
    queryString=0x5605678aca10 "CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (\n  template =
public.my_ts_template\n);",readOnlyTree=false, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0,
dest=0x5605678adbd8,
    qc=0x7ffd0c87aa40) at /home/japin/Codes/postgresql/build/../src/backend/tcop/utility.c:530
#8  0x000056056703f905 in PortalRunUtility (portal=0x56056791eed0, pstmt=0x5605678adae8, isTopLevel=true,
    setHoldSnapshot=false, dest=0x5605678adbd8, qc=0x7ffd0c87aa40)
    at /home/japin/Codes/postgresql/build/../src/backend/tcop/pquery.c:1158
#9  0x000056056703fb77 in PortalRunMulti (portal=0x56056791eed0, isTopLevel=true, setHoldSnapshot=false,
    dest=0x5605678adbd8, altdest=0x5605678adbd8, qc=0x7ffd0c87aa40)
    at /home/japin/Codes/postgresql/build/../src/backend/tcop/pquery.c:1315
#10 0x000056056703eff5 in PortalRun (portal=0x56056791eed0, count=9223372036854775807, isTopLevel=true,
    run_once=true, dest=0x5605678adbd8, altdest=0x5605678adbd8, qc=0x7ffd0c87aa40)
    at /home/japin/Codes/postgresql/build/../src/backend/tcop/pquery.c:791
#11 0x0000560567038332 in exec_simple_query (
    query_string=0x5605678aca10 "CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (\n  template =
public.my_ts_template\n);")at /home/japin/Codes/postgresql/build/../src/backend/tcop/postgres.c:1243
 
#12 0x000056056703ce29 in PostgresMain (dbname=0x5605678a7168 "postgres", username=0x5605678d8d18 "japin")
    at /home/japin/Codes/postgresql/build/../src/backend/tcop/postgres.c:4505
#13 0x0000560566f64bd0 in BackendRun (port=0x5605678d4c60)
    at /home/japin/Codes/postgresql/build/../src/backend/postmaster/postmaster.c:4491
#14 0x0000560566f644be in BackendStartup (port=0x5605678d4c60)
    at /home/japin/Codes/postgresql/build/../src/backend/postmaster/postmaster.c:4219
#15 0x0000560566f60730 in ServerLoop ()
    at /home/japin/Codes/postgresql/build/../src/backend/postmaster/postmaster.c:1809
#16 0x0000560566f5fee1 in PostmasterMain (argc=1, argv=0x5605678a5120)
    at /home/japin/Codes/postgresql/build/../src/backend/postmaster/postmaster.c:1481
#17 0x0000560566e234d2 in main (argc=1, argv=0x5605678a5120)
    at /home/japin/Codes/postgresql/build/../src/backend/main/main.c:197

I found that variable dictoptions in  DefineTSDictionary() is NIL if we do not
provide any other options (expect template option), which leads the core-dump.

Here is a patch to fix this coredump.  Any thoughts?

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.


Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: foreign join error "variable not found in subplan target list"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Coredump with text search dictionary