ski0817 commented on issue #1466:
URL: https://github.com/apache/cloudberry/issues/1466#issuecomment-3766984072

   > [@behailu-gz](https://github.com/behailu-gz) can you provide version and 
configure options ?
   
   <img width="575" height="272" alt="Image" 
src="https://github.com/user-attachments/assets/eb30082e-f66b-4db2-808e-6c3c43b17877";
 />
   
   Hello,
   
   I encountered a PANIC with SIGSEGV in the interconnect send path and wanted 
to ask
   whether this could be related to compiler optimization options.
   
   The stack trace consistently shows a crash around:
     interconnect.so: SendChunkTCP
     interconnect.so: SendTupleChunkToAMS
     libpostgres: CheckAndSendRecordCache
   during ExecutorRun.
   
   This looks like a typical:
     "Unexpected internal error: Segment process received signal SIGSEGV"
   
   I am aware that similar issues can sometimes be caused by latent bugs
   (use-after-free, buffer lifetime, alignment, or race conditions)
   that only surface under aggressive compiler optimizations.
   
   In our environment, the binaries may have been built with options such as:
     -O3
     -ftree-vectorize
   (and possibly different flags compared to the default/recommended build).
   
   My question:
   - Are there any known Cloudberry / GPDB-related issues where SIGSEGV in the
     interconnect path was triggered or exposed by aggressive optimization 
flags?
   - Is -O2 (or disabling vectorization) the recommended/safest option for 
production
     builds to avoid such issues?
   - Have you seen similar reports where rebuilding with less aggressive 
optimization
     reduced or eliminated these crashes?
   
   Any guidance or references to related issues would be greatly appreciated.
   
   Thank you.
   
   bash-5.1$ pg_config
   BINDIR = /usr/local/cloudberry-db/bin
   DOCDIR = /usr/local/cloudberry-db/share/doc/postgresql
   HTMLDIR = /usr/local/cloudberry-db/share/doc/postgresql
   INCLUDEDIR = /usr/local/cloudberry-db/include
   PKGINCLUDEDIR = /usr/local/cloudberry-db/include/postgresql
   INCLUDEDIR-SERVER = /usr/local/cloudberry-db/include/postgresql/server
   LIBDIR = /usr/local/cloudberry-db/lib
   PKGLIBDIR = /usr/local/cloudberry-db/lib/postgresql
   LOCALEDIR = /usr/local/cloudberry-db/share/locale
   MANDIR = /usr/local/cloudberry-db/share/man
   SHAREDIR = /usr/local/cloudberry-db/share/postgresql
   SYSCONFDIR = /usr/local/cloudberry-db/etc/postgresql
   PGXS = /usr/local/cloudberry-db/lib/postgresql/pgxs/src/makefiles/pgxs.mk
   CONFIGURE =  '--prefix=/usr/local/cloudberry-db' '--enable-external-fts' 
'--enable-ic-proxy' '--enable-openssl-redirect' '--enable-mapreduce' 
'--enable-orafce' '--enable-orca' '--enable-pxf' '--enable-tap-tests' 
'--with-gssapi' '--with-ldap' '--with-libxml' '--with-lz4' '--with-openssl' 
'--with-pam' '--with-perl' '--with-pgport=5432' '--with-python' 
'--with-pythonsrc-ext' '--with-ssl=openssl' 'CC=/usr/bin/cc' 'CFLAGS=-O3 
-ftree-vectorize -Wno-suggest-attribute=format -Wno-missing-prototypes 
-Wno-error=cast-function-type' 'LDFLAGS=-static-libgcc' 'CXX=/usr/bin/g++' 
'CXXFLAGS=-O3 -ftree-vectorize -Wno-suggest-attribute=format -Wno-error' 
'PERL=perl'
   CC = /usr/bin/cc
   CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2
   CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla 
-Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 
-Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv 
-fexcess-precision=standard -Wno-unused-but-set-variable 
-Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation 
-O3 -ftree-vectorize -Wno-suggest-attribute=format -Wno-missing-prototypes 
-Wno-error=cast-function-type -fPIC   -Werror=uninitialized 
-Werror=implicit-function-declaration -Werror
   CFLAGS_SL = -fPIC
   LDFLAGS = -static-libgcc -Wl,--as-needed 
-Wl,-rpath,'/usr/local/cloudberry-db/lib',--enable-new-dtags -Werror
   LDFLAGS_EX =
   LDFLAGS_SL =
   LIBS = -lpgcommon -lpgport -lxerces-c -llz4 -lbz2 -lxml2 -lpam -lrt -lssl 
-lcrypto -lgssapi_krb5 -luv -ljansson -lz -lreadline -lm  -lcurl -lzstd
   VERSION = PostgreSQL 14.4
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to