NetBSD-Users archive

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

bash: /usr/pkg/bin/mame: Cannot allocate memory



I have an "interesting" problem with mame (pkg emulators/mame) which
seems "too big" to run:  (NetBSD/amd64 9.2 with 64 GB of RAM)

$ /usr/pkg/bin/mame 
bash: /usr/pkg/bin/mame: Cannot allocate memory

it's execve(2) that is failing somehow:

 25279      1 ktrace   EMUL  "netbsd"
 25279      1 ktrace   CALL  execve(0x7f7fffd96797,0x7f7fffd96180,0x7f7fffd96190)
 25279      1 ktrace   NAMI  "/usr/pkg/bin/mame"
 25279      1 ktrace   NAMI  "/usr/libexec/ld.elf_so"
 25279      1 ktrace   RET   execve -1 errno 12 Cannot 

$ size /usr/pkg/bin/mame
   text    data     bss     dec     hex filename
278129058       32803980        6454620 317387658       12eaf38a        /usr/pkg/bin/mame

$ size --format=SysV /usr/pkg/bin/mame
/usr/pkg/bin/mame  :
section                   size        addr
.interp                     23         512
.note.netbsd.ident          24         536
.note.netbsd.pax            20         560
.hash                     6144         584
.dynsym                  24312        6728
.dynstr                  24827       31040
.gnu.version              2026       55868
.gnu.version_r             352       57896
.rela.dyn             50127408       58248
.rela.plt                19584    50185656
.init                       19    50205248
.plt                     13072    50205280
.plt.got                   168    50218352
.text                164253179    50218528
.fini                       14   214471712
.rodata               34156657   214471744
.eh_frame_hdr          4210276   248628404
.eh_frame             20163840   252838680
.gcc_except_table      5127113   273002520
.tbss                       12   280227840
.ctors                   58944   280227840
.dtors                      16   280286784
.data.rel.ro          27663464   280286816
.dynamic                   784   307950280
.got                     14392   307951064
.got.plt                  6552   307965456
.data                  5059828   307972032
.bss                   6454608   313031872
.comment                    50           0
.ident                     227           0
.SUNW_ctf                  143           0
Total                317388078

It's indeed quite big, but upping my limits doesn't help:

$ ulimit -a           
number of threads                   (-T) 1024
socket buffer size           (bytes, -b) unlimited
core file size              (blocks, -c) unlimited
data seg size               (kbytes, -d) 8388608
file size                   (blocks, -f) unlimited
max locked memory           (kbytes, -l) 21674024
max memory size             (kbytes, -m) 65022072
open files                          (-n) 1024
pipe size                (512 bytes, -p) 1
stack size                  (kbytes, -s) 114688
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 1024
virtual memory              (kbytes, -v) unlimited

The data seg size is the "unlimited" value.

`sudo paxctl +amg /usr/pkg/bin/mame` makes no difference.

ldd hows all libraries (and I thought ldd depended on excuting at least
the dynamic linker with some hidden flag).

I tried with mame from the latest stable branch and -current (0.238 resp.
0.240) but they behave the same.

Any ideas? Because building it takes a while, I made the compiled
packages available at http://www.falu.nl/~rhialto/mame-0.240.tgz and
.../mame-0.238nb1.tgz .

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index