On Thu, Feb 23, 2012 at 12:08 PM, Aneesh Kumar K.V
<aneesh.ku...@linux.vnet.ibm.com> wrote:
> On Tue, 21 Feb 2012 21:58:39 -0600, C Anthony Risinger <anth...@xtfx.me> 
> wrote:
>> On Sat, Feb 18, 2012 at 11:38 AM, Aneesh Kumar K.V
>> <aneesh.ku...@linux.vnet.ibm.com> wrote:
>> > On Thu, 16 Feb 2012 06:20:21 -0600, C Anthony Risinger <anth...@xtfx.me> 
>> > wrote:
>> >>
>> >> b) unable to run `locale-gen` on *any* virtfs configuration? (strace)
>> >>
>> >> [...]
>> >> mmap(NULL, 536870912, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
>> >> 0x7fb3aac63000
>> >> mmap(0x7fb3aac63000, 103860, PROT_READ|PROT_WRITE,
>> >> MAP_SHARED|MAP_FIXED, 3, 0) = -1 EINVAL (Invalid argument)
>> >> cannot map archive header: Invalid argument
>> >>
>
> For writable mmap to work you need to mount with -o cache=loose. Did
> you try local-gen with that mount option ?

ok, like 4 months later ... but this is really bugging me and i can't
seem to get it working no matter what options i try.

i have `cache=loose` enabled, but `locale-gen` still fails, albeit
with a different error:

# locale-gen
--------------------------------------------------------
Generating locales...
  en_US.UTF-8...cannot change mode of new locale archive: No such file
or directory
--------------------------------------------------------

... so now the mmap is working, and the `ln` supposedly works, but the
file is missing(?):

# strace -ff -s256 -e trace=file,desc locale-gen
--------------------------------------------------------
[...]
[pid  2782] open("/usr/lib/locale/locale-archive", O_RDWR) = -1 ENOENT
(No such file or directory)
[pid  2782] open("/usr/lib/locale/locale-archive.3aopUy",
O_RDWR|O_CREAT|O_EXCL, 0600) = 3
[pid  2782] write(3,
"\t\1\2\336\0\0\0\0008\0\0\0\0\0\0\0\213\3\0\0\274*\0\0\0\0\0\0L\35\0\0\10H\0\0\0\0\0\0\244\1\0\0008\371\0\0\0\0\0\0\323\7\0\0",
56) = 56
[pid  2782] ftruncate(3, 103860)        = 0
[pid  2782] mmap(NULL, 536870912, PROT_NONE, MAP_SHARED, 3, 0) = 0x7f84983b0000
[pid  2782] mmap(0x7f84983b0000, 103860, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_FIXED, 3, 0) = 0x7f84983b0000
[pid  2782] link("/usr/lib/locale/locale-archive.3aopUy",
"/usr/lib/locale/locale-archive") = 0
[pid  2782] unlink("/usr/lib/locale/locale-archive.3aopUy") = 0
[pid  2782] fchmod(3, 0644)             = -1 ENOENT (No such file or directory)
[pid  2782] unlink("/usr/lib/locale/locale-archive") = 0
[pid  2782] write(2, "cannot change mode of new locale archive",
40cannot change mode of new locale archive) = 40
[...]
--------------------------------------------------------

... what is going on here?  it's like the descriptor magically
disappears ... ideas?  everytime there is glibc update, i must chroot
from the host and regenerate the botched locales.

host and guest are both Archlinux, kernel 3.4.4.  addtl details follow ...

--------------------------------------------------------
# uname -a
Linux app-devel-misc.xtfx.net 3.4.4-2-ARCH #1 SMP PREEMPT Sun Jun 24
18:59:47 CEST 2012 x86_64 GNU/Linux

# findmnt -r /
TARGET SOURCE FSTYPE OPTIONS
/ /dev/root 9p 
rw,relatime,dirsync,trans=virtio,version=9p2000.L,posixacl,cache=loose

# lsmod | grep -E 'fscache|9p|virtio'
9p                     43643  1
fscache                41059  1 9p
9pnet_virtio            5926  1
9pnet                  62797  2 9p,9pnet_virtio
virtio_balloon          4465  0
virtio_blk              6473  1
virtio_net             13402  0
virtio_pci              7155  0
virtio                  3682  5
virtio_blk,virtio_net,virtio_pci,virtio_balloon,9pnet_virtio
virtio_ring             4714  5
virtio_blk,virtio_net,virtio_pci,virtio_balloon,9pnet_virtio
--------------------------------------------------------

thanks,

-- 

C Anthony

Reply via email to