Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIEmm-0007sZ-Bw for pgsql-general@arkaria.postgresql.org; Thu, 01 Nov 2018 15:21:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIEmk-0000ZP-73 for pgsql-general@arkaria.postgresql.org; Thu, 01 Nov 2018 15:21:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIEmj-0000Y4-MS for pgsql-general@lists.postgresql.org; Thu, 01 Nov 2018 15:21:25 +0000 Received: from mout.gmx.net ([212.227.17.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gIEmf-0000oh-IC for pgsql-general@lists.postgresql.org; Thu, 01 Nov 2018 15:21:24 +0000 Received: from hermes ([84.165.111.43]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M2WgT-1fSTTU1LYz-00sPfq for ; Thu, 01 Nov 2018 16:21:17 +0100 Received: from hermes ([84.165.111.43]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M2WgT-1fSTTU1LYz-00sPfq for ; Thu, 01 Nov 2018 16:21:17 +0100 Received: from ncq by hermes with local (Exim 4.91) (envelope-from ) id 1gIEmZ-0005wA-Uk for pgsql-general@lists.postgresql.org; Thu, 01 Nov 2018 16:21:15 +0100 Date: Thu, 1 Nov 2018 16:21:15 +0100 From: Karsten Hilbert To: pgsql-general@lists.postgresql.org Subject: Re: backend crash on DELETE, reproducible locally Message-ID: <20181101152115.GF2954@hermes.hilbert.loc> References: <20181101140216.GA2954@hermes.hilbert.loc> <20181101144257.GD2954@hermes.hilbert.loc> <20181101151133.GE2954@hermes.hilbert.loc> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: <20181101151133.GE2954@hermes.hilbert.loc> Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.10.1 (2018-07-13) Sender: X-Provags-ID: V03:K1:GXxgrfZiBLeNapSrUKVZSK2nXuYmnX3r7s1TW8SP++bWSWYYVlU zIc2ySphdoc7TPW+3rTIJIuW7ipxulRmSP8okkBgoBF15Yx+widPOxBeMefk44pFJ5n74cZ t4P1zaVrIMtHT8SOcGBjJK5rH4te+5kBcyNREd67pc41ajiSV8Cwuxy+4P5zsGKF0qNNFkL ieOAjDw3Wwo87J/DjlDcQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:dU7657uFfqA=:1uqUUji5eUCsUJZZ1uML0U aokq8tuc4CWGF6XPG6eyUM/lQjbge8z7NsuuDnjEvP7n+Ih/vPP25FcR46OziPeLowLVsc3Al Q2RBlWXO7SLqbpvF4NwCKlGi9FECUqOP1ffdihw66HGo7Slx47ebZbyofoIBLQ/EftoakKOAN HelDjYzLLnmXUxbNwPkPz09apECNzS1zq8JCp3bVZL4eHprxuBSIehBqc+tRM5jlLu/FRLDgD I/2+Z6QtUIP2MUNCU3V/ceYWhQQhEnhB99e4yO0CP9z7AMNVKTKsPaYwjYKlGQPpsVgAMY3aC Zp53XI+try/YrNYEFTvv3UF5+YrZv/3dnkJDaSMVqsPfOIan4beH3BunqDZR0dGJqQB0vyPe9 rLRKgZrpwY4w82TDKPYrmIa/aRtmq1dhCve5R0r4zjphhSDXg91OxZjm/hk2LaJ3PMkfc7oWG 1PsB85weamEqobpRcC32jEzoZ/g8SwZTLjavYuezOBK3MnXLSUGPbAFRnyjgbH1wmVaPFmnNI FwXN1yIj7wiXiXuTKgd3xe/sfmtKlziuJFj4CrBGCBgK6227VSFq9auBUsvBuwTXN3yaZZdqB Bs/76IKigy2a8icSsMjS16Y54qp/4276Yn47ECX93brdsMMaOa6zTjitVy3mm6u1sytFpbptt 3CcDsF0vCK8X8HS3hOC4kkE8v6I1ghBPAVVQnSlYIwLsHeryUCaoOsJTZaJqn0AD7T56wQ3sl ncIAGSUsxbg6dr0JCqYUrED2ICFEheFF21J25l5CzX4yw+VzsP+yy+wluDPaEbjqMNrdSbawD eul/E2RfmPyhjMnycmhvtF7NsTOzTfrRSeXR+BhubKsI1flpw0z8r3mEFwxvF4xIMAvmmpwzo WIfoX43WJDTf2+HhgR3LAseQnH3v4eNzZtY2IERf3bAmGmBJSaHQMiwxhP1GtX List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 01, 2018 at 04:11:33PM +0100, Karsten Hilbert wrote: >> Will attempt to get a stack trace ... Eventually, the stack trace (attached). Thanks for insights, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gdb.log" Script started on 2018-11-01 16:16:02+01:00 root@hermes:~/tmp/pg# gdb --pid=22367 --readnow GNU gdb (Debian 8.1-4+b1) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 22367 Reading symbols from /usr/lib/postgresql/11/bin/postgres...Reading symbols from /usr/lib/debug/.build-id/c0/e1914ba590a236d6ee6e9ccdf7bee87a5c00da.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug/.build-id/9b/6447528b2fffba536afc815a31304adde16f8b.debug...expanding to full symbols...done. expanding to full symbols...done. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Reading symbols from /usr/lib/i386-linux-gnu/libxml2.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libpam.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libssl.so.1.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libcrypto.so.1.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/librt.so.1...Reading symbols from /usr/lib/debug/.build-id/d1/de1cfe9b8c85c6195a28a26206906acd9083ff.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug/.build-id/65/c7a119514fa310ef4bd22bbf97f82b30511805.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug/.build-id/59/1fca8f9efd1964477652a51e7936f88ce15440.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libicui18n.so.60...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libicuuc.so.60...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libsystemd.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug/.build-id/a2/03af6935d5ab00f79fe12b4098d27d3f70c19f.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/.build-id/d3/4d111ccc131067fcbc126906e01374c678c06e.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /usr/lib/i386-linux-gnu/libicudata.so.60...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libz.so.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/liblzma.so.5...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libaudit.so.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libkrb5.so.3...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libk5crypto.so.3...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libcom_err.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libkrb5support.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libkeyutils.so.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libresolv.so.2...Reading symbols from /usr/lib/debug/.build-id/53/4400247b7b592cfa37bf02c98cf65dc76d3d14.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /usr/lib/i386-linux-gnu/liblber-2.4.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libsasl2.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libgnutls.so.30...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libstdc++.so.6...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libgcc_s.so.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/liblz4.so.1...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libgcrypt.so.20...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libcap-ng.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libp11-kit.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libidn2.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libunistring.so.2...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libtasn1.so.6...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libnettle.so.6...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libhogweed.so.4...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libgmp.so.10...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libgpg-error.so.0...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /usr/lib/i386-linux-gnu/libffi.so.6...expanding to full symbols...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/libnss_files.so.2...Reading symbols from /usr/lib/debug/.build-id/e3/be7847c1c1019f0d31ca1b90db318f686182b0.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libnss_compat.so.2...Reading symbols from /usr/lib/debug/.build-id/5e/b631bb92715d369cdfec79616788a8540b36b2.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libnss_nis.so.2...Reading symbols from /usr/lib/debug/.build-id/b6/4644711ae11946ba76b305ce1011f669db3bbe.debug...expanding to full symbols...done. expanding to full symbols...done. Reading symbols from /lib/i386-linux-gnu/libnsl.so.1...Reading symbols from /usr/lib/debug/.build-id/4f/deb6b2b96dfb1193dc79e1767de187eeef8516.debug...expanding to full symbols...done. expanding to full symbols...done. 0xb7ed7d39 in __kernel_vsyscall () (gdb) cont Continuing. Program received signal SIGSEGV, Segmentation fault. heap_attisnull (tup=0x0, attnum=5, tupleDesc=0xb2990ef4) at ./build/../src/backend/access/common/heaptuple.c:403 403 ./build/../src/backend/access/common/heaptuple.c: Datei oder Verzeichnis nicht gefunden. (gdb) thread apply all bt full Thread 1 (Thread 0xb4c429c0 (LWP 22367)): #0 heap_attisnull (tup=0x0, attnum=5, tupleDesc=0xb2990ef4) at ./build/../src/backend/access/common/heaptuple.c:403 __func__ = "heap_attisnull" #1 0x0087690d in ri_NullCheck (tupDesc=0xb2990ef4, tup=0x0, riinfo=0x2e1d548, rel_is_pk=true) at ./build/../src/backend/utils/adt/ri_triggers.c:2894 attnums = 0x2e1d5a4 i = 0 allnull = true nonenull = true #2 0x00879bf7 in RI_FKey_cascade_del (fcinfo=0xbfbda9e4) at ./build/../src/backend/utils/adt/ri_triggers.c:917 trigdata = 0xbfbdaca4 riinfo = 0x2e1d548 fk_rel = 0xb299d1dc pk_rel = 0xb2990ce4 old_row = 0x0 qkey = {constr_id = 3216878436, constr_queryno = 9517408} qplan = i = __func__ = "RI_FKey_cascade_del" #3 0x0063e8b2 in ExecCallTriggerFunc (trigdata=0xbfbdaca4, tgindx=0, finfo=, instr=0x0, per_tuple_context=0x2df47a0) at ./build/../src/backend/commands/trigger.c:2412 save_exception_stack = 0xbfbdae30 save_context_stack = 0x0 local_sigjmp_buf = {{__jmpbuf = {13223472, 13223472, 48187296, -1078088540, -692797736, 1781815719}, __mask_was_saved = 0, __saved_mask = {__val = {1, 5546693, 8091757, 47507332, 224, 8091673, 0, 2998600780, 13636800, 7917197, 13223472, 2998600780, 13636800, 47976380, 7925373, 13223472, 1, 3000602368, 1, 0, 179, 13635968, 400453582, 3216878084, 4294967295, 0, 13223472, 13409292, 3216878080, 47976380, 7924806, 3216878187}}}} fcinfo = {flinfo = 0x2d6724c, context = 0xbfbdaca4, resultinfo = 0x0, fncollation = 0, isnull = false, nargs = 0, arg = {5711397, 5647641, 13645520, 1663, 139580, 111088, 0, 5647590, 13223472, 5647682, 111088, 2996375020, 9580697, 9568578, 127858, 128767, 3029502376, 9568556, 2998600820, 47939524, 3000603476, 9569154, 127858, 47939524, 8065977, 13223472, 0, 6, 47613956, 7916444, 2998600816, 5, 47613956, 5236999, 7916359, 13223472, 3000602412, 5236926, 224, 0, 224, 224, 48080752, 1024, 9513769, 13223472, 47507332, 2998600780, 13407688, 9517076, 9517047, 13223472, 224, 7921538, 47507332, 224, 2998600780, 7921519, 5, 111088, 3000603476, 2255720704, 0, 0, 7921485, 224, 47613956, 13223472, 9513769, 13223472, 47507332, 2998600780, 13407688, 9517076, 9517047, 13223472, 224, 7921538, 47507332, 224, 2998600780, 7921519, 13645520, 224, 0, 2255720704, 7, 9565712, 7921485, 13223472, 47609244, 47613956, 47609244, 6749833, 224, 7, 6749305, 13223472, 6749703, 13223472}, argnull = {164, 116, 214, 2, 249, 196, 104, false, 156, 117, 214, 2, true, false, false, false, 156, 117, 214, 2, 240, 23, 206, false, 240, 23, 206, false, false, false, false, false, 117, 25, 13, 183, 201, 178, 144, false, 160, 71, 223, 2, 213, false, false, false, 192, 255, 200, false, 32, 109, 214, 2, 230, 99, 162, false, 92, 175, 189, 191, 155, 175, 189, 49, false, 145, 115, 134, 188, 172, 189, 191, 28, 172, 189, 191, 75, 100, 10, 183, false, 48, 35, 183, 188, 172, 189, 191, 28, 172, 189, 191, 201, 177, 144, false}} fcusage = {fs = 0x0, save_f_total_time = {tv_sec = -1266824476, tv_nsec = 4097}, save_total = {tv_sec = 10819056, tv_nsec = -2039246592}, f_start = { tv_sec = 47976380, tv_nsec = 47523260}} result = oldContext = 0x2d66d20 __func__ = "ExecCallTriggerFunc" #4 0x0063ffbc in AfterTriggerExecute (trigdesc=, trigdesc=, trig_tuple_slot2=, trig_tuple_slot1=, per_tuple_context=, instr=, finfo=, rel=, event=) at ./build/../src/backend/commands/trigger.c:4354 tgoid = LocTriggerData = {type = T_TriggerData, tg_event = 5, tg_relation = 0xb2990ce4, tg_trigtuple = 0x0, tg_newtuple = 0x0, tg_trigger = 0x2d66f7c, tg_trigtuplebuf = 0, tg_newtuplebuf = 0, tg_oldtable = 0x0, tg_newtable = 0x0} tuple2 = {t_len = 0, t_self = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 29828}, t_tableOid = 1, t_data = 0x1f} buffer1 = 0 tgindx = evtshared = tuple1 = {t_len = 7035346, t_self = {ip_blkid = {bi_hi = 29860, bi_lo = 726}, ip_posid = 65535}, t_tableOid = 4, t_data = 0x0} rettuple = buffer2 = 0 evtshared = tgoid = LocTriggerData = tuple1 = tuple2 = rettuple = buffer1 = buffer2 = tgindx = __func__ = "AfterTriggerExecute" fdw_tuplestore = #5 afterTriggerInvokeEvents (events=, firing_id=, estate=, delete_ok=) at ./build/../src/backend/commands/trigger.c:4545 evtshared = event = all_fired_in_chunk = true all_fired = chunk = per_tuple_context = local_estate = rel = trigdesc = finfo = instr = slot1 = slot2 = __func__ = "afterTriggerInvokeEvents" #6 0x00645d58 in AfterTriggerEndQuery (estate=0x2d66dac) at ./build/../src/backend/commands/trigger.c:4855 firing_id = oldtail = 0x2dda7fc qs = 0x2db81bc #7 0x00665c81 in standard_ExecutorFinish (queryDesc=0x2d47f1c) at ./build/../src/backend/executor/execMain.c:439 estate = 0x2d66dac oldcontext = 0x2d47e90 #8 0x007c39ad in ProcessQuery (plan=, sourceText=, params=0x0, queryEnv=0x0, dest=0x2d5ff7c, completionTag=0xbfbdaf5c "DELETE 1") at ./build/../src/backend/tcop/pquery.c:205 queryDesc = 0x2d47f1c #9 0x007c3baf in PortalRunMulti (portal=0x2d96f9c, isTopLevel=true, setHoldSnapshot=false, dest=0x2d5ff7c, altdest=0x2d5ff7c, completionTag=0xbfbdaf5c "DELETE 1") at ./build/../src/backend/tcop/pquery.c:1286 pstmt = 0x2d60644 active_snapshot_set = true stmtlist_item = 0x2d606cc #10 0x007c4784 in PortalRun (portal=0x2d96f9c, count=2147483647, isTopLevel=true, run_once=true, dest=0x2d5ff7c, altdest=0x2d5ff7c, completionTag=0xbfbdaf5c "DELETE 1") at ./build/../src/backend/tcop/pquery.c:799 save_exception_stack = 0xbfbdb0d0 save_context_stack = 0x0 local_sigjmp_buf = {{__jmpbuf = {13223472, 1, 47804316, 13223472, -692150568, 1432920487}, __mask_was_saved = 0, __saved_mask = {__val = {47228268, 3602472664, 1432431527, 0, 47812524, 11042853, 11042853, 13223472, 9383301, 47812524, 11042853, 2817148525, 13223472, 60, 47804316, 47225216, 9505010, 47225216, 60, 47804316, 9508318, 47812524, 11042853, 9504969, 13223472, 2, 47804316, 47228268, 5047627, 60, 47939500, 0}}}} result = nprocessed = saveTopTransactionResourceOwner = 0x2d78564 saveTopTransactionContext = 0x2db7f20 saveActivePortal = 0x0 saveResourceOwner = 0x2d78564 savePortalContext = 0x0 saveMemoryContext = 0x2db7f20 __func__ = "PortalRun" #11 0x007bfec9 in exec_simple_query (query_string=0x2d09a0c "DELETE FROM ref.auto_hint WHERE title = 'Kontrai --f2QGlHpHGjS2mn6Y--