Re: pgsql: Refactor dlopen() support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Refactor dlopen() support
Date: 2018-09-07 06:30:57
Message-ID: 14508.1536301857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Refactor dlopen() support

Buildfarm member locust doesn't like this much. I've been able to
reproduce the problem on an old Mac laptop running the same macOS release,
viz 10.5.8. (Note that we're not seeing it on earlier or later releases,
which is odd in itself.) According to my machine, the crash is happening
here:

#0 _PG_init () at plpy_main.c:98
98 *plpython_version_bitmask_ptr |= (1 << PY_MAJOR_VERSION);

and the reason is that the rendezvous variable sometimes contains garbage.
Most sessions correctly see it as initially zero, but sometimes it
contains

(gdb) p plpython_version_bitmask_ptr
$1 = (int *) 0x1d

and I've also seen

(gdb) p plpython_version_bitmask_ptr
$1 = (int *) 0x7f7f7f7f

It's mostly repeatable but not completely so: the 0x1d case seems
to come up every time through the plpython_do test, but I don't
always see the 0x7f7f7f7f case. (Maybe that's a timing artifact?
It takes a variable amount of time to recover from the first crash
in plpython_do, so the rest of the plpython test run isn't exactly
operating in uniform conditions.)

No idea what's going on here, and I'm about out of steam for tonight.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-09-07 09:43:10 pgsql: Use C99 designated initializers for some structs
Previous Message Bruce Momjian 2018-09-07 00:42:36 pgsql: doc: wording fix

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-09-07 07:29:41 Small performance tweak to run-time partition pruning
Previous Message Thomas Munro 2018-09-07 00:36:15 Re: Collation versioning