[erlang-bugs] A small bug I ran into with ct_run on FreeBSD 8.2

Jesper Louis Andersen <>
Thu May 5 12:11:33 CEST 2011

Here is a problem I ran into. The machine is:

FreeBSD shadow 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
     :/usr/obj/usr/src/sys/GENERIC  amd64

Sympton: I try to execute ct_run on my etorrent project:

./rel/etorrent/erts-*/bin/ct_run -spec etorrent_test.spec | tee test.log
ct_run: Error 2 executing './rel/etorrent/erts-5.8.4/bin/erl'.

which is odd, because I *just* created a release with an Erl in it. Oh
well, ktrace(1) to the rescue. From the kdump(1) we see the following:

1744 ct_run   NAMI  "./rel/etorrent/erts-5.8.4/bin/erl"
1744 ct_run   NAMI  "/bin/bash"
1744 ct_run   RET   execve -1 errno 2 No such file or directory

which shows:

a) There is an assumption bash is at /bin/bash. This is almost always
not the case, unless the system is Linux.
b) The error message is wrong. The error is due to the missing
/bin/bash, not the missing file.

Temporary workaround:

sudo ln -s /usr/local/bin/bash /bin/bash

this fixes the problem so I am sure this is what happens.


More information about the erlang-bugs mailing list