Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 16FE62EBA79 for ; Thu, 24 Nov 2011 06:23:31 -0400 (AST) Received: from exprod7og105.obsmtp.com ([64.18.2.163]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RTWSo-0005tO-Vk for pgsql-bugs@postgresql.org; Thu, 24 Nov 2011 10:23:32 +0000 Received: from mail-bw0-f53.google.com ([209.85.214.53]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKTs4bFdapXM7U1PsJ4Wtn8CgK5Mhv8wp5@postini.com; Thu, 24 Nov 2011 02:23:30 PST Received: by bkaq10 with SMTP id q10so2943049bka.12 for ; Thu, 24 Nov 2011 02:23:16 -0800 (PST) Received: by 10.204.156.218 with SMTP id y26mr27966187bkw.103.1322130195998; Thu, 24 Nov 2011 02:23:15 -0800 (PST) Received: from [192.168.1.100] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id l26sm24959169fad.17.2011.11.24.02.23.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 02:23:14 -0800 (PST) Message-ID: <4ECE1B0D.6000103@enterprisedb.com> Date: Thu, 24 Nov 2011 12:23:09 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15 MIME-Version: 1.0 To: Robert Balser CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6304: initdb fails with loale ko_KR.eucKR References: <201111222118.pAMLICJR064379@wwwmaster.postgresql.org> In-Reply-To: <201111222118.pAMLICJR064379@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 201111/164 X-Sequence-Number: 31759 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 -U --pwfile= > > 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 "/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