From nobody Sun Nov 24 15:46:35 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxCqw0H7fz5fH4Y for ; Sun, 24 Nov 2024 15:46:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxCqv3GkJz45Kg for ; Sun, 24 Nov 2024 15:46:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732463195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7YGyqOXxDKhP6iYxuoKHQam8pHQ1lzGGoJt2GyPGU3g=; b=aeV2VywQs5VXqrS5RFEiZmSWIyLzNSungUoeShBcNC1af+rwV1L2IkV08vkYMEmVV5inpC EH/hxXXHa7bpzN+7jxPRNI/lyG/agEY0nyv5KLae+0d/cf6OpAH6ohrabKij5t4ci9xDcx PySct1N/LudEudtZGnH0oNcapDI5EaJQtqUU5JXltRKi1Jbj3R+m7SBFVw3/qH3CWPzQ/H qf+SIhvpLkY0jyvQ1uom35P7Ygj61BqZSiuERYLRlNVk/hk0c5vd1lGiST8ufzUpINjYQb O8DPEWFARnbCicraDxX0hSQdv/BH7br5pRlOIvaHzIr9TJ+bh/9JAh55PH6KUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732463195; a=rsa-sha256; cv=none; b=JU4oIARTIpznkOOXEqR4EORjKF/DOzeUdmrYBP1GU5H0RBdLRprCB6kMag6LsVqJ6xZkME EoaS/Fa6XOrNZoJLsojmkZ6g+ah5EOvZA4IuWIm+TFc/vpplu8QU7TZWaPXbRkIEWDsE/D aTifjMyvIwUU91CIbymiGcRMoM8lL10+eSfQfSQ8iLL103c8R81hAMjmXggJVmEPta2EtK /nze+5h7ktvsOiC4+RI7o35Nz6iHs0oSTuMi8RAkBHa3hJF7xzmEAafiXbLQBOSGSr4gS6 HUbgs8wnWAGryi4gG9fWVbTWcHbC3+d8qIBHYtffjLmv06casmNZ+4StU6sW4w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxCqv2k7Qz113w for ; Sun, 24 Nov 2024 15:46:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4AOFkZCQ084905 for ; Sun, 24 Nov 2024 15:46:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4AOFkZ7W084904 for ports-bugs@FreeBSD.org; Sun, 24 Nov 2024 15:46:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 282948] databases/postgresql-ogr_fdw: postgresql17 server core dump on create materialized view of foreign table Date: Sun, 24 Nov 2024 15:46:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: d8zNeCFG@aon.at X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: lbartoletti@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282948 Bug ID: 282948 Summary: databases/postgresql-ogr_fdw: postgresql17 server core dump on create materialized view of foreign table Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: lbartoletti@FreeBSD.org Reporter: d8zNeCFG@aon.at Flags: maintainer-feedback?(lbartoletti@FreeBSD.org) Assignee: lbartoletti@FreeBSD.org Scenario: - FreeBSD stable/14 4e8444d5750a with minor local patches - ports latest - Installed databases/postgresql17-server, databases/postgis35, and databases/postgresql-ogr_fdw - Executing the following SQL commands via psql (database superuser only wh= ere necessary, otherwise as the normal user "martin"): # create extension postgis; # create extension ogr_fdw; # CREATE SERVER rijkswaterstaat FOREIGN DATA WRAPPER ogr_fdw OPTIONS (=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 datasource 'WFS:https://geo.rijkswaterstaat.nl/services/ogc/gdr/nwb_wegen/ows?service= =3DWFS&request=3Dgetcapabilities&version=3D2.0.0', format 'WFS'); # grant usage on foreign server rijkswaterstaat to martin; - change to normal user > select version(); version=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ---------------------------------------------------------------------------= ------------- PostgreSQL 17.2 on amd64-portbld-freebsd14.2, compiled by clang version 15.0.7, 64-bit (1 row) > select postgis_version(); postgis_version=20=20=20=20=20=20=20=20=20=20=20=20 --------------------------------------- 3.5 USE_GEOS=3D1 USE_PROJ=3D1 USE_STATS=3D1 (1 row) > select ogr_fdw_version(); ogr_fdw_version=20=20=20=20=20=20=20 ----------------------------- OGR_FDW=3D"1.1" GDAL=3D"3.10.0" (1 row) martin=3D>=20 > create schema rijkswaterstaat; > set search_path to "$user", public, rijkswaterstaat; > import foreign schema ogr_all from server rijkswaterstaat into rijkswater= staat; > \d List of relations Schema | Name | Type | Owner= =20=20=20 -----------------+--------------------------------+---------------+--------= -- public | geography_columns | view | postgres public | geometry_columns | view | postgres public | spatial_ref_sys | table | postgres rijkswaterstaat | nwb_wegen_hectopunten | foreign table | martin rijkswaterstaat | nwb_wegen_mutaties_hectopunten | foreign table | martin rijkswaterstaat | nwb_wegen_mutaties_wegvakken | foreign table | martin rijkswaterstaat | nwb_wegen_nwb_light | foreign table | martin rijkswaterstaat | nwb_wegen_wegvakken | foreign table | martin (8 rows) > create materialized view public.nwb_wegen_wegvakken_mat as select * from = rijkswaterstaat.nwb_wegen_wegvakken; 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. !?>=20 Result: - At this point the postgresql process serving the request dumps core - Running gdb: [0]# gdb /usr/local/bin/postgres postgres.core GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD] Copyright (C) 2024 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 "x86_64-portbld-freebsd14.2". 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"... Reading symbols from /usr/local/bin/postgres... (No debugging symbols found in /usr/local/bin/postgres) [New LWP 100757] Core was generated by `postgres: martin martin 192.168.1.19(42834) CREATE MATERIALIZED VIEW'. Program terminated with signal SIGSEGV, Segmentation fault. Address not mapped to object. #0 0x000000083053bdab in ?? () from /usr/local/lib/postgresql/ogr_fdw.so (gdb) where #0 0x000000083053bdab in ?? () from /usr/local/lib/postgresql/ogr_fdw.so #1 0x00000008305384af in ?? () from /usr/local/lib/postgresql/ogr_fdw.so #2 0x0000000000791e64 in ExecInitForeignScan () #3 0x000000000077ebef in ExecInitNode () #4 0x0000000000778003 in standard_ExecutorStart () #5 0x0000000000716634 in RefreshMatViewByOid () #6 0x00000000006ef961 in ExecCreateTableAs () #7 0x000000000094e5f7 in ?? () #8 0x000000000094d0c8 in standard_ProcessUtility () #9 0x000000000094c9f1 in ProcessUtility () #10 0x000000000094c5ff in ?? () #11 0x000000000094bddc in ?? () #12 0x000000000094b87f in PortalRun () #13 0x000000000094a899 in ?? () #14 0x00000000009483e9 in PostgresMain () #15 0x0000000000943c02 in BackendMain () #16 0x00000000008a7ad6 in postmaster_child_launch () #17 0x00000000008abcd6 in ?? () #18 0x00000000008a959a in PostmasterMain () #19 0x00000000007ce9f8 in main () (gdb)=20 - The postgres log contains the following: [0]# tail -20 /var/log/postgres.log ... (some older lines omitted) Nov 24 16:30:50 hal postgres[1085]: [7-1] 2024-11-24 16:30:50.390 CET [1085] LOG: server process (PID 26818) was terminated by signal 11: Segmentation fault Nov 24 16:30:50 hal postgres[1085]: [7-2] 2024-11-24 16:30:50.390 CET [1085] DETAIL: Failed process was running: create materialized view public.nwb_wegen_wegvakken_mat as select * from rijkswaterstaat.nwb_wegen_wegvakken; Nov 24 16:30:50 hal postgres[1085]: [8-1] 2024-11-24 16:30:50.390 CET [1085] LOG: terminating any other active server processes Nov 24 16:30:50 hal postgres[1085]: [9-1] 2024-11-24 16:30:50.392 CET [1085] LOG: all server processes terminated; reinitializing Nov 24 16:30:50 hal postgres[26820]: [10-1] 2024-11-24 16:30:50.447 CET [26= 820] LOG: database system was interrupted; last known up at 2024-11-24 16:24:08= CET Nov 24 16:30:50 hal postgres[26820]: [11-1] 2024-11-24 16:30:50.703 CET [26= 820] LOG: database system was not properly shut down; automatic recovery in progress Nov 24 16:30:50 hal postgres[26820]: [12-1] 2024-11-24 16:30:50.747 CET [26= 820] LOG: redo starts at 0/8E872518 Nov 24 16:30:55 hal postgres[26820]: [13-1] 2024-11-24 16:30:55.322 CET [26= 820] LOG: invalid magic number 0000 in WAL segment 00000001000000000000009C, LSN 0/9C430000, offset 4390912 Nov 24 16:30:55 hal postgres[26820]: [14-1] 2024-11-24 16:30:55.322 CET [26= 820] LOG: redo done at 0/9C42FF80 system usage: CPU: user: 1.82 s, system: 2.71= s, elapsed: 4.59 s Nov 24 16:30:55 hal postgres[26821]: [10-1] 2024-11-24 16:30:55.456 CET [26= 821] LOG: checkpoint starting: end-of-recovery immediate wait Nov 24 16:30:55 hal postgres[26821]: [11-1] 2024-11-24 16:30:55.913 CET [26= 821] LOG: checkpoint complete: wrote 63 buffers (0.4%); 0 WAL file(s) added, 11 removed, 3 recycled; write=3D0.006 s, sync=3D0.301 s, total=3D0.466 s; sync= files=3D39, longest=3D0.009 s, average=3D0.008 s; distance=3D225014 kB, estimate=3D2250= 14 kB; lsn=3D0/9C430048, redo lsn=3D0/9C430048 Nov 24 16:30:55 hal postgres[1085]: [10-1] 2024-11-24 16:30:55.927 CET [108= 5] LOG: database system is ready to accept connections [0]#=20 - A very few times the "create materialized view" succeeded, but the "shape" column in this view would be empty. Expected result: - The "create materialized view" should succeed. Note: - In a setup on Windows 11 using PostgreSQL 16 (installed via EnterpriseDB), the operation works flawlessly. The following versions are installed: [0]% psql -h localhost world martin psql (16.2) Type "help" for help. > select version(); version ------------------------------------------------------------ PostgreSQL 16.2, compiled by Visual C++ build 1937, 64-bit (1 row) > select postgis_version(); postgis_version --------------------------------------- 3.4 USE_GEOS=3D1 USE_PROJ=3D1 USE_STATS=3D1 (1 row) > select ogr_fdw_version(); ogr_fdw_version ---------------------------- OGR_FDW=3D"1.1" GDAL=3D"3.7.1" (1 row) world=3D> \q [0]% -- Martin --=20 You are receiving this mail because: You are the assignee for the bug.=