[Mono-dev] mono 1.2.5.1 installer on go-mono website is broken

Antti S. Lankila alankila at bel.fi
Sun Oct 7 09:42:49 EDT 2007


I tried to test my previous test.cs on the mono 1.2.5.1 by downloading 
it from the website. Unfortunately the installer is buggy and doesn't 
work at all. I straced it, and observed that it copies some data into a 
/tmp file with the intent to exec it. We are here right after the copy 
part has finished:

open("/tmp/upxATVSFYIAGWV", O_RDONLY)   = 3
access("/proc/6869/fd/3", R_OK|X_OK)    = 0
unlink("/tmp/upxATVSFYIAGWV")           = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
execve("/proc/6869/fd/3", ["../mono-1.2.5.1_2-installer.bin"], [/* 36 
vars */]) = -1 ENOENT (No such file or directory)

So it unlinks the file and tries to execve it via the proc fd, which is 
(as far as I know) only a symlink to the name of the real file that 
represents that fd. So in truth the underlying system call, execve(), 
relies on that tmp file still existing, even if the process does have an 
open fd to it.

The kernel version is 2.6.22-13-generic and libc is 2.6.1-1ubuntu9.

-- 
Antti



More information about the Mono-devel-list mailing list