Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-20 Thread Petr Jelinek
On 20/09/17 05:53, Tom Lane wrote: > Craig Ringer writes: >> On 19 September 2017 at 18:04, Petr Jelinek >> wrote: >>> If you are asking why they are not identified by the >>> BackgroundWorkerHandle, then it's because it's private struct and

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-20 Thread Alvaro Herrera
Craig Ringer wrote: > IIRC when we did something similar in pglogical we ran into problems with > (a) inability to handle an ERROR in a bgworker without exiting and being > restarted by the postmaster; I don't understand why this would be; surely you can just setup another longjmp block for

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 12:16, Craig Ringer wrote: > The thought I had in mind upthread was to get rid of logicalrep slots >> in favor of expanding the underlying bgworker slot with some additional >> fields that would carry whatever extra info we need about a logicalrep

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 12:06, Amit Kapila wrote: > On Wed, Sep 20, 2017 at 9:23 AM, Tom Lane wrote: > > Craig Ringer writes: > >> On 19 September 2017 at 18:04, Petr Jelinek < > petr.jeli...@2ndquadrant.com> > >> wrote: > >>>

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 20 September 2017 at 11:53, Tom Lane wrote: > Craig Ringer writes: > > On 19 September 2017 at 18:04, Petr Jelinek < > petr.jeli...@2ndquadrant.com> > > wrote: > >> If you are asking why they are not identified by the > >> BackgroundWorkerHandle,

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Amit Kapila
On Wed, Sep 20, 2017 at 9:23 AM, Tom Lane wrote: > Craig Ringer writes: >> On 19 September 2017 at 18:04, Petr Jelinek >> wrote: >>> If you are asking why they are not identified by the >>> BackgroundWorkerHandle, then

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Tom Lane
Craig Ringer writes: > On 19 September 2017 at 18:04, Petr Jelinek > wrote: >> If you are asking why they are not identified by the >> BackgroundWorkerHandle, then it's because it's private struct and can't >> be shared with other processes so

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 19 September 2017 at 20:33, Amit Kapila wrote: > Yeah, but you could have used the way we do for parallel query where > we setup dsm and share all such information. You can check the logic > of execparallel.c and parallel.c to see how we do all such stuff for >

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Craig Ringer
On 19 September 2017 at 18:04, Petr Jelinek wrote: > > If you are asking why they are not identified by the > BackgroundWorkerHandle, then it's because it's private struct and can't > be shared with other processes so there is no way to link the logical > worker

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Andres Freund
On 2017-09-19 17:20:49 -0400, Tom Lane wrote: > Thomas Munro writes: > > This type of violent shutdown seems to be associated with occasional > > corruption of .gcda files (the files output by GCC coverage builds). > > The symptoms are that if you use

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Tom Lane
Thomas Munro writes: > This type of violent shutdown seems to be associated with occasional > corruption of .gcda files (the files output by GCC coverage builds). > The symptoms are that if you use --enable-coverage and make > check-world you'll very occasionally

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Thomas Munro
On Mon, Sep 18, 2017 at 10:18 PM, Andres Freund wrote: > On 2017-09-18 21:57:04 +1200, Thomas Munro wrote: >> WARNING: terminating connection because of crash of another server >> process >> DETAIL: The postmaster has commanded this server process to roll >> back

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Petr Jelinek
On 19/09/17 16:30, Amit Kapila wrote: > On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek > wrote: >> n 18/09/17 18:42, Tom Lane wrote: >>> Amit Kapila writes: On Mon, Sep 18, 2017 at 7:46 PM, Tom Lane wrote: >>> So,

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Amit Kapila
On Tue, Sep 19, 2017 at 6:51 PM, Petr Jelinek wrote: > On 19/09/17 15:08, Amit Kapila wrote: >> >> I am not much aware of this area. Can you explain what other usages >> it has apart from in the process that has launched the worker and in >> worker itself? >> > >

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Amit Kapila
On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek wrote: > n 18/09/17 18:42, Tom Lane wrote: >> Amit Kapila writes: >>> On Mon, Sep 18, 2017 at 7:46 PM, Tom Lane wrote: The subscriber log includes 2017-09-18

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Petr Jelinek
On 19/09/17 15:08, Amit Kapila wrote: > On Tue, Sep 19, 2017 at 6:29 PM, Petr Jelinek > wrote: >> On 19/09/17 14:33, Amit Kapila wrote: >>> On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek >>> wrote: n 18/09/17 18:42, Tom Lane wrote:

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Amit Kapila
On Tue, Sep 19, 2017 at 6:29 PM, Petr Jelinek wrote: > On 19/09/17 14:33, Amit Kapila wrote: >> On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek >> wrote: >>> n 18/09/17 18:42, Tom Lane wrote: >>> So, frankly, I think we would be best

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Petr Jelinek
On 19/09/17 14:33, Amit Kapila wrote: > On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek > wrote: >> n 18/09/17 18:42, Tom Lane wrote: >> >>> So, frankly, I think we would be best off losing the "logical rep >>> worker slot" business altogether, and making do with just

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Amit Kapila
On Tue, Sep 19, 2017 at 3:34 PM, Petr Jelinek wrote: > n 18/09/17 18:42, Tom Lane wrote: > >> So, frankly, I think we would be best off losing the "logical rep >> worker slot" business altogether, and making do with just bgworker >> slots. I think that would be

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-19 Thread Petr Jelinek
n 18/09/17 18:42, Tom Lane wrote: > Amit Kapila writes: >> On Mon, Sep 18, 2017 at 7:46 PM, Tom Lane wrote: >>> The subscriber log includes >>> 2017-09-18 08:43:08.240 UTC [15672] WARNING: out of background worker slots >>> Maybe that's harmless, but

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Tom Lane
Amit Kapila writes: > On Mon, Sep 18, 2017 at 7:46 PM, Tom Lane wrote: >> The subscriber log includes >> 2017-09-18 08:43:08.240 UTC [15672] WARNING: out of background worker slots >> Maybe that's harmless, but I'm suspicious that it's a smoking gun.

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Amit Kapila
On Mon, Sep 18, 2017 at 7:46 PM, Tom Lane wrote: > Thomas Munro writes: >> In this build you can see the output of the following at the end, >> which might provide clues to the initiated. You might need to click a >> small triangle to unfold

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Tom Lane
I wrote: > The subscriber log includes > 2017-09-18 08:43:08.240 UTC [15672] WARNING: out of background worker slots > 2017-09-18 08:43:08.240 UTC [15672] HINT: You might need to increase > max_worker_processes. > Maybe that's harmless, but I'm suspicious that it's a smoking gun. Actually:

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Tom Lane
Thomas Munro writes: > In this build you can see the output of the following at the end, > which might provide clues to the initiated. You might need to click a > small triangle to unfold the commands' output. > cat

Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Andres Freund
Hi, On 2017-09-18 21:57:04 +1200, Thomas Munro wrote: > The subscription tests 002_types.pl sometimes hangs for a while and > then times out when run on a Travis CI build VM running Ubuntu Trusty > if --enable-coverage is used. Yea, I saw that too. > I guess it might be a timing/race > problem

[HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment

2017-09-18 Thread Thomas Munro
Hi, The subscription tests 002_types.pl sometimes hangs for a while and then times out when run on a Travis CI build VM running Ubuntu Trusty if --enable-coverage is used. I guess it might be a timing/race problem because I can't think of any mechanism specific to coverage instrumentation except