Reaping dead processes postgresql

Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme

From: Balamurugan Mahendran
To: Craig Ringer
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme
Date: 2010-11-27 09:45:20
Message-ID: AANLkTi=2VrTLZyja5D81rN3MwPYF7JPn84u5vEzEDLVu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

YES, Its on Amazon EC2 (our production DB running postgres 8.3 version for
more than 3yrs). And its a clean folder.

I am not sure below is the one you are expecting, but hope the below trace
helps..

# sudo -u postgres gdb -q -c /var/lib/pgsql/data/core
/var/lib/pgsql/bin/postgres
Reading symbols from /usr/lib/libxml2.so.2. Reading symbols from
/usr/lib/debug/usr/lib/libxml2.so.2.6.32. done.
done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/libdl.so.2. Reading symbols from
/usr/lib/debug/lib/libdl-2.9.so. done.
done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6. Reading symbols from
/usr/lib/debug/lib/libm-2.9.so. done.
done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6. Reading symbols from
/usr/lib/debug/lib/libc-2.9.so. done.
done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libz.so.1. Reading symbols from
/usr/lib/debug/lib/libz.so.1.2.3.3. done.
done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/ld-linux-x86-64.so.2. Reading symbols from
/usr/lib/debug/lib/ld-2.9.so. done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libnss_files.so.2. Reading symbols from
/usr/lib/debug/lib/libnss_files-2.9.so. done.
done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /var/lib/pgsql/lib/uniqueidentifier.so. done.
Loaded symbols for /var/lib/pgsql/lib/uniqueidentifier.so
Reading symbols from /lib/libuuid.so.1. done.
Loaded symbols for /lib/libuuid.so.1
Core was generated by `postgres: postgres acti [local] COPY ‘.
Program terminated with signal 11, Segmentation fault.
[New process 16223]
#0 strlen () at ../sysdeps/x86_64/strlen.S:48
48 ../sysdeps/x86_64/strlen.S: Permission denied.
in ../sysdeps/x86_64/strlen.S
(gdb)
Current language: auto; currently asm

On Sat, Nov 27, 2010 at 2:55 PM, Craig Ringer
wrote:

> On 27/11/2010 5:09 PM, Balamurugan Mahendran wrote:
>
>> Thanks for your immediate reply. Happy Thanks Giving day!!
>>
>> postgres(at)acti-db-bala:

$ uname -a
>> Linux acti-db-bala 2.6.16.33-xenU #2 SMP Wed Aug 15 17:27:36 SAST 2007
>> x86_64 GNU/Linux
>>
>
> Is this running on a virtual hosting provider somewhere? If so, which one?
>
>
> postgres(at)acti-db-bala:

Источник

Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme

From: Balamurugan Mahendran
To: Craig Ringer
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme
Date: 2010-11-27 11:39:35
Message-ID: AANLkTimXAPNCAPY+zPtMuR8jRDDNc2KbfYWwfaM_F=y4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs
Читайте также:  Картридж оставляет черные полосы при печати лазерным принтером

I think I got, what you look for.

# sudo -u postgres gdb -q -c /var/lib/pgsql/data/core
/var/lib/pgsql/bin/postgres
Reading symbols from /usr/lib/libxml2.so.2. Reading symbols from
/usr/lib/debug/usr/lib/libxml2.so.2.6.32. done.
done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/libdl.so.2. Reading symbols from
/usr/lib/debug/lib/libdl-2.9.so. done.
done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6. Reading symbols from
/usr/lib/debug/lib/libm-2.9.so. done.
done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6. Reading symbols from
/usr/lib/debug/lib/libc-2.9.so. done.
done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libz.so.1. Reading symbols from
/usr/lib/debug/lib/libz.so.1.2.3.3. done.
done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/ld-linux-x86-64.so.2. Reading symbols from
/usr/lib/debug/lib/ld-2.9.so. done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libnss_files.so.2. Reading symbols from
/usr/lib/debug/lib/libnss_files-2.9.so. done.
done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /var/lib/pgsql/lib/uniqueidentifier.so. done.
Loaded symbols for /var/lib/pgsql/lib/uniqueidentifier.so
Reading symbols from /lib/libuuid.so.1. done.
Loaded symbols for /lib/libuuid.so.1
Core was generated by `postgres: postgres acti [local] COPY ‘.
Program terminated with signal 11, Segmentation fault.
[New process 32591]
#0 strlen () at ../sysdeps/x86_64/strlen.S:48
48 ../sysdeps/x86_64/strlen.S: Permission denied.
in ../sysdeps/x86_64/strlen.S
(gdb) bt full
#0 strlen () at ../sysdeps/x86_64/strlen.S:48
No locals.
#1 0x00002b08dae084f2 in uniqueidentifier_in () from
/var/lib/pgsql/lib/uniqueidentifier.so
No locals.
#2 0x00000000006ca2ed in InputFunctionCall ()
No locals.
#3 0x000000000050defe in CopyFrom ()
No locals.
#4 0x0000000000510a4e in DoCopy ()
No locals.
#5 0x0000000000612a56 in standard_ProcessUtility ()
No locals.
#6 0x000000000060e907 in PortalRunUtility ()
No locals.
#7 0x000000000060fa7d in PortalRunMulti ()
No locals.
#8 0x0000000000610222 in PortalRun ()
No locals.
#9 0x000000000060c671 in exec_simple_query ()
No locals.
#10 0x000000000060d8c7 in PostgresMain ()
No locals.
#11 0x00000000005dc6ce in ServerLoop ()
No locals.
#12 0x00000000005dd3ff in PostmasterMain ()
No locals.
#13 0x00000000005810e8 in main ()
No locals.
Current language: auto; currently asm
(gdb)

On Sat, Nov 27, 2010 at 4:36 PM, Balamurugan Mahendran wrote:

Источник

Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme

From: Tom Lane
To: Joshua Tolley
Cc: Magnus Hagander , Balamurugan Mahendran , Craig Ringer , pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme
Date: 2010-11-27 21:24:55
Message-ID: 1878.1290893095@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Joshua Tolley writes:
> On Sat, Nov 27, 2010 at 11:23:46AM -0500, Tom Lane wrote:
>> There used to be a project of that name on gborg. I can’t find the
>> source code anymore though.

>> The magic-block mechanism should prevent that. What I’m wondering about
>> is whether the input function is (a) careless about null input and (b)
>> not marked STRICT.

Читайте также:  Картридж для спасательного жилета

> I think you’re right:

You’re looking at the output function not the input function . and
indeed the first thing the input function does is to invoke strlen(),
without any null check.

> It should use PG_ARGISNULL(0), no?

It’d be better to mark it STRICT in the SQL file (and likewise for the
output function). Or actually what he *should* do is drop the whole
thing and use the now-built-in uuid type.

Now, this 2003-vintage tarball is obviously not what the OP is using,
since it hasn’t even got a PG_MODULE_MAGIC call. But if it hasn’t
been updated any more than that, this’d explain a core dump on NULL
input. What’s a bit less clear is how the null got into the source
database without having triggered the same bug; but I suppose it
might’ve been generated via INSERT DEFAULT VALUES or some such.

Источник

Re: PostgreSQL 9.0.2 hangs during shutdown on Windows (Win32)

From: Alexandros Karypidis
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL 9.0.2 hangs during shutdown on Windows (Win32)
Date: 2011-01-17 10:44:05
Message-ID: 878929.59956.qm@web28604.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Forgot to mention that:

1. After the shutdown request, I can see that there are still two processes
running (postgres.exe). One of the two is hogging the CPU (it uses one of the
two cores 100%, so it shows up as 50 on the task manager). The other seems to be
waiting, using 0%.

2. If I go to the command prompt where the server is running and hit Ctrl-C, the
following additional output is logged:

