Re: 7.2.1 backend crash (convert_string_datum, locale)

From: Mats Lofkvist <mal(at)algonet(dot)se>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 7.2.1 backend crash (convert_string_datum, locale)
Date: 2002-07-15 12:59:19
Message-ID: y2qn0st4060.fsf@algonet.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

andrew(at)libertyrms(dot)info (Andrew Sullivan) writes:
> On Thu, Jul 11, 2002 at 11:15:42PM -0400, Tom Lane wrote:
> > Mats Lofkvist <mal(at)algonet(dot)se> writes:
> > > When testing postgres 7.2.1 on a sparc/solaris8 box with
> > > --enable-locale --enable-multibyte I get a crash in
> > > convert_string_datum.
> >
> > This smells like a problem that we chased down awhile back, that
> > snprintf on Solaris is broken (it will write past the end of the
> > specified buffer length, thus corrupting adjacent data).
>
> It does indeed. This was only the 64-bit library, though, or at
> least as far as we were able to tell. And I wasn't able to turn up
> any evidence that it happened on Solaris 8. But it might. We don't
> use 8, at least not yet.
>
> > Andrew, I think that was your test case we found it on. Do you
> > recall if a fix is available from Sun?
>
> Not as far as I know, at least for 7. Come to think of it, I now
> _do_ recall seeing something in my various Google wanderings which
> suggested that there is a fix in one of the patch packages for
> Solaris 8 (which suggests the buggy library is in the basic Solaris 8
> install). I dimly recall some mention of incompatibility between it
> and some other patchlevel, as well, so it might require some digging.
> (Given that it's really a bounds mistake in a system library, you'd
> think that it'd be easier to find more information about it; I
> actually learned almost everything I know about the problem from,
> IIRC, the autoconf web pages, so I'd not expect a cursory search of
> Sun's site to turn anything up.)
>
> In the FAQ_Solaris, there is a suggestion to use the substitute
> function included in the Postgres tree (which is what you suggested,
> Tom, and what I did), as well as instructions on how to do it. It
> definitely works for me on Solaris 7. Might be worth trying on 8 as
> well. If so, the FAQ should be updated so as not to limit the
> discussion to Solaris 7 and earlier.

I didn't get it to work with the stuff in FAQ_Solaris (can't
guarantee I really got snprintf substituted though, just
followed the instructions and recompiled).

Removing --enable-multibyte didn't help either.

Without neither --enable-locale or --enable-multibyte it
seems to work, but as I had to create a new database when
removing locale any problems local to the first database
are not seen anymore.

Is postgres 8-bit clean without locale support enabled?
(I don't care about sort orders and such, only need to
read/write 8-bit chars via jdbc).

_
Mats Lofkvist
mal(at)algonet(dot)se

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-07-15 13:56:15 Re: 7.2.1 backend crash (convert_string_datum, locale)
Previous Message Tom Lane 2002-07-14 18:44:55 Re: CREATE DATABASE/DROP DATABASE race conditions