#5 parse_allkeys crashes on 64bit machines

open
nobody
None
5
2009-06-21
2009-06-21
No

I'm getting this error compiling camomile 0.7.1 with ocaml 3.10.1:

tools/parse_allkeys.opt database < unidata/tr10/allkeys.txt
Fatal error: out of memory.

It's very strange because this error only appears _intermittently_ (!)
As in, it will occur randomly about 50% of the time.

I tried to make a minimal failing version of the program but without
much success. As far as I can tell the error occurs fairly randomly
within 'AbsCe.import' function.

The 'strace' when failing is very strange indeed:

25676 read(0, "PATIBILITY IDEOGRAPH-2F952; QQC\n"..., 4032) = 4032
25676 read(0, "PATIBILITY IDEOGRAPH-2FA01; QQC\n"..., 4032) = 704
25676 read(0, "", 4096) = 0
25676 mmap(0x767020, 495648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x767000
25676 mmap(0x7e1020, 495648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7e1000
25676 mmap(0x85b020, 495648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbe2a23a000
25676 mmap(NULL, 34290708480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
25676 brk(0x7fc716000) = 0x8dc000
25676 mmap(NULL, 34290839552, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
25676 mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x7fae2a5c4000
25676 munmap(0x7fae2a5c4000, 27508736) = 0
25676 munmap(0x7fae30000000, 39600128) = 0
25676 mprotect(0x7fae2c000000, 135168, PROT_READ|PROT_WRITE) = 0
25676 mmap(NULL, 34290708480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
25676 munmap(0x7fbe2a23a000, 495648) = 0
25676 write(2, "Fatal error: out of memory.\n", 28) = 28
25676 exit_group(2) = ?

Note it is trying to allocate 34 gigabytes (sic) of memory.

On successful runs it never requests these huge memory allocations.

I've seen the problem on x86-64 and ppc64, but never on any 32 bit
platform, although maybe that is just luck.

Rich.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks