LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem witb a precompiled executable.. (https://www.linuxquestions.org/questions/linux-software-2/problem-witb-a-precompiled-executable-423301/)

assasukasse 03-09-2006 05:21 PM

Problem witb a precompiled executable..
 
hi all
i have a problem that seems very hard to solve, at least i've not been able to find help on freenode, or other forums:
I have a small executable, a particular montecarlo program, that was compiled under fedora and i want to run on debian sid, on ONE machine that has debian sid, i was able to run it by following the errors it gave when started and installing all the needed dependancies, on ALL the other machines i get only this message "Killed" and nothing else.
I was able to issue ldd from the machine where it works and got this result:
Code:

ldd -v -r ./mcnp
        linux-gate.so.1 =>  (0xffffe000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7ecc000)
        libg2c.so.0 => /usr/lib/libg2c.so.0 (0xb7ea4000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7e7e000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e73000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7d3b000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7d36000)
        /lib/ld-linux.so.2 (0xb7faa000)

        Version information:
        ./mcnp:
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
                libm.so.6 (GLIBC_2.0) => /lib/tls/libm.so.6
        /usr/X11R6/lib/libX11.so.6:
                libdl.so.2 (GLIBC_2.1) => /lib/tls/libdl.so.2
                libdl.so.2 (GLIBC_2.0) => /lib/tls/libdl.so.2
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1.2) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.3.2) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
        /usr/lib/libg2c.so.0:
                libm.so.6 (GLIBC_2.0) => /lib/tls/libm.so.6
                libc.so.6 (GLIBC_2.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.2) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
        /lib/tls/libm.so.6:
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
        /lib/libgcc_s.so.1:
                libc.so.6 (GLIBC_2.2.4) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
        /lib/tls/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
        /lib/tls/libdl.so.2:
                libc.so.6 (GLIBC_2.1.3) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/tls/libc.so.6
                libc.so.6 (GLIBC_PRIVATE) => /lib/tls/libc.so.6
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

i installed all the libs that show here but i didn't have luck, i still get only the "killed" msg..
i am absolutely out of ideas..
i CANT install fedora in order to work with this program and after all WHY it works on ONE machine with SID and not in the other SID ones (im using kanotix).
any idea would be appreciated!
Thanks

tomdkat 03-10-2006 09:57 AM

Well, the one piece of information you haven't provided is the *exact* error message that you get, if you're getting one, since that might contain a clue that might help. :)

You said you "followed the errors it gave", but you didn't post those messages here. Do that first and then we'll see if we can get this figured out.

Peace...

assasukasse 03-10-2006 01:20 PM

hello tomdkat, and thanks for answering..
the error message i get is exactly this one: "Killed"
nothing else.
im really getting crazy..if only there was another message that gives me a clue would be easier..

tomdkat 03-10-2006 03:04 PM

Quote:

Originally Posted by assasukasse
hello tomdkat, and thanks for answering..
the error message i get is exactly this one: "Killed"
nothing else.

Oh that message. Here's what you need to do:

"Fix it" :D

Seriously, can you post some of the dependency messages you were getting previously?

Peace...

assasukasse 03-11-2006 02:07 AM

tomdkat unfortunately the pc doesn't give me any dep error message..
the other kanotix machine did, this one no..
strange, they have the same distro..
a friend advised me to use strace, i will try and if i find something i will post here.

assasukasse 03-11-2006 06:53 AM

hello
this is the output of strace -o when run on this machine (here mcnp works)

Code:

