pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
segmentation fault
32+ messages / 13 participants
[nested] [flat]

* segmentation fault
@ 2005-03-09 17:28 marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
  2005-03-09 17:48 ` Re: segmentation fault Lonni J Friedman <netllama@gmail.com>
  0 siblings, 1 reply; 32+ messages in thread

From: marcelo Cortez @ 2005-03-09 17:28 UTC (permalink / raw)
  To: pgsql-general


hello to all
 I have the following problem, when making massive
update of a table, I received the message
"segmentation fault" without no other data of the
error in log.
 Some idea of because it gives east message? 
I am using 
gentoo 
postgres 7.4.6
 dual  processor HP proliant 
   5 gigabyte of ram 
  147   gigabytes of hd.
  47  free .

BTW  the column to update is the one of indice gist of
FTS and the table has 22 million registries.
any clue?
best regards 
  MDC


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
  2005-03-09 17:28 segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
@ 2005-03-09 17:48 ` Lonni J Friedman <netllama@gmail.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Lonni J Friedman @ 2005-03-09 17:48 UTC (permalink / raw)
  To: marcelo Cortez <jmdc_marcelo@yahoo.com.ar>; +Cc: pgsql-general

On Wed, 9 Mar 2005 14:28:55 -0300 (ART), marcelo Cortez
<jmdc_marcelo@yahoo.com.ar> wrote:
> 
> hello to all
>  I have the following problem, when making massive
> update of a table, I received the message
> "segmentation fault" without no other data of the
> error in log.
>  Some idea of because it gives east message?
> I am using
> gentoo
> postgres 7.4.6
>  dual  processor HP proliant
>    5 gigabyte of ram
>   147   gigabytes of hd.
>   47  free .
> 
> BTW  the column to update is the one of indice gist of
> FTS and the table has 22 million registries.
> any clue?

You're doing this from within psql or elsewhere?  What logging level
are you using?  How 'massive' is this update?  What kind of parameters
have you set for this database?


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@gmail.com
LlamaLand                       http://netllama.linux-sxs.org



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
@ 2005-03-09 19:22 marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
  2005-03-09 19:28 ` Re: segmentation fault Lonni J Friedman <netllama@gmail.com>
  0 siblings, 1 reply; 32+ messages in thread

From: marcelo Cortez @ 2005-03-09 19:22 UTC (permalink / raw)
  To: Lonni J Friedman <netllama@gmail.com>; +Cc: pgsql-general

Lonni , folks 

configuration data: sorry for long response ;)


Linux sume 2.6.9-gentoo-r1 #1 SMP Mon Feb 21 10:46:46
Local time zone 
must
be set--see zic  i686 Intel(R) Xeon(TM) CPU 2.80GHz
GenuineIntel 
GNU/Linux

postgres:
"PostgreSQL 7.4.5 on i686-pc-linux-gnu, compiled by
GCC gcc (GCC) 3.3.4
20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2,
pie-8.7.6)"

postgresql.conf:

# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
#   name = value
#
# (The '=' is optional.) White space may be used.
Comments are 
introduced
# with '#' anywhere on a line. The complete list of
option names and #
allowed values can be found in the PostgreSQL
documentation. The #
commented-out settings shown in this file represent
the default values. 
#
# Any option can also be given as a command line
switch to the
# postmaster, e.g. 'postmaster -c log_connections=on'.
Some options # 
can
be changed at run-time with the 'SET' SQL command.
#
# This file is read on postmaster startup and when the
postmaster
# receives a SIGHUP. If you edit the file on a running
system, you have 
#
to SIGHUP the postmaster for the changes to take
effect, or use
# "pg_ctl reload".


#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------

# - Connection Settings -

#tcpip_socket = false
max_connections = 100
        # note: increasing max_connections costs about
500 bytes of 
shared
# memory per connection slot, in addition to costs
from
shared_buffers # and max_locks_per_transaction.
#superuser_reserved_connections = 2
#port = 5432
#unix_socket_directory = ''
#unix_socket_group = ''
#unix_socket_permissions = 0777 # octal
#virtual_host = ''              # what interface to
listen on; defaults 
to
any #rendezvous_name = ''           # defaults to the
computer name

# - Security & Authentication -

#authentication_timeout = 60    # 1-600, in seconds
#ssl = false
#password_encryption = true
#krb_server_keyfile = ''
#db_user_namespace = false


#---------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#---------------------------------------------------------------------------

# - Memory -

shared_buffers = 8192           # min 16, at least
max_connections*2, 
8KB
each sort_mem = 8192                 # min 64, size in
KB
#vacuum_mem = 8192              # min 1024, size in KB

# - Free Space Map -

#max_fsm_pages = 20000          # min
max_fsm_relations*16, 6 bytes 
each
#max_fsm_relations = 1000       # min 100, ~50 bytes
each

# - Kernel Resource Usage -

#max_files_per_process = 1000   # min 25
#preload_libraries = ''


#---------------------------------------------------------------------------
# WRITE AHEAD LOG
#---------------------------------------------------------------------------

# - Settings -

fsync = false                   # turns forced
synchronization on or 
off
#wal_sync_method = fsync        # the default varies
across platforms:
                                # fsync, fdatasync,
open_sync, or
open_datasync
wal_buffers = 40                # min 4, 8KB each

# - Checkpoints -

checkpoint_segments = 9         # in logfile segments,
min 1, 16MB each
#checkpoint_timeout = 300       # range 30-3600, in
seconds
#checkpoint_warning = 30        # 0 is off, in seconds
#commit_delay = 0               # range 0-100000, in
microseconds
#commit_siblings = 5            # range 1-1000


#---------------------------------------------------------------------------
# QUERY TUNING
#---------------------------------------------------------------------------

# - Planner Method Enabling -

#enable_hashagg = true
#enable_hashjoin = true
#enable_indexscan = true
#enable_mergejoin = true
#enable_nestloop = true
#enable_seqscan = true
#enable_sort = true
#enable_tidscan = true

# - Planner Cost Constants -

effective_cache_size = 4000     # typically 8KB each
#random_page_cost = 4           # units are one
sequential page fetch 
cost
#cpu_tuple_cost = 0.01          # (same)
#cpu_index_tuple_cost = 0.001   # (same)
#cpu_operator_cost = 0.0025     # (same)

# - Genetic Query Optimizer -

#geqo = true
#geqo_threshold = 11
#geqo_effort = 1
#geqo_generations = 0
#geqo_pool_size = 0             # default based on
tables in statement,
                                # range 128-1024
#geqo_selection_bias = 2.0      # range 1.5-2.0

# - Other Planner Options -

#default_statistics_target = 10 # range 1-1000
#from_collapse_limit = 8
#join_collapse_limit = 8        # 1 disables
collapsing of explicit 
JOINs


#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Syslog -

#syslog = 0                     # range 0-2; 0=stdout;
1=both; 2=syslog
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'

# - When to Log -

#client_min_messages = notice   # Values, in order of
decreasing 
detail:
                                #   debug5, debug4,
debug3, debug2,
debug1, #   log, info, notice, warning,
error

#log_min_messages = debug5      # Values, in order of
decreasing 
detail:
                                #   debug5, debug4,
debug3, debug2,
debug1, #   info, notice, warning, error,
log, fatal, #   panic

#log_error_verbosity = verbose   # terse, default, or
verbose messages

#log_min_error_statement = panic # Values in order of
increasing 
severity:
                                 #   debug5, debug4,
debug3, debug2,
debug1, #   info, notice, warning, error,
panic(off)

#log_min_duration_statement = -1 # Log all statements
whose
                                 # execution time
exceeds the value, in 
#
milliseconds.  Zero prints all queries. #
Minus-one disables.

#silent_mode = false             # DO NOT USE without
Syslog!

# - What to Log -

debug_print_parse = true
debug_print_rewritten = true
debug_print_plan = true
debug_pretty_print = true
log_connections = true
log_duration = true
log_pid = true
log_statement = true
log_timestamp = true
log_hostname = true
log_source_port = true


#---------------------------------------------------------------------------
# RUNTIME STATISTICS
#---------------------------------------------------------------------------

# - Statistics Monitoring -

#log_parser_stats = false
#log_planner_stats = false
#log_executor_stats = false
#log_statement_stats = false

# - Query/Index Statistics Collector -

#stats_start_collector = true
#stats_command_string = false
#stats_block_level = false
#stats_row_level = false
#stats_reset_on_server_start = true


#---------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#---------------------------------------------------------------------------

# - Statement Behavior -

#search_path = '$user,public'   # schema names
#check_function_bodies = true
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = false
#statement_timeout = 0          # 0 is disabled, in
milliseconds

# - Locale and Formatting -


#datestyle = 'iso, mdy'
#timezone = unknown             # actually, defaults
to TZ environment
setting #australian_timezones = false
#extra_float_digits = 0         # min -15, max 2
#client_encoding = sql_ascii    # actually, defaults
to database 
encoding

# These settings are initialized by initdb -- they may
be changed
lc_messages = 'C'               # locale for system
error message 
strings
lc_monetary = 'C'               # locale for monetary
formatting
lc_numeric = 'C'                # locale for number
formatting
lc_time = 'C'                   # locale for time
formatting

# - Other Defaults -

#explain_pretty_print = true
#dynamic_library_path = '$libdir'
#max_expr_depth = 10000         # min 10


#---------------------------------------------------------------------------
# LOCK MANAGEMENT
#---------------------------------------------------------------------------

#deadlock_timeout = 1000        # in milliseconds
#max_locks_per_transaction = 64 # min 10,
~260*max_connections bytes 
each


#---------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#---------------------------------------------------------------------------

# - Previous Postgres Versions -

#add_missing_from = true
#regex_flavor = advanced        # advanced, extended,
or basic
#sql_inheritance = true

# - Other Platforms & Clients -

#transform_null_equals = false




machine:


processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2785.226
cache size      : 512 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8
apic sep mtrr pge 
mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
ht tm pbe cid xtpr
bogomips        : 5488.64


processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2785.226
cache size      : 512 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8
apic sep mtrr pge 
mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
ht tm pbe cid xtpr
bogomips        : 5488.64

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2785.226
cache size      : 512 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8
apic sep mtrr pge 
mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
ht tm pbe cid xtpr
bogomips        : 5488.64

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2785.226
cache size      : 512 KB
physical id     : 0
siblings        : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8
apic sep mtrr pge 
mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
ht tm pbe cid xtpr
bogomips        : 5488.64


memory:

             total       used       free     shared   
buffers     
cached
Mem:       4933972    4930596       3376          0   
  51848    
4318812
-/+ buffers/cache:     559936    4374036
Swap:      1003656      24800     978856

 


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
  2005-03-09 19:22 Re: segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
@ 2005-03-09 19:28 ` Lonni J Friedman <netllama@gmail.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Lonni J Friedman @ 2005-03-09 19:28 UTC (permalink / raw)
  To: marcelo Cortez <jmdc_marcelo@yahoo.com.ar>; +Cc: pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
@ 2005-03-09 19:26 marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
  2005-03-09 19:31 ` Re: segmentation fault Lonni J Friedman <netllama@gmail.com>
  0 siblings, 1 reply; 32+ messages in thread

From: marcelo Cortez @ 2005-03-09 19:26 UTC (permalink / raw)
  To: Lonni J Friedman <netllama@gmail.com>; +Cc: pgsql-general

Lonni , folks 

> 
> You're doing this from within psql or elsewhere? 
  from putty terminal from windows statiom
> What logging level
 default i' guest 
> are you using?  How 'massive' is this update? 
 full , the update statement not have filter clause.
> kind of parameters
   the update statement call fts function.

> have you set for this database?
   next email y send this information.
 best regards 
  MDC
 


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
  2005-03-09 19:26 Re: segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
@ 2005-03-09 19:31 ` Lonni J Friedman <netllama@gmail.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Lonni J Friedman @ 2005-03-09 19:31 UTC (permalink / raw)
  To: marcelo Cortez <jmdc_marcelo@yahoo.com.ar>; +Cc: pgsql-general

On Wed, 9 Mar 2005 16:26:53 -0300 (ART), marcelo Cortez
<jmdc_marcelo@yahoo.com.ar> wrote:
> Lonni , folks
> 
> >
> > You're doing this from within psql or elsewhere?
>   from putty terminal from windows statiom

That doesn't really answer the question.  How are you interfacing with
the database?  Are you using a client, such as psql, or something
else?  putty just means that you're ssh'ing to the server, but once
you're there, how are you connecting to the DB and issuing this
update?

> > What logging level
>  default i' guest



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
@ 2005-03-09 20:18 marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
  0 siblings, 0 replies; 32+ messages in thread

From: marcelo Cortez @ 2005-03-09 20:18 UTC (permalink / raw)
  To: Lonni J Friedman <netllama@gmail.com>; +Cc: pgsql-general

Lonni , folks 
> Full meaning all the rows are being updated?  What
> kind of data is
> this that you're updating?

 the fts engine using one tsvector field indexing with
gist index

 the statement is something like this  
  update from veryLargeTable 
set field = to_tsvector( coleace(field1) );
any indication to improve the one configuration the
DB.
thanks for your support.
 best regards
  MDC



	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Segmentation Fault
@ 2006-08-16 11:59 Poul Møller Hansen <freebsd@pbnet.dk>
  2006-08-16 12:40 ` Re: Segmentation Fault Bill Moran <wmoran@collaborativefusion.com>
  2006-08-16 12:41 ` Re: Segmentation Fault Chris Mair <chrisnospam@1006.org>
  2006-08-16 14:31 ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 3 replies; 32+ messages in thread

From: Poul Møller Hansen @ 2006-08-16 11:59 UTC (permalink / raw)
  To: pgsql-general

Last night one of my databases broke down temporary because of a 
segmentation fault.
It has only happended this time and the database was fully recovered 
afterwards,
but I was wondering what I can do anything to prevent it from happening 
again

It happened while the backup was running (pg_dump & pgdumpall)
Here are some details from the logs etc.

The system is running Ubuntu Linux and I'm using the PostgreSQL package 
from the dapper repository:
uname -a
Linux db 2.6.15-26-amd64-server #1 SMP Fri Jul 7 20:02:26 UTC 2006 
x86_64 GNU/Linux

select version()
PostgreSQL 8.1.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.0.gcc-opt 
(GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

pgsql log
2006-08-16 00:38:22 CEST - LOG:  server process (PID 4792) was 
terminated by sig
nal 11
2006-08-16 00:38:22 CEST - LOG:  terminating any other active server 
processes
2006-08-16 00:38:22 CEST - WARNING:  terminating connection because of 
crash of
another server process
2006-08-16 00:38:22 CEST - DETAIL:  The postmaster has commanded this 
server pro
cess to roll back the current transaction and exit, because another 
server proce
ss exited abnormally and possibly corrupted shared memory.
2006-08-16 00:38:22 CEST - HINT:  In a moment you should be able to 
reconnect to
 the database and repeat your command.

DETAIL and HINT repeated for every connection

2006-08-16 00:38:23 CEST - LOG:  all server processes terminated; 
reinitializing
2006-08-16 00:38:23 CEST - LOG:  database system was interrupted at 
2006-08-16 0
0:36:21 CEST
2006-08-16 00:38:23 CEST - LOG:  checkpoint record is at 5/4F9FDC00
2006-08-16 00:38:23 CEST - LOG:  redo record is at 5/4F9B3558; undo 
record is at
 0/0; shutdown FALSE
2006-08-16 00:38:23 CEST - LOG:  next transaction ID: 5408607; next OID: 
30199
2006-08-16 00:38:23 CEST - LOG:  next MultiXactId: 1; next 
MultiXactOffset: 0
2006-08-16 00:38:23 CEST - LOG:  database system was not properly shut 
down; aut
omatic recovery in progress
2006-08-16 00:38:23 CEST - FATAL:  the database system is starting up
2006-08-16 00:38:23 CEST - LOG:  redo starts at 5/4F9B3558
2006-08-16 00:38:23 CEST - LOG:  record with zero length at 5/4FB63C18
2006-08-16 00:38:23 CEST - LOG:  redo done at 5/4FB63BE8
2006-08-16 00:38:26 CEST - LOG:  database system is ready
2006-08-16 00:38:26 CEST - LOG:  transaction ID wrap limit is 
1073864149, limite
d by database "db"

At 00:36:21 this was happening in the pgsql log
2006-08-16 00:36:21 CEST - LOG:  duration: 14673.110 ms  statement: 
EXECUTE <unn
amed>  [PREPARE:  select * from app.insert_unitstat($1,$2,$3,$4,$5,$6,$7,
$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)  as result]
2006-08-16 00:36:21 CEST - LOG:  duration: 8730.029 ms  statement: 
EXECUTE <unna
med>  [PREPARE:  select * from app.insert_unitstat($1,$2,$3,$4,$5,$6,$7,$
8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)  as result]
2006-08-16 00:36:21 CEST - LOG:  duration: 5982.330 ms  statement: 
EXECUTE <unna
med>  [PREPARE:  select * from app.insert_unitstat($1,$2,$3,$4,$5,$6,$7,$
8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)  as result]
2006-08-16 00:36:21 CEST - LOG:  duration: 10404.601 ms  statement: 
EXECUTE <unn
amed>  [PREPARE:  select * from app.insert_unitstat($1,$2,$3,$4,$5,$6,$7,
$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)  as result]

These statements are called in a plpgsql function and the function is 
called via JDBC
using postgresql-8.1-407.jdbc3.jar

dmesg
[2425253.737383] postmaster[4792]: segfault at 00002aaab6f0e000 rip 
00002aaaab73795b rsp 00007fffff8c9228 error 4


Any suggestions ?

Thanks,
 Poul





^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
@ 2006-08-16 12:40 ` Bill Moran <wmoran@collaborativefusion.com>
  2 siblings, 0 replies; 32+ messages in thread

From: Bill Moran @ 2006-08-16 12:40 UTC (permalink / raw)
  To: Poul Møller Hansen <freebsd@pbnet.dk>; +Cc: pgsql-general

In response to "Poul Møller Hansen" <freebsd@pbnet.dk>:

> Last night one of my databases broke down temporary because of a 
> segmentation fault.
> It has only happended this time and the database was fully recovered 
> afterwards,
> but I was wondering what I can do anything to prevent it from happening 
> again
> 
> It happened while the backup was running (pg_dump & pgdumpall)
> Here are some details from the logs etc.
> 
> The system is running Ubuntu Linux and I'm using the PostgreSQL package 
> from the dapper repository:
> uname -a
> Linux db 2.6.15-26-amd64-server #1 SMP Fri Jul 7 20:02:26 UTC 2006 
> x86_64 GNU/Linux
> 
> select version()
> PostgreSQL 8.1.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.0.gcc-opt 
> (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
> 
> pgsql log
> 2006-08-16 00:38:22 CEST - LOG:  server process (PID 4792) was 
> terminated by sig
> nal 11

Sig 11 are frequently the result of hardware problems.  Make sure the
system has enough cooling and consistent power.  Stress test the RAM, MMU,
and other components to ensure that they will function reliably under
load.

-- 
Bill Moran
Collaborative Fusion Inc.



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
@ 2006-08-16 12:41 ` Chris Mair <chrisnospam@1006.org>
  2006-08-16 13:37   ` Re: Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
  2 siblings, 1 reply; 32+ messages in thread

From: Chris Mair @ 2006-08-16 12:41 UTC (permalink / raw)
  To: Poul Møller Hansen <freebsd@pbnet.dk>; +Cc: pgsql-general


> dmesg
> [2425253.737383] postmaster[4792]: segfault at 00002aaab6f0e000 rip 
> 00002aaaab73795b rsp 00007fffff8c9228 error 4
> 
> 
> Any suggestions ?

Do you trust that machine's RAM?
Can you try running memtest86 for some extended period of time?

(just to make sure it's not a hardware issue)

Bye, Chris.


-- 

Chris Mair
http://www.1006.org





^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
  2006-08-16 12:41 ` Re: Segmentation Fault Chris Mair <chrisnospam@1006.org>
@ 2006-08-16 13:37   ` Poul Møller Hansen <freebsd@pbnet.dk>
  0 siblings, 0 replies; 32+ messages in thread

From: Poul Møller Hansen @ 2006-08-16 13:37 UTC (permalink / raw)
  To: Chris Mair <chrisnospam@1006.org>; +Cc: pgsql-general


>> dmesg
>> [2425253.737383] postmaster[4792]: segfault at 00002aaab6f0e000 rip 
>> 00002aaaab73795b rsp 00007fffff8c9228 error 4
>>
>>
>> Any suggestions ?
>>     
>
> Do you trust that machine's RAM?
> Can you try running memtest86 for some extended period of time?
>
> (just to make sure it's not a hardware issue)
>
>   
Well even that it's not cheap hardware one can never be sure that it's ok.
It's a production server, so I guess it has to be a night job...

Thanks,
 Poul




^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
@ 2006-08-16 14:31 ` Tom Lane <tgl@sss.pgh.pa.us>
  2006-08-16 15:20   ` Re: Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
  2 siblings, 1 reply; 32+ messages in thread

From: Tom Lane @ 2006-08-16 14:31 UTC (permalink / raw)
  To: Poul Møller Hansen <freebsd@pbnet.dk>; +Cc: pgsql-general

=?ISO-8859-1?Q?Poul_M=F8ller_Hansen?= <freebsd@pbnet.dk> writes:
> Last night one of my databases broke down temporary because of a 
> segmentation fault.

> At 00:36:21 this was happening in the pgsql log
> 2006-08-16 00:36:21 CEST - LOG:  duration: 14673.110 ms  statement: 
> EXECUTE <unn
> amed>  [PREPARE:  select * from app.insert_unitstat($1,$2,$3,$4,$5,$6,$7,
> $8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)  as result]
> ...
> These statements are called in a plpgsql function and the function is 
> called via JDBC

Given that you're using duration logging and JDBC, I wonder whether you
didn't trip over this recently-identified bug:
http://archives.postgresql.org/pgsql-hackers/2006-08/msg00815.php
Patch is here:
http://archives.postgresql.org/pgsql-committers/2006-08/msg00278.php

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
  2006-08-16 14:31 ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-08-16 15:20   ` Poul Møller Hansen <freebsd@pbnet.dk>
  2006-08-16 20:21     ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 32+ messages in thread

From: Poul Møller Hansen @ 2006-08-16 15:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general


> Given that you're using duration logging and JDBC, I wonder whether you
> didn't trip over this recently-identified bug:
> http://archives.postgresql.org/pgsql-hackers/2006-08/msg00815.php
> Patch is here:
> http://archives.postgresql.org/pgsql-committers/2006-08/msg00278.php
>   

Sorry but didn't, but I noticed this:

Also I must notice that the segfault only occur if
log_min_duration_statement is set to 0

It's currently 1000, so will the patch help ?


Regards, 
 Poul





^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
  2006-08-16 14:31 ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
  2006-08-16 15:20   ` Re: Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
@ 2006-08-16 20:21     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 32+ messages in thread

From: Tom Lane @ 2006-08-16 20:21 UTC (permalink / raw)
  To: Poul Møller Hansen <freebsd@pbnet.dk>; +Cc: pgsql-general

=?ISO-8859-1?Q?Poul_M=F8ller_Hansen?= <freebsd@pbnet.dk> writes:
>> Given that you're using duration logging and JDBC, I wonder whether you
>> didn't trip over this recently-identified bug:
>> http://archives.postgresql.org/pgsql-hackers/2006-08/msg00815.php
>> Patch is here:
>> http://archives.postgresql.org/pgsql-committers/2006-08/msg00278.php

> Sorry but didn't, but I noticed this:
> Also I must notice that the segfault only occur if
> log_min_duration_statement is set to 0

I don't believe that statement actually ... it might have chanced to act
that way in one or two trials for Sergey, but since the bug essentially
consists in access to already-freed-and-perhaps-reused memory, it's not
very predictable whether it will fail visibly or not.  In any case the
problem could occur for any duration-logging attempt.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Segmentation Fault
@ 2012-06-11 03:34 Benson Jin <benson.jin@troo.com>
  2012-06-11 07:49 ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
  2012-06-11 17:09 ` Re: Segmentation Fault Dickson S. Guedes <listas@guedesoft.net>
  0 siblings, 2 replies; 32+ messages in thread

From: Benson Jin @ 2012-06-11 03:34 UTC (permalink / raw)
  To: pgsql-general

Hi All, 


We are having a problem with our streaming replication read only node. It has crashed a few times with a couple of different reasons, mostly "segmentation fault". The latest log are listed below: 


2012-05-30 23:56:37.385 UTC::: LOG: server process (PID 19476) was terminated by signal 11: Segmentation fault 
2012-05-30 23:56:37.385 UTC::: LOG: terminating any other active server processes 
2012-05-30 23:56:37.385 UTC:10.43.6.61:webmaster:panorama WARNING: terminating connection because of crash of another server process 
2012-05-30 23:56:37.385 UTC:10.43.6.61:webmaster:panorama DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 
2012-05-30 23:56:37.385 UTC:10.43.6.61:webmaster:panorama HINT: In a moment you should be able to reconnect to the database and repeat your command. 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama WARNING: terminating connection because of crash of another server process 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama HINT: In a moment you should be able to reconnect to the database and repeat your command. 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama WARNING: terminating connection because of crash of another server process 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 
2012-05-30 23:56:37.385 UTC:10.43.6.81:webmaster:panorama HINT: In a moment you should be able to reconnect to the database and repeat your command. 
2012-05-30 23:56:37.575 UTC:10.43.6.81:webmaster:panorama FATAL: the database system is in recovery mode 




Our setup: 
2x physical server - Dell PE R815, 64GB ECC RAM, 2 CPUs (12 cores each), storing pgsql data on SAN backed volumes. 
CentOS 5.6 
PostgreSQL 9.0.8, compiled *without* int64 datetime. 
Both servers are identically configured (or at least as much as we could ensure) 
One is master, another is streaming read-only node. 
The master runs two instances of postgreSQL, where the slave runs 5 instances of postgreSQL. 2 out of 5 are streaming replication from the master, rest 3 are streaming replication from other DB nodes. Those 2 instances serves clients as Read Only. The master node never had any crash so far. However, the 2 instances on slave have crashed 3 times by now, 1 time on one readonly instance, twice on another readonly instance. Above log was generated from one of the instances. 


All three crashes happened when the database was doing vacuuming. we automatically purge some data every night, and run vacuum analyze right after that... Our the CPU load is generally on 40%-60% mark. 


I have run a complete set of hardware diagnostics on the slave , with no faulty hardware detected. Can someone kindly shed some lights on me? I am not sure where to look into at this point.... 




Cheers, 



Bo Jin 


Operating/IT Manager 
Troo Corporation [ www.troo.com ] 
43 Auriga Drive, Suite 102, Ottawa, ON K2E 7Y8 
Ph: +1 877.702.8766 x156 
Fax: +1 855.726.8766 

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
@ 2012-06-11 07:49 ` Craig Ringer <ringerc@ringerc.id.au>
  2012-06-11 17:24   ` Re: Segmentation Fault Benson Jin <benson.jin@troo.com>
  2012-06-11 19:15   ` Re: Segmentation Fault Benson Jin <benson.jin@troo.com>
  1 sibling, 2 replies; 32+ messages in thread

From: Craig Ringer @ 2012-06-11 07:49 UTC (permalink / raw)
  To: Benson Jin <benson.jin@troo.com>; +Cc: pgsql-general

On 06/11/2012 11:34 AM, Benson Jin wrote:
> Hi All,
>
> We are having a problem with our streaming replication read only node. 
> It has crashed a few times with a couple of different reasons, mostly 
> "segmentation fault".

Any chance of examining a core dump and getting a stack trace?

http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD

--
Craig Ringer

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
  2012-06-11 07:49 ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
@ 2012-06-11 17:24   ` Benson Jin <benson.jin@troo.com>
  1 sibling, 0 replies; 32+ messages in thread

From: Benson Jin @ 2012-06-11 17:24 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: pgsql-general

I will try produce one and submit to here. 

----- Original Message -----

From: "Craig Ringer" <ringerc@ringerc.id.au> 
To: "Benson Jin" <benson.jin@troo.com> 
Cc: pgsql-general@postgresql.org 
Sent: Monday, June 11, 2012 3:49:41 AM 
Subject: Re: [GENERAL] Segmentation Fault 


On 06/11/2012 11:34 AM, Benson Jin wrote: 



Hi All, 


We are having a problem with our streaming replication read only node. It has crashed a few times with a couple of different reasons, mostly "segmentation fault". 



Any chance of examining a core dump and getting a stack trace? 

http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD 

-- 
Craig Ringer 

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
  2012-06-11 07:49 ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
@ 2012-06-11 19:15   ` Benson Jin <benson.jin@troo.com>
  2012-06-12 07:40     ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
  1 sibling, 1 reply; 32+ messages in thread

From: Benson Jin @ 2012-06-11 19:15 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: pgsql-general

Hi All, 


A silly question.... how do I get install external symbols for postgresql, if compiled it myself previously? Do I recompile it with --enable-debug option? 


Cheers, 


Benson 

----- Original Message -----

From: "Craig Ringer" <ringerc@ringerc.id.au> 
To: "Benson Jin" <benson.jin@troo.com> 
Cc: pgsql-general@postgresql.org 
Sent: Monday, June 11, 2012 3:49:41 AM 
Subject: Re: [GENERAL] Segmentation Fault 


On 06/11/2012 11:34 AM, Benson Jin wrote: 



Hi All, 


We are having a problem with our streaming replication read only node. It has crashed a few times with a couple of different reasons, mostly "segmentation fault". 



Any chance of examining a core dump and getting a stack trace? 

http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD 

-- 
Craig Ringer 

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
  2012-06-11 07:49 ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
  2012-06-11 19:15   ` Re: Segmentation Fault Benson Jin <benson.jin@troo.com>
@ 2012-06-12 07:40     ` Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 0 replies; 32+ messages in thread

From: Craig Ringer @ 2012-06-12 07:40 UTC (permalink / raw)
  To: Benson Jin <benson.jin@troo.com>; +Cc: pgsql-general

On 06/12/2012 03:15 AM, Benson Jin wrote:
> Hi All,
>
> A silly question.... how do I get install external symbols for 
> postgresql, if compiled it myself previously? Do I recompile it with 
> --enable-debug option?

If you didn't strip the executable then the cores produced even without 
--enable-debug will be somewhat useful, but debug info is ideal. You 
could try that first, since it'll give you a chance to make sure you can 
at least get and analyse a core file before spending time recompiling 
and reinstalling Pg.

Recompiling with --enable-debug is the easy way to get executables with 
debug info embedded in them. If the installed libraries, etc haven't 
changed since compiling your original copy of PostgreSQL, and if you're 
compiling the EXACT same source code, you can debug the core against 
these executables without replacing the ones you're actually running. 
Something like a libc upgrade since the original copies were built might 
mean that the new debug executables are no longer exactly compatible 
with the ones your core file came from, though, so the results can't be 
totally trusted.

Ideally you want to run the debug executables and get the core to debug 
from them. An --enable-debug build on gcc will still be optimised and 
should have no detectable performance difference. The executables are 
huge, but the ELF sections containing the debug info never get mapped 
in, so it doesn't actually matter.

An alternative is to build with --enable-debug, strip the debug info 
into external symbols packages using "strip --only-keep-debug". There 
isn't much point unless disk space consumed by executables is a big 
concern, though.

I always use --enable-debug when building Pg. I rarely need the symbols, 
but it's handy to have them when I do.

--
Craig Ringer

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation Fault
  2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
@ 2012-06-11 17:09 ` Dickson S. Guedes <listas@guedesoft.net>
  1 sibling, 0 replies; 32+ messages in thread

From: Dickson S. Guedes @ 2012-06-11 17:09 UTC (permalink / raw)
  To: Benson Jin <benson.jin@troo.com>; +Cc: pgsql-general

2012/6/11 Benson Jin <benson.jin@troo.com>:
> Hi All,
>
> We are having a problem with our streaming replication read only node. It
> has crashed a few times with a couple of different reasons, mostly
> "segmentation fault". The latest log are listed below:
>
> 2012-05-30 23:56:37.385 UTC::: LOG:  server process (PID 19476) was
> terminated by signal 11: Segmentation fault
> 2012-05-30 23:56:37.385 UTC::: LOG:  terminating any other active server
> processes
> 2012-05-30 23:56:37.385 UTC:10.43.6.61:webmaster:panorama WARNING:
>  terminating connection because of crash of another server process


[... cut ...]


> Our setup:
> 2x physical server - Dell PE R815, 64GB ECC RAM, 2 CPUs (12 cores each),
>  storing pgsql data on SAN backed volumes.
> CentOS 5.6
> PostgreSQL 9.0.8, compiled *without* int64 datetime.
> Both servers are identically configured (or at least as much as we could
> ensure)


Did you compiled it from scratch e.g. make clean && make && make install?


[]s
-- 
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Segmentation fault
@ 2012-07-18 16:37 Amod Pandey <amod.pandey@zovi.com>
  2012-07-19 03:50 ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 1 reply; 32+ messages in thread

From: Amod Pandey @ 2012-07-18 16:37 UTC (permalink / raw)
  To: pgsql-general

Server stopped due to Segmentation Fault. Server was running successfully
for an year.

PostgreSQL: 9.0.3

from /var/log/messages

Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] postgres[6818]:
segfault at 170a8c6f ip 000000000044c94d sp 00007fff9fee5b80 error 4 in
postgres[400000+495000]

