pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc
2+ messages / 2 participants
[nested] [flat]
* Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc
@ 2016-03-11 15:10 Dmitriy Sarafannikov <dimon99901@mail.ru>
2016-03-11 15:51 ` Re: Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Dmitriy Sarafannikov @ 2016-03-11 15:10 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-bugs
> Uh, well:
>
> > (gdb) info threads
> > Id Target Id Frame
> > 2 Thread 0x7f0e329d2740 (LWP 46202) 0x00007f0e305e972b in __libc_recv (fd=13, buf=buf@entry=0x7f0e32a1b140 <PqRecvBuffer>, n=n@entry=8192, flags=-1, flags@entry=0)
> > at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
> > * 1 Thread 0x7f0e32820700 (LWP 46918) MemoryContextAlloc (context=0x0, size=120) at /build/postgresql-9.4-1wOG_M/postgresql-9.4-9.4.6/build/../src/backend/utils/mmgr/mcxt.c:584
>
> There's not enough information here to disclose what it is that's creating
> a second thread, but you need to find that and make it stop.
Thanks for the answer.
I create new local connection (not via connection pool)
postgres=# select 1;
?column?
----------
1
(1 row)
gdb shows 1 thread
(gdb) info thread
Id Target Id Frame
* 1 Thread 0x7f0e329d2740 (LWP 84804) "postgres" 0x00007f0e305e96cd in __libc_recv (fd=13, buf=buf@entry=0x7f0e32a1b140 <PqRecvBuffer>, n=n@entry=8192, flags=-1, flags@entry=0)
at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
After that i execute something on plv8
postgres=# do $$ plv8.elog(NOTICE, 'bla-bla-bla') $$ language plv8;
NOTICE: bla-bla-bla
DO
And then gdb shows 2 threads:
(gdb) info thread
Id Target Id Frame
2 Thread 0x7f0e32827700 (LWP 85903) "SignalSender" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1 Thread 0x7f0e329d2740 (LWP 84804) "postgres" 0x00007f0e305e972b in __libc_recv (fd=13, buf=buf@entry=0x7f0e32a1b140 <PqRecvBuffer>, n=n@entry=8192, flags=-1, flags@entry=0)
at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f0e32827700 (LWP 85903))]
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
85 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S: No such file or directory.
(gdb) bt
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00007f0c0ed0544d in v8::internal::LinuxSemaphore::Wait (this=0x7f0c080008c0) at ../src/platform-linux.cc:880
#2 0x00007f0c0ec235d8 in v8::internal::RuntimeProfiler::WaitForSomeIsolateToEnterJS () at ../src/runtime-profiler.cc:452
#3 0x00007f0c0ec23cf8 in WaitForSomeIsolateToEnterJS () at ../src/runtime-profiler.cc:451
#4 v8::internal::RuntimeProfilerRateLimiter::SuspendIfNecessary (this=this@entry=0x7f0e342642dc) at ../src/runtime-profiler.cc:499
#5 0x00007f0c0ed05690 in v8::internal::SignalSender::Run (this=0x7f0e342642b0) at ../src/platform-linux.cc:1160
#6 0x00007f0c0ed053a0 in v8::internal::ThreadEntry (arg=0x7f0e342642b0) at ../src/platform-linux.cc:756
#7 0x00007f0e2ef570a4 in start_thread (arg=0x7f0e32827700) at pthread_create.c:309
#8 0x00007f0e305e887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
It turns out that plv8 creates thread.
--
Best regards,
Dmitriy Sarafannikov
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc
2016-03-11 15:10 Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc Dmitriy Sarafannikov <dimon99901@mail.ru>
@ 2016-03-11 15:51 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2016-03-11 15:51 UTC (permalink / raw)
To: Dmitriy Sarafannikov <dimon99901@mail.ru>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-bugs
=?UTF-8?B?RG1pdHJpeSBTYXJhZmFubmlrb3Y=?= <dimon99901@mail.ru> writes:
> It turns out that plv8 creates thread.
That'd be a pretty fundamental bug in plv8 ... I have to think there's
probably more to it than that.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-03-11 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 15:10 Re[2]: [BUGS] Re: [BUGS] Segfault in MemoryContextAlloc Dmitriy Sarafannikov <dimon99901@mail.ru>
2016-03-11 15:51 ` Tom Lane <tgl@sss.pgh.pa.us>
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