DEBUG: postmaster received signal 2
LOG: received fast shutdown request

Still, nothing happens.

3. If I kill the idle one of the two «stuck» postgress.exe via the task manager,
there is nothing additional logged by the server:

4. If I kill the busy one of the two «stuck» postgress.exe via the task
manager, the following output is additionally logged by the server:

DEBUG: reaping dead processes
LOG: statistics collector process (PID 4264) exited with exit code 1
DEBUG: shmem_exit(0): 2 callbacks to make
DEBUG: proc_exit(0): 1 callbacks to make
DEBUG: exit(0)
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make

5. On the client side (the command window where I ran that shutdown command:
pg_ctl stop -D %PGDATA_HOME%) I see:

waiting for server to shut
down. failed
pg_ctl: server does not shut down

I am using PostgreSQL 9.0.2-1 (specifically the pre-compiled ZIP distribution
for Win32, postgresql-9.0.2-1-windows-binaries.zip, from EnterpriseDB
http://www.enterprisedb.com/postgresql-902-binaries-win32?ls=Crossover&type=Crossover).

The Host is an Intel x86 (Core2Duo) machine running Windows XP SP3 (32-bit).

When I try to shut down the database, it always hangs. Even if I simply start
the DB and then issue a shutdown (with no connections being made and no SQL
executed in between) the DB still hangs. I appreciate any info on what to do to
resolve this.

I have increased the log level to DEBUG5 (log_min_messages and
log_min_error_statement) and the output of the server is:

————————- START DEBUG OUTPUT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
DEBUG: InitPostgres
DEBUG: my backend id is 1
DEBUG: mapped win32 error code 2 to 2
DEBUG: StartTransaction
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid:

0/1/0, nestlvl: 1, children:
DEBUG: CommitTransaction
DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid:

0/1/0, nestlvl: 1, children:
DEBUG: mapped win32 error code 2 to 2

===> . Message above repeated several times

DEBUG: mapped win32 error code 2 to 2

===> This is where I immediately try a clean shutdown:

DEBUG: postmaster received signal 15
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
DEBUG: shmem_exit(0): 7 callbacks to make
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: shmem_exit(0): 4 callbacks to make
DEBUG: exit(0)
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: exit(0)
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: reaping dead processes
DEBUG: reaping dead processes
LOG: shutting down
DEBUG: attempting to remove WAL segments older than log file
000000010000000000000002
LOG: database system is shut down
DEBUG: shmem_exit(0): 4 callbacks to make
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: exit(0)
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: reaping dead processes

Источник

Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme

From: Joshua Tolley
To: Tom Lane
Cc: Magnus Hagander , Balamurugan Mahendran , Craig Ringer , pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme
Date: 2010-11-27 21:11:50
Message-ID: 4cf1742e.0f3dec0a.3014.ffffb065@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Nov 27, 2010 at 11:23:46AM -0500, Tom Lane wrote:
> Magnus Hagander writes:
> > Where does your uniqueidentifier.so file come from? It’s not a part of
> > standard PostgreSQL 9.0, and this is the part that’s crashing..
>
> There used to be a project of that name on gborg. I can’t find the
> source code anymore though.

> > Any chance it’s a third party module that you didn’t recompile for 9.0?
>
> The magic-block mechanism should prevent that. What I’m wondering about
> is whether the input function is (a) careless about null input and (b)
> not marked STRICT.

I think you’re right:

PG_FUNCTION_INFO_V1(uniqueidentifier_out);
Datum
uniqueidentifier_out(PG_FUNCTION_ARGS)
<
char *result;
uniqueidentifier *in = (uniqueidentifier *) PG_GETARG_POINTER(0);

if (in == NULL)
PG_RETURN_CSTRING (NULL);

CREATE OR REPLACE FUNCTION uniqueidentifier_in(cstring)
returns uniqueidentifier
as ‘MODULE_PATHNAME’
language ‘c’;

Источник

Поделиться с друзьями
КомпСовет
Adblock
detector