execve("./mcnp", ["./mcnp"], [/* 15 vars */]) = 0
uname({sys="Linux", node="thunderbird", ...}) = 0
brk(0)                                  = 0x3eff5000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f31000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f30000
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=68889, ...}) = 0
old_mmap(NULL, 68889, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f1f000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/libX11.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\24"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=826256, ...}) = 0
old_mmap(NULL, 830392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e54000
old_mmap(0xb7f1b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc6000) = 0xb7f1b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libg2c.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 h\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=109700, ...}) = 0
old_mmap(NULL, 163396, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e2c000
old_mmap(0xb7e46000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0xb7e46000
old_mmap(0xb7e47000, 52804, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e47000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libm.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`3\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=149264, ...}) = 0
old_mmap(NULL, 151712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e06000
old_mmap(0xb7e2a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0xb7e2a000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\30\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=40188, ...}) = 0
old_mmap(NULL, 43336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dfb000
old_mmap(0xb7e05000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0xb7e05000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260O\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1270928, ...}) = 0
old_mmap(NULL, 1276892, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7cc3000
old_mmap(0xb7df1000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e000) = 0xb7df1000
old_mmap(0xb7df9000, 7132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7df9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libdl.so.2", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\f\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9592, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cc2000
old_mmap(NULL, 12404, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7cbe000
old_mmap(0xb7cc0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xb7cc0000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cbd000
mprotect(0xb7df1000, 20480, PROT_READ)  = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7cbd6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7f1f000, 68889)              = 0
rt_sigaction(SIGFPE, {0xb7e34200, [FPE], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGABRT, {0xb7e34230, [ABRT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTRAP, {0xb7e342f0, [TRAP], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0xb7e34260, [QUIT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0xb7e34290, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0xb7e342c0, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0
fstat64(2, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
getpid()                                = 13249
geteuid32()                            = 0
open("/tmp/pvmd.0", O_RDONLY)          = -1 ENOENT (No such file or directory)
write(2, "libpvm [pid13249] ", 18)      = 18
write(2, "/tmp/pvmd.0: No such file or dir"..., 39) = 39
geteuid32()                            = 0
open("/tmp/pvmd.0", O_RDONLY)          = -1 ENOENT (No such file or directory)
write(2, "libpvm [pid13249] ", 18)      = 18
write(2, "/tmp/pvmd.0: No such file or dir"..., 39) = 39
geteuid32()                            = 0
open("/tmp/pvmd.0", O_RDONLY)          = -1 ENOENT (No such file or directory)
write(2, "libpvm [pid13249] ", 18)      = 18
write(2, "/tmp/pvmd.0: No such file or dir"..., 39) = 39
write(2, "libpvm [pid13249]: ", 19)    = 19
write(2, "pvm_mytid(): Can\'t contact local"..., 40) = 40
getrusage(RUSAGE_SELF, {ru_utime={0, 4000}, ru_stime={0, 16001}, ...}) = 0
time(NULL)                              = 1142081287
brk(0)                                  = 0x3eff5000
brk(0x3f016000)                        = 0x3f016000
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=951, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=951, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c9d000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"..., 131072) = 951
close(3)                                = 0
munmap(0xb7c9d000, 131072)              = 0
time(NULL)                              = 1142081287
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f2f000
write(1, " mcnp    ver=4ca1 ld=08/22/00  "..., 71) = 71
stat64("inp", 0xbfe46890)              = -1 ENOENT (No such file or directory)
write(1, "\n", 1)                      = 1
write(1, " bad trouble in subroutine exeme"..., 71) = 71
write(1, " input file inp      does not ex"..., 71) = 71
write(1, "\n", 1)                      = 1
geteuid32()                            = 0
open("/tmp/pvmd.0", O_RDONLY)          = -1 ENOENT (No such file or directory)
write(2, "libpvm [pid13249] ", 18)      = 18
write(2, "/tmp/pvmd.0: No such file or dir"..., 39) = 39
_llseek(2, 0, 0xbfe46838, SEEK_CUR)    = -1 ESPIPE (Illegal seek)
fstat64(2, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
_llseek(2, 0, 0xbfe46844, SEEK_END)    = -1 ESPIPE (Illegal seek)
_llseek(2, 0, 0xbfe46838, SEEK_CUR)    = -1 ESPIPE (Illegal seek)
_llseek(1, 0, 0xbfe46838, SEEK_CUR)    = -1 ESPIPE (Illegal seek)
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 1), ...}) = 0
_llseek(1, 0, 0xbfe46844, SEEK_END)    = -1 ESPIPE (Illegal seek)
_llseek(1, 0, 0xbfe46838, SEEK_CUR)    = -1 ESPIPE (Illegal seek)
munmap(0xb7f2f000, 4096)                = 0
exit_group(0)                          = ?

and this is where it doesn't work:
strace -v -o
Code:

execve("./mcnp", ["./mcnp"], ["KDE_MULTIHEAD=false", "SSH_AGENT_PID=13376", "DM_CONTROL=/var/run/xdmctl", "TERM=xterm", "SHELL=/bin/bash", "XDM_MANAGED=/var/run/xdmctl/xdmc"..., "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc"..., "GTK_RC_FILES=/etc/gtk/gtkrc:/hom"..., "GS_LIB=/home/usero/.fonts", "WINDOWID=8388615", "OLDPWD=/home/usero", "KDE_FULL_SESSION=true", "USER=usero", "SSH_AUTH_SOCK=/tmp/ssh-LsSiE1332"..., "SESSION_MANAGER=local/thunderbir"..., "XPSERVERLIST=", "PAGER=/usr/bin/most", "KONSOLE_DCOP=DCOPRef(konsole-134"..., "DESKTOP_SESSION=kde", "PATH=/home/usero/.dist/bin:/s"..., "KONSOLE_DCOP_SESSION=DCOPRef(kon"..., "PWD=/home/usero/MCNP", "LANG=C", "SHLVL=2", "HOME=/home/usero", "LANGUAGE=us", "XCURSOR_THEME=redglass", "LOGNAME=usero", "DBUS_SESSION_BUS_ADDRESS=unix:ab"..., "DISPLAY=:0.0", "COLORTERM=", "_=/usr/bin/strace"]) = -1 ENOMEM (Cannot allocate memory)
+++ killed by SIGKILL +++

i "suppose" is a insufficient memory problem...
since if i use KDE and open a bunch on windows on the machine where it works i get the same error msg.
any idea how can i check how much memory is needed by this proggie to run?

Thanks

tomdkat 03-11-2006 10:20 AM

Quote:

Originally Posted by assasukasse
i "suppose" is a insufficient memory problem...
since if i use KDE and open a bunch on windows on the machine where it works i get the same error msg.
any idea how can i check how much memory is needed by this proggie to run?

Well, you can use the "free" command to see how much RAM you have free before you try running the program. I have no way of knowing how much memory it will want at run-time.

Maybe you can track down the developer of the app and see if they have any ideas.

I'm stumped. :(

Peace...

assasukasse 03-11-2006 04:35 PM

hello
i asked the man that compiled it and he adviced me that the application will run only if it sees at least 850mb free memory, ram+swap is not important, but must be at least 850mb.
so i enlarged my swapfile and it ran fine..
wasted barely 20mb ram, so i dun have a clue why it needs 850mb...

tomdkat 03-11-2006 05:36 PM

Glad you got it working. It would have beem nice for the program to generate an "insufficient memory" message before terminating, but I guess that's asking too much. :)

How much swap did you have allocated previously and how much RAM do you have installed?

I've always tended to have TONS of swap allocated, even when I had little RAM. I've always had at least 2GB of swap space reserved even though I've never used more than about 300MB of it.

I imagine performance of the app would suck as more and more virtual memory was being used but you can judge that as you use it. :)

Peace...

assasukasse 03-12-2006 03:36 AM

unfortunately i am using an old laptop with barely 3gb of diskspace..
if i use too much swap, there won't be space for my stuffs :D


All times are GMT -5. The time now is 12:30 AM.