from pg log

LOG:  server process (PID 6818) was terminated by signal 11: Segmentation
fault
LOG:  terminating any other active server processes

Please suggest if there is a way to find out the issue.

Suggestions to avoid.

Regards
Amod

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2012-07-18 16:37 Segmentation fault Amod Pandey <amod.pandey@zovi.com>
@ 2012-07-19 03:50 ` Craig Ringer <ringerc@ringerc.id.au>
  2012-07-19 05:52   ` Re: Segmentation fault Amod Pandey <amod.pandey@zovi.com>
  0 siblings, 1 reply; 32+ messages in thread

From: Craig Ringer @ 2012-07-19 03:50 UTC (permalink / raw)
  To: Amod Pandey <amod.pandey@zovi.com>; +Cc: pgsql-general

On 07/19/2012 12:37 AM, Amod Pandey wrote:
> Server stopped due to Segmentation Fault. Server was running 
> successfully for an year.
>
> PostgreSQL: 9.0.3
>
> from /var/log/messages
>
> Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] 
> postgres[6818]: segfault at 170a8c6f ip 000000000044c94d sp 
> 00007fff9fee5b80 error 4 in postgres[400000+495000]
>
> from pg log
>
> LOG:  server process (PID 6818) was terminated by signal 11: 
> Segmentation fault
> LOG:  terminating any other active server processes
>
> Please suggest if there is a way to find out the issue.

Did the crash produce a core file ?

You haven't mentioned what Linux distro or kernel version you're on, and 
defaults vary. Look in your PostgreSQL datadir and see if there are any 
files with "core" in the name.

Unfortunately most Linux distros default to not producing core files. 
Without a core file it'll be nearly impossible because the segfault 
message reported by the kernel only contains the instruction pointer and 
stack pointer. The stack pointer is invalid and useless without a core 
file, and with address space layout randomisation active the instruction 
pointer offsets are all randomised for each execution, so the ip doesn't 
tell you much on ASLR systems either.

If you can show more of the PostgreSQL logs from around the incident 
that would possibly be helpful.

--
Craig Ringer

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2012-07-18 16:37 Segmentation fault Amod Pandey <amod.pandey@zovi.com>
  2012-07-19 03:50 ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
@ 2012-07-19 05:52   ` Amod Pandey <amod.pandey@zovi.com>
  2012-07-19 06:34     ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 1 reply; 32+ messages in thread

From: Amod Pandey @ 2012-07-19 05:52 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: pgsql-general

Thank you Craig for explaining in such a detail. I am adding more
information and would see what more I can add,

$ulimit -a
core file size          (blocks, -c) 0

So I assume there to be no core dump file.

If I set 'ulimit -c unlimited' will it generate core dump if there is
another occurrence. Do I need to restart postgres for this to take effect.

Linux distros
-------------------
Linux ip-xx-xx-xx-xx 2.6.35.11-83.9.amzn1.x86_64 #1 SMP Sat Feb 19 23:42:04
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I will see if there are queries which I can share.

Regards
Amod

On Thu, Jul 19, 2012 at 9:20 AM, Craig Ringer <ringerc@ringerc.id.au> wrote:

>  On 07/19/2012 12:37 AM, Amod Pandey wrote:
>
> Server stopped due to Segmentation Fault. Server was running successfully
> for an year.
>
> PostgreSQL: 9.0.3
>
> from /var/log/messages
>
> Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] postgres[6818]:
> segfault at 170a8c6f ip 000000000044c94d sp 00007fff9fee5b80 error 4 in
> postgres[400000+495000]
>
> from pg log
>
> LOG:  server process (PID 6818) was terminated by signal 11: Segmentation
> fault
> LOG:  terminating any other active server processes
>
> Please suggest if there is a way to find out the issue.
>
>
> Did the crash produce a core file ?
>
> You haven't mentioned what Linux distro or kernel version you're on, and
> defaults vary. Look in your PostgreSQL datadir and see if there are any
> files with "core" in the name.
>
> Unfortunately most Linux distros default to not producing core files.
> Without a core file it'll be nearly impossible because the segfault message
> reported by the kernel only contains the instruction pointer and stack
> pointer. The stack pointer is invalid and useless without a core file, and
> with address space layout randomisation active the instruction pointer
> offsets are all randomised for each execution, so the ip doesn't tell you
> much on ASLR systems either.
>
> If you can show more of the PostgreSQL logs from around the incident that
> would possibly be helpful.
>
> --
> Craig Ringer
>

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2012-07-18 16:37 Segmentation fault Amod Pandey <amod.pandey@zovi.com>
  2012-07-19 03:50 ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
  2012-07-19 05:52   ` Re: Segmentation fault Amod Pandey <amod.pandey@zovi.com>
