[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#307322: locales: locale-gen segfaults on upgrade



Hello Steve,

On Mon, May 02, 2005 at 08:45:11PM -0700, Steve Langasek wrote:
> Hi Joe,
> 
> On Mon, May 02, 2005 at 01:50:08PM +0000, Joseph Nahmias wrote:
> > When upgrading my testing installation, locale-gen segfaulted which
> > breaks the locale configuration of the system.  Here is the output I have:
> 
> > Setting up locales (2.3.2.ds1-21) ...
> > Generating locales...
> >   en_US.UTF-8.../usr/sbin/locale-gen: line 41: 17480 Segmentation fault      localedef -i $input -c -f $charset -A /etc/locale.alias $locale
> > dpkg: error processing locales (--configure):
> >  subprocess post-installation script returned error exit status 139
> 
> This error doesn't seem to be widely reproducible.  Can you provide a
> backtrace from the command 
> 
>   localedef -i en_US -c -f UTF-8 -A /etc/locale.alias en_US.UTF-8
> 
> on this system?

Certainly, here you go:

root@dot:~# gdb --args localedef -i en_US -c -f UTF-8 -A /etc/locale.alias en_US.UTF-8
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/localedef -i en_US -c -f UTF-8 -A /etc/locale.alias en_US.UTF-8
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x4009356b in memset () from /lib/libc.so.6
(gdb) bt
#0  0x4009356b in memset () from /lib/libc.so.6
#1  0x4008f790 in mcheck_check_all () from /lib/libc.so.6
#2  0x4008d75c in calloc () from /lib/libc.so.6
#3  0x08087b8b in ?? ()
#4  0x00083afe in ?? ()
#5  0x00000014 in ?? ()
#6  0x40815020 in ?? ()
#7  0xbffff804 in ?? ()
#8  0x08087766 in ?? ()
#9  0x00083afe in ?? ()
#10 0x00000014 in ?? ()
#11 0xffffff93 in ?? ()
#12 0x40049571 in __strtoul_internal () from /lib/libc.so.6
Previous frame inner to this frame (corrupt stack?)
(gdb) 


Hmm, seems to be a memory issue.  This is just a hosted LVS with a
paltry amount of memory (64 MB), let's try adding some more swap...

root@dot:/usr/local# dd if=/dev/zero of=swapfile bs=1024 count=64k
65536+0 records in
65536+0 records out
67108864 bytes transferred in 13.894189 seconds (4829995 bytes/sec)
root@dot:/usr/local# mkswap swapfile
Setting up swapspace version 1, size = 67104 kB
root@dot:/usr/local# swapon swapfile
root@dot:/usr/local# free
             total       used       free     shared    buffers     cached
Mem:         60500      56040       4460          0       2712      15844
-/+ buffers/cache:      37484      23016
Swap:       131056      53692      77364


Survey says...

root@dot:~# dpkg --configure -a
Setting up locales (2.3.2.ds1-21) ...
Generating locales...
  en_US.UTF-8... done
  he_IL.UTF-8... done
Generation complete.


That did the trick!  Thanks for the pointer and my apologies for the
nuisance, I should've figured this out on my own...

--Joe



Reply to: