pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6304: initdb fails with loale ko_KR.eucKR
4+ messages / 3 participants
[nested] [flat]
* BUG #6304: initdb fails with loale ko_KR.eucKR
@ 2011-11-22 21:18 Robert Balser <robert.balser@hp.com>
2011-11-24 10:23 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Balser @ 2011-11-22 21:18 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 6304
Logged by: Robert Balser
Email address: robert.balser@hp.com
PostgreSQL version: 9.0.5
Operating system: HPUX 11.31 ia64
Description: initdb fails with loale ko_KR.eucKR
Details:
If you set your LANG=ko_KR.eucKR to set your locale to Korean, the initdb
command fails. It works with other locales, e.g. various Japanese, Chinese,
and even other Korean locales (e.g. ko_KR.utf8). But ko_KR.eucKR always
fails. The command being invoked is:
initdb -E UTF8 --no-locale -D <DB_DIR> -U <USER> --pwfile=<PASSWORDFILE>
The output of initdb is an "sh:" error (in Korean), followed by a "fgets
failure:" (also Korean), and then the following in English:
The program "postgres" is needed by initdb but was not found in the same
directory as "<PGDIR>/bin/initdb". Check your installation.
The postgres binary is of course in that folder, hence working with other
locales.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6304: initdb fails with loale ko_KR.eucKR
2011-11-22 21:18 BUG #6304: initdb fails with loale ko_KR.eucKR Robert Balser <robert.balser@hp.com>
@ 2011-11-24 10:23 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-11-24 12:07 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Linnakangas @ 2011-11-24 10:23 UTC (permalink / raw)
To: Robert Balser <robert.balser@hp.com>; +Cc: pgsql-bugs
On 22.11.2011 23:18, Robert Balser wrote:
>
> The following bug has been logged online:
>
> Bug reference: 6304
> Logged by: Robert Balser
> Email address: robert.balser@hp.com
> PostgreSQL version: 9.0.5
> Operating system: HPUX 11.31 ia64
> Description: initdb fails with loale ko_KR.eucKR
> Details:
>
> If you set your LANG=ko_KR.eucKR to set your locale to Korean, the initdb
> command fails. It works with other locales, e.g. various Japanese, Chinese,
> and even other Korean locales (e.g. ko_KR.utf8). But ko_KR.eucKR always
> fails. The command being invoked is:
>
> initdb -E UTF8 --no-locale -D<DB_DIR> -U<USER> --pwfile=<PASSWORDFILE>
>
> The output of initdb is an "sh:" error (in Korean), followed by a "fgets
> failure:" (also Korean), and then the following in English:
>
> The program "postgres" is needed by initdb but was not found in the same
> directory as "<PGDIR>/bin/initdb". Check your installation.
>
> The postgres binary is of course in that folder, hence working with other
> locales.
I got a coredump with this:
bin/initdb --locale=ko_KR.eucKR -D foodata
gdb gives me this stacktrace:
#0 0xc00000000cbdcfa0:0 in __mblen_hp15+0xc0 ()
from /usr/lib/nls/loc/hpux32/../hpux64/methods.1/libHP15.so
(gdb) bt
#0 0xc00000000cbdcfa0:0 in __mblen_hp15+0xc0 ()
from /usr/lib/nls/loc/hpux32/../hpux64/methods.1/libHP15.so
#1 0xc00000000033c310:0 in mblen+0xd0 () from /usr/lib/hpux64/libc.so.1
#2 0xc0000000002ea580:0 in __mbstomb+0x80 () from /usr/lib/hpux64/libc.so.1
#3 0xc00000000041b390:0 in __doprnt_main+0x1090 ()
from /usr/lib/hpux64/libc.so.1
#4 0xc00000000041a2d0:0 in _doprnt+0x30 () from /usr/lib/hpux64/libc.so.1
#5 0xc000000000434c30:0 in snprintf+0x150 () from /usr/lib/hpux64/libc.so.1
#6 0x400000000141d250:0 in pg_perm_setlocale (category=0, locale=0x0)
at pg_locale.c:188
#7 0x4000000000be7600:0 in main (argc=0, argv=0x0) at main.c:114
Looks like all the variables are zeros, argc=0 and argv=0x0 in the
above, and also
#6 0x400000000141d250:0 in pg_perm_setlocale (category=0, locale=0x0)
at pg_locale.c:188
188 snprintf(envbuf, LC_ENV_BUFSIZE - 1, "%s=%s", envvar,
result);
(gdb) print envbuf
$1 = 0x0
(gdb) print envvar
$2 = 0x0
(gdb) print result
$3 = 0x0
(gdb)
Very bizarre..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6304: initdb fails with loale ko_KR.eucKR
2011-11-22 21:18 BUG #6304: initdb fails with loale ko_KR.eucKR Robert Balser <robert.balser@hp.com>
2011-11-24 10:23 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
@ 2011-11-24 12:07 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-11-29 16:20 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Balser, Robert W <robert.balser@hp.com>
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Linnakangas @ 2011-11-24 12:07 UTC (permalink / raw)
To: Robert Balser <robert.balser@hp.com>; +Cc: pgsql-bugs
On 24.11.2011 12:23, Heikki Linnakangas wrote:
> On 22.11.2011 23:18, Robert Balser wrote:
>>
>> The following bug has been logged online:
>>
>> Bug reference: 6304
>> Logged by: Robert Balser
>> Email address: robert.balser@hp.com
>> PostgreSQL version: 9.0.5
>> Operating system: HPUX 11.31 ia64
>> Description: initdb fails with loale ko_KR.eucKR
>> Details:
>>
>> If you set your LANG=ko_KR.eucKR to set your locale to Korean, the initdb
>> command fails. It works with other locales, e.g. various Japanese,
>> Chinese,
>> and even other Korean locales (e.g. ko_KR.utf8). But ko_KR.eucKR always
>> fails. The command being invoked is:
>>
>> initdb -E UTF8 --no-locale -D<DB_DIR> -U<USER> --pwfile=<PASSWORDFILE>
>>
>> The output of initdb is an "sh:" error (in Korean), followed by a "fgets
>> failure:" (also Korean), and then the following in English:
>>
>> The program "postgres" is needed by initdb but was not found in the same
>> directory as "<PGDIR>/bin/initdb". Check your installation.
>>
>> The postgres binary is of course in that folder, hence working with other
>> locales.
This doesn't look like a Postgres bug, I was able to reproduce this with
the attached test program. It seems to depend heavily on the linker
options used, this is the minimum set I was able to reduce it to. I
think you'll have to pick it up from here with the HP compiler/
operating system guys..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachments:
snprintfcrash.sh (application/x-sh, 575B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6304: initdb fails with loale ko_KR.eucKR
2011-11-22 21:18 BUG #6304: initdb fails with loale ko_KR.eucKR Robert Balser <robert.balser@hp.com>
2011-11-24 10:23 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-11-24 12:07 ` Re: BUG #6304: initdb fails with loale ko_KR.eucKR Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
@ 2011-11-29 16:20 ` Balser, Robert W <robert.balser@hp.com>
0 siblings, 0 replies; 4+ messages in thread
From: Balser, Robert W @ 2011-11-29 16:20 UTC (permalink / raw)
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; +Cc: pgsql-bugs
Heikki,
Thank you for your detailed analysis and response. I might play with the linker options - right now I am using the default "./configure ; make install" procedure and letting everything happen automatically.
Another thought that I had was to wrap our use of "initdb" with a script that sets the LANG=C beforehand ... since we are using "--no-locale" option anyway it seems maybe unnecessary to honor the user's locale.
Thanks again,
Robert Balser
-----Original Message-----
From: Heikki Linnakangas [mailto:heikki.linnakangas@enterprisedb.com]
Sent: Thursday, November 24, 2011 5:08 AM
To: Balser, Robert W
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #6304: initdb fails with loale ko_KR.eucKR
On 24.11.2011 12:23, Heikki Linnakangas wrote:
> On 22.11.2011 23:18, Robert Balser wrote:
>>
>> The following bug has been logged online:
>>
>> Bug reference: 6304
>> Logged by: Robert Balser
>> Email address: robert.balser@hp.com
>> PostgreSQL version: 9.0.5
>> Operating system: HPUX 11.31 ia64
>> Description: initdb fails with loale ko_KR.eucKR
>> Details:
>>
>> If you set your LANG=ko_KR.eucKR to set your locale to Korean, the
>> initdb command fails. It works with other locales, e.g. various
>> Japanese, Chinese, and even other Korean locales (e.g. ko_KR.utf8).
>> But ko_KR.eucKR always fails. The command being invoked is:
>>
>> initdb -E UTF8 --no-locale -D<DB_DIR> -U<USER>
>> --pwfile=<PASSWORDFILE>
>>
>> The output of initdb is an "sh:" error (in Korean), followed by a
>> "fgets failure:" (also Korean), and then the following in English:
>>
>> The program "postgres" is needed by initdb but was not found in the
>> same directory as "<PGDIR>/bin/initdb". Check your installation.
>>
>> The postgres binary is of course in that folder, hence working with
>> other locales.
This doesn't look like a Postgres bug, I was able to reproduce this with the attached test program. It seems to depend heavily on the linker options used, this is the minimum set I was able to reduce it to. I think you'll have to pick it up from here with the HP compiler/ operating system guys..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-11-29 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 21:18 BUG #6304: initdb fails with loale ko_KR.eucKR Robert Balser <robert.balser@hp.com>
2011-11-24 10:23 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-11-24 12:07 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-11-29 16:20 ` Balser, Robert W <robert.balser@hp.com>
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