@ 2012-07-19 06:34     ` Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 0 replies; 32+ messages in thread

From: Craig Ringer @ 2012-07-19 06:34 UTC (permalink / raw)
  To: Amod Pandey <amod.pandey@zovi.com>; +Cc: pgsql-general

On 07/19/2012 01:52 PM, Amod Pandey wrote:
> Thank you Craig for explaining in such a detail. I am adding more 
> information and would see what more I can add,
>
> $ulimit -a
> core file size          (blocks, -c) 0
>
> So I assume there to be no core dump file.
Quite likely. Limits are inherited down process trees, so there's no 
guarantee that PostgreSQL's ulimit also prevented core file generation. 
However I haven't seen any distro configure a non-zero ulimit for 
PostgreSQL or other system services explicitly, so it's pretty darn 
likely to be zero, though.

Just check for a core file in the PostgreSQL data dir. If there is one, 
the Pg ulimit obviously wasn't zero. If there isn't, then given that 
Pg's working directory is always the datadir, chances are the ulimit 
prevented a core dump.

>
> If I set 'ulimit -c unlimited' will it generate core dump if there is 
> another occurrence. Do I need to restart postgres for this to take effect.
You would need to put this command in the PostgreSQL startup scripts 
*then* restart PostgreSQL.

It can be easier to configure it globally for the server. How to do this 
depends a bit on your distro and version; Google will help - "enable 
core dumps <distro>" or "change ulimit <distro>" for example.

>
> Linux distros
> -------------------
> Linux ip-xx-xx-xx-xx 2.6.35.11-83.9.amzn1.x86_64 #1 SMP Sat Feb 19 
> 23:42:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
>
Um, that's not a distro, that's a kernel. I'm assuming it's an Amazon 
cloud hosted machine by the kernel, and since Ubuntu (and IIRC Debian) 
puts its name in the uname version string it's probably RHEL/CentOS/Fedora.

--
Craig Ringer

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Segmentation fault
@ 2014-03-04 11:03 ajay <akmani1987@gmail.com>
  2014-03-04 15:17 ` Re: Segmentation fault Tom Lane <tgl@sss.pgh.pa.us>
  2014-03-04 15:18 ` Re: Segmentation fault Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 32+ messages in thread

From: ajay @ 2014-03-04 11:03 UTC (permalink / raw)
  To: pgsql-general

hello team , 

i am trying to enter this insert command in postgres 
insert into mmsuper.notification 
values('101','12','13','حب|welcome|आपकास्वागतहै','bye','goodbye','low
balance',5);
now when i am trying to paste this in postgres in Solaris , it is giving me
error 

fm_db_Server1-# insert into mmsuper.notification 
values('101','12','13','Segmentation Fault

and comes out of postgres prompt....
also when i am trying to press up arrow key , then also it is giving me
above error.

But in Linux this is working fine ..without any error

Please help it is very very urgent..



Thanks
Akshat



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Segmentation-fault-tp5794571.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2014-03-04 11:03 Segmentation fault ajay <akmani1987@gmail.com>
@ 2014-03-04 15:17 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 32+ messages in thread

From: Tom Lane @ 2014-03-04 15:17 UTC (permalink / raw)
  To: ajay <akmani1987@gmail.com>; +Cc: pgsql-general

ajay <akmani1987@gmail.com> writes:
> hello team , 
> i am trying to enter this insert command in postgres 
> insert into mmsuper.notification 
> values('101','12','13','حب|welcome|आपकास्वागतहै','bye','goodbye','low
> balance',5);
> now when i am trying to paste this in postgres in Solaris , it is giving me
> error 

> fm_db_Server1-# insert into mmsuper.notification 
> values('101','12','13','Segmentation Fault

> and comes out of postgres prompt....
> also when i am trying to press up arrow key , then also it is giving me
> above error.

This suggests you've got a broken readline library.  Can you do the
paste successfully when psql is started with the --no-readline switch?
If so, you need to get a more up-to-date copy of libreadline and relink
psql against that.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2014-03-04 11:03 Segmentation fault ajay <akmani1987@gmail.com>
@ 2014-03-04 15:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
  2014-03-04 15:26   ` Re: Segmentation fault ajay <akmani1987@gmail.com>
  1 sibling, 1 reply; 32+ messages in thread

From: Adrian Klaver @ 2014-03-04 15:18 UTC (permalink / raw)
  To: ajay <akmani1987@gmail.com>; pgsql-general

