Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2yqd-0008KA-LA for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 13:18:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2yqb-000569-UV for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 13:18:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2yqb-00055z-Fj for pgsql-hackers@lists.postgresql.org; Thu, 20 Sep 2018 13:18:21 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2yqX-0007wb-Rq for pgsql-hackers@postgresql.org; Thu, 20 Sep 2018 13:18:20 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 42GHNQ21vkz3Dww; Thu, 20 Sep 2018 15:18:14 +0200 (CEST) Date: Thu, 20 Sep 2018 15:18:14 +0200 From: Christoph Berg To: Andres Freund , PostgreSQL Hackers Subject: Re: [patch] Support LLVM 7 Message-ID: <20180920131814.GC16897@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Andres Freund , PostgreSQL Hackers References: <20180912124517.GD24584@msg.df7cb.de> <20180912210338.h3vsss5lkuu26ua2@alap3.anarazel.de> <20180912210734.GB5666@msg.df7cb.de> <20180916074833.GB4707@msg.df7cb.de> <20180919222600.myk5nec6unhrj45k@alap3.anarazel.de> <20180920081044.GA16897@msg.df7cb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20180920081044.GA16897@msg.df7cb.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Re: To Andres Freund 2018-09-20 <20180920081044.GA16897@msg.df7cb.de> > > > 2018-09-15 10:49:25.052 UTC [26458] DETAIL: Failed process was runni= ng: SELECT '' AS tf_12, BOOLTBL1.*, BOOLTBL2.* > > > FROM BOOLTBL1, BOOLTBL2 > > > WHERE BOOLTBL2.f1 <> BOOLTBL1.f1; > > > 2018-09-15 10:49:25.052 UTC [26458] LOG: terminating any other activ= e server processes > >=20 > > Hm. Is there any chance to get a backtrace for this one? This could, > > although I think less likely so, also be a postgres issue > > (e.g. generating code for the wrong microarch). >=20 > I'll see if I can find a porterbox to get a backtrace. 32-bit powerpc, 11~beta3-2: postgres=3D# set jit =3D off; SET postgres=3D# SELECT postgres-# ARRAY(SELECT f.i FROM ( postgres(# (SELECT d + g.i FROM generate_series(4, 30, 3) d= ORDER BY 1) postgres(# UNION ALL postgres(# (SELECT d + g.i FROM generate_series(0, 30, 5) d= ORDER BY 1) postgres(# ) f(i) postgres(# ORDER BY f.i LIMIT 10) postgres-# FROM generate_series(1, 3) g(i); array ------------------------------ {1,5,6,8,11,11,14,16,17,20} {2,6,7,9,12,12,15,17,18,21} {3,7,8,10,13,13,16,18,19,22} (3 Zeilen) postgres=3D# set jit =3D on; SET postgres=3D# SELECT = = ARRAY(SELECT f.i FROM ( = (SELEC= T d + g.i FROM generate_series(4, 30, 3) d ORDER BY 1) = UNION ALL = = (SELECT d + g.i FROM generate_= series(0, 30, 5) d ORDER BY 1) = ) f(i) = = ORDER BY f.i LIMIT 10) = = FROM generate_series(1, 3) g(i); Program received signal SIGSEGV, Segmentation fault. 0xf4a20c18 in ?? () (gdb) bt f #0 0xf4a20c18 in ?? () No symbol table info available. #1 0xf4a20bc8 in ?? () No symbol table info available. #2 0xf4a41b90 in ExecRunCompiledExpr (state=3D0x1a7515c, econtext=3D0x1a73= dd0, isNull=3D0xffe17c2b) at ./build/../src/backend/jit/llvm/llvmjit_expr.c:2591 cstate =3D func =3D 0xf4a20b5c #3 0x00c2d39c in ExecEvalExprSwitchContext (isNull=3D0xffe17c2b, econtext= =3D, state=3D0x1a7515c) at ./build/../src/include/executor/executor.h:303 retDatum =3D oldContext =3D 0x19fe830 retDatum =3D oldContext =3D #4 ExecProject (projInfo=3D0x1a75158) at ./build/../src/include/executor/e= xecutor.h:337 econtext =3D state =3D 0x1a7515c slot =3D 0x1a750c0 isnull =3D 252 econtext =3D state =3D slot =3D isnull =3D #5 ExecScan (node=3D, accessMtd=3DaccessMtd@entry=3D0xc3ce5= 0 , recheckMtd=3DrecheckMtd@entry=3D0xc3cdf0 ) at ./build/= =2E./src/backend/executor/execScan.c:201 slot =3D econtext =3D qual =3D 0x0 projInfo =3D 0x1a75158 #6 0x00c3ce3c in ExecFunctionScan (pstate=3D) at ./build/..= /src/backend/executor/nodeFunctionscan.c:270 node =3D #7 0x00c2b280 in ExecProcNodeFirst (node=3D0x1a73d48) at ./build/../src/ba= ckend/executor/execProcnode.c:445 No locals. #8 0x00c23058 in ExecProcNode (node=3D0x1a73d48) at ./build/../src/include= /executor/executor.h:237 No locals. #9 ExecutePlan (execute_once=3D, dest=3D0x1a1c218, directio= n=3D, numberTuples=3D, sendTuples=3D, operation=3DCMD_SELECT, use_parallel_mode= =3D, planstate=3D0x1a73d48, estate=3D0x19fe8c0) at ./build/../src/backend/executor/execMain.c:1721 slot =3D current_tuple_count =3D 0 slot =3D current_tuple_count =3D #10 standard_ExecutorRun (queryDesc=3D0x1962250, direction=3D, count=3D, execute_once=3D) at ./build/../src/backend/executor/execMain.c:362 estate =3D 0x19fe8c0 operation =3D CMD_SELECT dest =3D 0x1a1c218 sendTuples =3D oldcontext =3D 0x19621c0 __func__ =3D "standard_ExecutorRun" #11 0x00c23284 in ExecutorRun (queryDesc=3DqueryDesc@entry=3D0x1962250, dir= ection=3Ddirection@entry=3DForwardScanDirection, count=3D, execute_once=3D) at ./build/../= src/backend/executor/execMain.c:305 No locals. #12 0x00dcd3a0 in PortalRunSelect (portal=3Dportal@entry=3D0x198d290, forwa= rd=3Dforward@entry=3Dtrue, count=3D0, count@entry=3D2147483647, dest=3Ddest@entry=3D0x1a1c218) at ./build/../src/backend/tcop/pquery.c:= 932 queryDesc =3D 0x1962250 direction =3D nprocessed =3D __func__ =3D "PortalRunSelect" #13 0x00dcee7c in PortalRun (portal=3Dportal@entry=3D0x198d290, count=3Dcou= nt@entry=3D2147483647, isTopLevel=3DisTopLevel@entry=3Dtrue, run_once=3Drun_once@entry=3Dtrue, dest=3Ddest@entry=3D0x1a1c218, altdes= t=3Daltdest@entry=3D0x1a1c218, completionTag=3DcompletionTag@entry=3D0xffe1800c ".\363W\223\307g0@") a= t ./build/../src/backend/tcop/pquery.c:773 save_exception_stack =3D 0xffe18160 save_context_stack =3D 0x0 local_sigjmp_buf =3D {{__jmpbuf =3D {-32516271, -1998838, 20072133,= 0, 0, -1998838, 26945520, 27378200, 19171432, 19171820, 2147483647, -1998836, 26483320, -1998836, 26792592, 2, 191718= 40, 26476288, 26792592, 19144432, 19171844, 671228962, 0 , -1, 27369928, 0, 0, -1, 0 }, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D { 15993932, 19161904, 671228488, 4292968320, 26456480, 191620= 12, 26800800, 4292968336, 15993932, 4292968460, 671228488, 26476288, 26476144, 19164812, 26800800, 4292968368, 1614688= 4, 19164812, 26483320, 4292968384, 16145016, 2, 0, 17767752, 26483304, 19087032, 2, 4292968400, 10863184, 19144432, 2, 4= 292968432}}}} result =3D nprocessed =3D saveTopTransactionResourceOwner =3D 0x1968a40 saveTopTransactionContext =3D 0x19b27f0 saveActivePortal =3D 0x0 saveResourceOwner =3D 0x1968a40 savePortalContext =3D 0x0 saveMemoryContext =3D 0x19b27f0 __func__ =3D "PortalRun" #14 0x00dca4ec in exec_simple_query ( query_string=3D0x193ff00 "SELECT\n", ' ' , "ARRAY(SEL= ECT f.i FROM (\n", ' ' , "(SELECT d + g.i FROM generate_s= eries(4, 30, 3) d ORDER BY 1)\n", ' ' , "UNION ALL\n", ' = ' , "(SELECT d + g.i FROM generate_series(0"...) at ./bui= ld/../src/backend/tcop/postgres.c:1122 parsetree =3D 0x1941a50 portal =3D 0x198d290 snapshot_set =3D commandTag =3D completionTag =3D ".\363W\223\307g0@\000\307sl\000\000\000\002\000\= 000\000\000\000\000\000\002\000\000\000\001\001$\211\374\001\226n8\377\341\= 201\060\001\223\377\000\001$fh\000\000\001>\377\341\200`\000\364\264$\001$\= 211", querytree_list =3D plantree_list =3D receiver =3D 0x1a1c218 format =3D 61 dest =3D DestRemote oldcontext =3D 0x19b27f0 parsetree_list =3D 0x1941a78 parsetree_item =3D 0x1941a68 save_log_statement_stats =3D was_logged =3D false use_implicit_block =3D msec_str =3D ".\363W\223\307g0@\000\307sl\000\000\000\002\000\000\0= 00\000\000\000\000\002\000\000\000\001\001$\211", __func__ =3D "exec_simple_query" #15 0x00dcbfcc in PostgresMain (argc=3D, argv=3Dargv@entry= =3D0x1966e38, dbname=3D, username=3D) at ./build/../src/backend/tcop/postgres.c:4153 query_string =3D 0x193ff00 "SELECT\n", ' ' , "ARR= AY(SELECT f.i FROM (\n", ' ' , "(SELECT d + g.i FROM gene= rate_series(4, 30, 3) d ORDER BY 1)\n", ' ' , "UNION ALL\= n", ' ' , "(SELECT d + g.i FROM generate_series(0"... firstchar =3D 81 input_message =3D { data =3D 0x193ff00 "SELECT\n", ' ' , "ARRAY(SEL= ECT f.i FROM (\n", ' ' , "(SELECT d + g.i FROM generate_s= eries(4, 30, 3) d ORDER BY 1)\n", ' ' , "UNION ALL\n", ' = ' , "(SELECT d + g.i FROM generate_series(0"..., len =3D = 318, maxlen =3D 1024, cursor =3D 318} local_sigjmp_buf =3D {{__jmpbuf =3D {-32560447, 14233748, 20054449,= 26609600, 19171644, 19545576, -1997596, 19545448, -1997608, 1537449090, 5, 1537449152, 0, 19171028, 1, 19171836, 26635832= , 26635632, 19171840, 19143524, 19171836, 671097412, 0 , -1, 0 }, __mask_was_s= aved =3D 1, __saved_mask =3D {__val =3D {0, 0, 4, 4292971016, 15, 0, 4292971016, 4292969328, 0, 0, 4294967295, 0, 0, 19171648= , 4294967295, 19171644, 224, 19143524, 26626880, 4292969360, 13022924, 0, 4294967295, 0, 80, 4150968980, 26626880, 0, 13= 023288, 0, 0, 4292969424}}}} send_ready_for_query =3D false disable_idle_in_transaction_timeout =3D false __func__ =3D "PostgresMain" #16 0x00d35ebc in BackendRun (port=3D0x1964b40) at ./build/../src/backend/p= ostmaster/postmaster.c:4361 ac =3D 1 secs =3D 590764407 usecs =3D 199338 i =3D 1 av =3D 0x1966e38 maxac =3D av =3D maxac =3D ac =3D secs =3D usecs =3D i =3D __func__ =3D "BackendRun" #17 BackendStartup (port=3D0x1964b40) at ./build/../src/backend/postmaster/= postmaster.c:4033 bn =3D 0x19607c0 pid =3D bn =3D pid =3D __func__ =3D "BackendStartup" save_errno =3D #18 ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1706 port =3D 0x1964b40 i =3D rmask =3D {fds_bits =3D {16, 0 }} selres =3D now =3D readmask =3D {fds_bits =3D {24, 0 }} nSockets =3D 5 last_lockfile_recheck_time =3D 1537449152 last_touch_time =3D 1537449090 __func__ =3D "ServerLoop" #19 0x00d36bdc in PostmasterMain (argc=3D, argv=3D) at ./build/../src/backend/postmaster/postmaster.c:1379 opt =3D status =3D userDoption =3D listen_addr_saved =3D i =3D output_config_variable =3D __func__ =3D "PostmasterMain" #20 0x00a4e050 in main (argc=3D5, argv=3D0x193b0e0) at ./build/../src/backe= nd/main/main.c:228 No locals. Christoph