On 03/04/2014 03:03 AM, ajay wrote:
> hello team ,
>
> i am trying to enter this insert command in postgres
> insert into mmsuper.notification
> values('101','12','13','حب|welcome|आपकास्वागतहै','bye','goodbye','low
> balance',5);
> now when i am trying to paste this in postgres in Solaris , it is giving me
> error
>
> fm_db_Server1-# insert into mmsuper.notification
> values('101','12','13','Segmentation Fault
>
> and comes out of postgres prompt....
> also when i am trying to press up arrow key , then also it is giving me
> above error.
>
> But in Linux this is working fine ..without any error

Well this has encoding/locale issues written all over it.

So what is the encoding/locale for your Linux machine vs the Solaris 
machine?

The same for the Postgres instances on each or are you inserting into 
the same Postgres instance?

>
> Please help it is very very urgent..
>
>
>
> Thanks
> Akshat
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Segmentation-fault-tp5794571.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
  2014-03-04 11:03 Segmentation fault ajay <akmani1987@gmail.com>
  2014-03-04 15:18 ` Re: Segmentation fault Adrian Klaver <adrian.klaver@aklaver.com>
@ 2014-03-04 15:26   ` ajay <akmani1987@gmail.com>
  0 siblings, 0 replies; 32+ messages in thread

From: ajay @ 2014-03-04 15:26 UTC (permalink / raw)
  To: pgsql-general

thanks for the reply ,..

When i am trying to enter anything else other then some Arabic , Hindi ..
that case it does not give this error.

like if i enter..
insert into table values('welcome',1);
then it does not give any error and get successfully

Thanks



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Segmentation-fault-tp5794571p5794624.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: Segmentation fault
@ 2014-03-04 15:42 Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Adrian Klaver @ 2014-03-04 15:42 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

On 03/04/2014 07:39 AM, Adrian Klaver wrote:

CCing list:

> <quote author='Adrian Klaver-4'>
> On 03/04/2014 03:03 AM, ajay wrote:
>> hello team ,
>>
>> i am trying to enter this insert command in postgres
>> insert into mmsuper.notification
>> values('101','12','13','حب|welcome|आपकास्वागतहै','bye','goodbye','low
>> balance',5);
>> now when i am trying to paste this in postgres in Solaris , it is giving
>> me
>> error
>>
>> fm_db_Server1-# insert into mmsuper.notification
>> values('101','12','13','Segmentation Fault
>>
>> and comes out of postgres prompt....
>> also when i am trying to press up arrow key , then also it is giving me
>> above error.
>>
>> But in Linux this is working fine ..without any error
>
> Well this has encoding/locale issues written all over it.
>
> So what is the encoding/locale for your Linux machine vs the Solaris
> machine?
>
> The same for the Postgres instances on each or are you inserting into
> the same Postgres instance?
>
>>
>> Please help it is very very urgent..
>>
>>
>>
>> Thanks
>> Akshat
>>

> thanks for the reply ,..
>
> When i am trying to enter anything else other then some Arabic , Hindi
> .. that case it does not give this error.
>
> like if i enter..
> insert into table values('welcome',1);
> then it does not give any error and get successfully

I would try Toms suggestion about readline. If that does not work then 
we are back to questions I asked above about the encodings you are 
working with.

>
> Thank


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* segmentation fault
@ 2025-04-23 11:52 Zechman, Derek S <Derek.S.Zechman@snapon.com>
  2025-04-23 19:23 ` Re: segmentation fault Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 32+ messages in thread

From: Zechman, Derek S @ 2025-04-23 11:52 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hello All,

We are getting a segmentation fault which seems to be specific to pg16 on redhat 8.  Tested on pg14 and pg15 with no problems.  Also tested with pg16 on redhat 9 - no issues.  The developer determined that it is specific to select into a defined variable within a function.  We have a reproducible test case that requires no data.  I determined that 2857 is the maximum number that doesn't crash and anything higher than that causes a segfault.  Can anyone help with this problem?

Thanks,
Sean

Fault:

kernel: postmaster[2983369]: segfault at 24d5ffb ip 00007f7ae8413c8b sp 00007ffef0642d58 error 4 in libc-2.28.so[7f7ae83ef000+1cd000]
Apr 23 07:33:39 rich-pgrs-30-rv kernel: Code: 4c 16 f0 4d 89 d9 4d 89 d8 49 83 e0 0f 4c 29 c1 4d 29 c1 4c 29 c2 66 0f 1f 84 00 00 00 00 00 0f 10 01 0f 10 49 f0 0f 10 51 e0 <0f> 10 59 d0 48 83 c1 c0 48 83 c2 c0 41 0f 29 01 41 0f 29 49 f0 4

Kernel:
Linux 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Thu Feb 6 21:20:51 EST 2025 x86_64 x86_64 x86_64 GNU/Linux
postgres (PostgreSQL) 16.6

Query:
DROP FUNCTION IF EXISTS pg_temp.foo();
CREATE FUNCTION pg_temp.foo()
    RETURNS integer
    LANGUAGE 'plpgsql'

AS $BODY$
DECLARE
                bar integer;
BEGIN
                -- The issue occurs if function is called in SELECT where # of rows is 5000
                SELECT 1 INTO bar;
                -- The issue does not occur with either SELECT
                --bar = 1;
                return bar;
END;
$BODY$;

-- 5000 rows
SELECT pg_temp.foo() FROM (SELECT generate_series(1, 5000) AS id) x WHERE x.id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2156,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,2516,2517,2518,2519,2520,2521,2522,2523,2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,2944,2945,2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076,3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112,3113,3114,3115,3116,3117,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172,3173,3174,3175,3176,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,3188,3189,3190,3191,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,3234,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,3265,3266,3267,3268,3269,3270,3271,3272,3273,3274,3275,3276,3277,3278,3279,3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,3388,3389,3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,3415,3416,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,3455,3456,3457,3458,3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,3512,3513,3514,3515,3516,3517,3518,3519,3520,3521,3522,3523,3524,3525,3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,3574,3575,3576,3577,3578,3579,3580,3581,3582,3583,3584,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,3696,3697,3698,3699,3700,3701,3702,3703,3704,3705,3706,3707,3708,3709,3710,3711,3712,3713,3714,3715,3716,3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3740,3741,3742,3743,3744,3745,3746,3747,3748,3749,3750,3751,3752,3753,3754,3755,3756,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,3779,3780,3781,3782,3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,3796,3797,3798,3799,3800,3801,3802,3803,3804,3805,3806,3807,3808,3809,3810,3811,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,3822,3823,3824,3825,3826,3827,3828,3829,3830,3831,3832,3833,3834,3835,3836,3837,3838,3839,3840,3841,3842,3843,3844,3845,3846,3847,3848,3849,3850,3851,3852,3853,3854,3855,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890,3891,3892,3893,3894,3895,3896,3897,3898,3899,3900,3901,3902,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,3944,3945,3946,3947,3948,3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,3978,3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3992,3993,3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,4061,4062,4063,4064,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,4125,4126,4127,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,4138,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,4224,4225,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4238,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,4490,4491,4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,4572,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,4741,4742,4743,4744,4745,4746,4747,4748,4749,4750,4751,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,4804,4805,4806,4807,4808,4809,4810,4811,4812,4813,4814,4815,4816,4817,4818,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,4880,4881,4882,4883,4884,4885,4886,4887,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,4912,4913,4914,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,4981,4982,4983,4984,4985,4986,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,5000)

^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* Re: segmentation fault
  2025-04-23 11:52 segmentation fault Zechman, Derek S <Derek.S.Zechman@snapon.com>
@ 2025-04-23 19:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  2025-04-23 20:59   ` RE: segmentation fault Zechman, Derek S <Derek.S.Zechman@snapon.com>
  0 siblings, 1 reply; 32+ messages in thread

From: Tom Lane @ 2025-04-23 19:23 UTC (permalink / raw)
  To: Zechman, Derek S <Derek.S.Zechman@snapon.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

"Zechman, Derek S" <Derek.S.Zechman@snapon.com> writes:
> We are getting a segmentation fault which seems to be specific to pg16 on redhat 8.  Tested on pg14 and pg15 with no problems.  Also tested with pg16 on redhat 9 - no issues.  The developer determined that it is specific to select into a defined variable within a function.  We have a reproducible test case that requires no data.  I determined that 2857 is the maximum number that doesn't crash and anything higher than that causes a segfault.  Can anyone help with this problem?

FWIW, I cannot replicate this problem using this script.  Now I'm
testing v16 branch tip not 16.6, but a quick trawl through the git
history didn't find any plausibly-matching bug fixes since 16.6.

Where did you get your Postgres server executable from exactly,
and what options was it built with?  (The output of the matching
version of pg_config would answer that.)  Can you get a stack
trace from the crash?

https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 32+ messages in thread

* RE: segmentation fault
  2025-04-23 11:52 segmentation fault Zechman, Derek S <Derek.S.Zechman@snapon.com>
  2025-04-23 19:23 ` Re: segmentation fault Tom Lane <tgl@sss.pgh.pa.us>
@ 2025-04-23 20:59   ` Zechman, Derek S <Derek.S.Zechman@snapon.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Zechman, Derek S @ 2025-04-23 20:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

We got it from pgdg repository.

Here is the output of pg_config is below.  We have been struggling to get a stack trace, however – since we couldn’t reproduce it with a vanilla installation and neither could you – we determined it must be something specific to our environment.   Turns out when pg_show_plan is in the shared_preload_libraries then we get a segmentation fault.  I checked the github repo from cybertec and surprised there have been no reported issues with it.  I will be posting there shortly.

BINDIR = /usr/pgsql-16/bin
DOCDIR = /usr/pgsql-16/doc
HTMLDIR = /usr/pgsql-16/doc/html
INCLUDEDIR = /usr/pgsql-16/include
PKGINCLUDEDIR = /usr/pgsql-16/include
INCLUDEDIR-SERVER = /usr/pgsql-16/include/server
LIBDIR = /usr/pgsql-16/lib
PKGLIBDIR = /usr/pgsql-16/lib
LOCALEDIR = /usr/pgsql-16/share/locale
MANDIR = /usr/pgsql-16/share/man
SHAREDIR = /usr/pgsql-16/share
SYSCONFDIR = /etc/sysconfig/pgsql
PGXS = /usr/pgsql-16/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE =  '--enable-rpath' '--prefix=/usr/pgsql-16' '--includedir=/usr/pgsql-16/include' '--mandir=/usr/pgsql-16/share/man' '--datadir=/usr/pgsql-16/share' '--libdir=/usr/pgsql-16/lib' '--with-lz4' '--with-zstd' '--enable-tap-tests' '--with-icu' '--with-llvm' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/usr/lib64' '--with-openssl' '--with-pam' '--with-gssapi' '--with-includes=/usr/include' '--with-libraries=/usr/lib64' '--enable-nls' '--enable-dtrace' '--with-uuid=e2fs' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-selinux' '--with-systemd' '--with-system-tzdata=/usr/share/zoneinfo' '--sysconfdir=/etc/sysconfig/pgsql' '--docdir=/usr/pgsql-16/doc' '--htmldir=/usr/pgsql-16/doc/html' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=-Wl,--as-needed' 'LLVM_CONFIG=/usr/bin/llvm-config-64' 'CLANG=/usr/bin/clang' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,--as-needed -L/usr/lib64 -L/usr/lib -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-16/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lselinux -lzstd -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lpthread -lrt -ldl -lm
VERSION = PostgreSQL 16.8

From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Wednesday, April 23, 2025 3:23 PM
To: Zechman, Derek S <Derek.S.Zechman@snapon.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: segmentation fault

"Zechman, Derek S" <Derek. S. Zechman@ snapon. com> writes: > We are getting a segmentation fault which seems to be specific to pg16 on redhat 8. Tested on pg14 and pg15 with no problems. Also tested with pg16 on redhat 9 - no issues. The


"Zechman, Derek S" <Derek.S.Zechman@snapon.com<mailto:Derek.S.Zechman@snapon.com>> writes:

> We are getting a segmentation fault which seems to be specific to pg16 on redhat 8.  Tested on pg14 and pg15 with no problems.  Also tested with pg16 on redhat 9 - no issues.  The developer determined that it is specific to select into a defined variable within a function.  We have a reproducible test case that requires no data.  I determined that 2857 is the maximum number that doesn't crash and anything higher than that causes a segfault.  Can anyone help with this problem?



FWIW, I cannot replicate this problem using this script.  Now I'm

testing v16 branch tip not 16.6, but a quick trawl through the git

history didn't find any plausibly-matching bug fixes since 16.6.



Where did you get your Postgres server executable from exactly,

and what options was it built with?  (The output of the matching

version of pg_config would answer that.)  Can you get a stack

trace from the crash?



https://urldefense.com/v3/__https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQ...;



                                              regards, tom lane

^ permalink  raw  reply  [nested|flat] 32+ messages in thread


end of thread, other threads:[~2025-04-23 20:59 UTC | newest]

Thread overview: 32+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 17:28 segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
2005-03-09 17:48 ` Lonni J Friedman <netllama@gmail.com>
2005-03-09 19:22 Re: segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
2005-03-09 19:28 ` Lonni J Friedman <netllama@gmail.com>
2005-03-09 19:26 Re: segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
2005-03-09 19:31 ` Lonni J Friedman <netllama@gmail.com>
2005-03-09 20:18 Re: segmentation fault marcelo Cortez <jmdc_marcelo@yahoo.com.ar>
2006-08-16 11:59 Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
2006-08-16 12:40 ` Re: Segmentation Fault Bill Moran <wmoran@collaborativefusion.com>
2006-08-16 12:41 ` Re: Segmentation Fault Chris Mair <chrisnospam@1006.org>
2006-08-16 13:37   ` Re: Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
2006-08-16 14:31 ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
2006-08-16 15:20   ` Re: Segmentation Fault Poul Møller Hansen <freebsd@pbnet.dk>
2006-08-16 20:21     ` Re: Segmentation Fault Tom Lane <tgl@sss.pgh.pa.us>
2012-06-11 03:34 Segmentation Fault Benson Jin <benson.jin@troo.com>
2012-06-11 07:49 ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
2012-06-11 17:24   ` Re: Segmentation Fault Benson Jin <benson.jin@troo.com>
2012-06-11 19:15   ` Re: Segmentation Fault Benson Jin <benson.jin@troo.com>
2012-06-12 07:40     ` Re: Segmentation Fault Craig Ringer <ringerc@ringerc.id.au>
2012-06-11 17:09 ` Re: Segmentation Fault Dickson S. Guedes <listas@guedesoft.net>
2012-07-18 16:37 Segmentation fault Amod Pandey <amod.pandey@zovi.com>
2012-07-19 03:50 ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
2012-07-19 05:52   ` Re: Segmentation fault Amod Pandey <amod.pandey@zovi.com>
2012-07-19 06:34     ` Re: Segmentation fault Craig Ringer <ringerc@ringerc.id.au>
2014-03-04 11:03 Segmentation fault ajay <akmani1987@gmail.com>
2014-03-04 15:17 ` Re: Segmentation fault Tom Lane <tgl@sss.pgh.pa.us>
2014-03-04 15:18 ` Re: Segmentation fault Adrian Klaver <adrian.klaver@aklaver.com>
2014-03-04 15:26   ` Re: Segmentation fault ajay <akmani1987@gmail.com>
2014-03-04 15:42 Re: Segmentation fault Adrian Klaver <adrian.klaver@aklaver.com>
2025-04-23 11:52 segmentation fault Zechman, Derek S <Derek.S.Zechman@snapon.com>
2025-04-23 19:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-04-23 20:59   ` Zechman, Derek S <Derek.S.Zechman@snapon.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox