<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,
<br>
<br>
I actually try to cross compile freeradius 2.0.9 for powerpc.
Everything looks good during compilation, but we get "Segmentation
Fault" on our host when executing "radiusd -X".
<br>
<br>
Our setup is :
<br>
- EGLIBC 2.9
<br>
- GCC 4.3.2
<br>
- Linux 2.6.31
<br>
<br>
Could you please help me to find a way to solve this problem.
<br>
<br>
Here you can find strace and gdb log.
<br>
<br>
Michel M.<br>
<br>
strace log :<br>
<br>
<small>sendto(4, "\0\0\0\24\0\26\3\1L\321-\374\0\0\0\0\0\0\0\0", 20,
0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20<br>
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\0\0\0000\0\24\0\2L\321-\374\0\0\7$\2\10\200\376\0\0\0\1\0\10\0\1\177\0\0\1"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 288<br>
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\0\0\0@\0\24\0\2L\321-\374\0\0\7$\n\200\200\376\0\0\0\1\0\24\0\1\0\0\0\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 128<br>
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\0\0\0\24\0\3\0\2L\321-\374\0\0\7$\0\0\0\0\0\0\0\1\0\24\0\1\0\0\0\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 20<br>
close(4) = 0<br>
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) =
0<br>
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0<br>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x48001000<br>
open("/usr/local/lib/rlm_exec.la", O_RDONLY) = 4<br>
fstat64(4, {st_mode=S_IFREG|0755, st_size=814, ...}) = 0<br>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x48002000<br>
read(4, "# rlm_exec.la - a libtool librar"..., 4096) = 814<br>
read(4, "", 4096) = 0<br>
close(4) = 0<br>
munmap(0x48002000, 4096) = 0<br>
open("/usr/local/lib/libpthread.la", O_RDONLY) = -1 ENOENT (No
such file or directory)<br>
open("/lib/libpthread.la", O_RDONLY) = -1 ENOENT (No such file
or directory)<br>
open("/usr/lib/libpthread.la", O_RDONLY) = -1 ENOENT (No such file
or directory)<br>
access("/usr/local/lib/libpthread.so", R_OK) = -1 ENOENT (No such
file or directory)<br>
access("/lib/libpthread.so", R_OK) = -1 ENOENT (No such file
or directory)<br>
access("/usr/lib/libpthread.so", R_OK) = 0<br>
futex(0x1016e378, FUTEX_WAKE_PRIVATE, 2147483647) = 0<br>
open("/usr/lib/libpthread.so", O_RDONLY) = 4<br>
read(4, "/* GNU ld script\n Use the shar"..., 512) = 219<br>
close(4) = 0<br>
open("/usr/local/lib/libresolv.la", O_RDONLY) = -1 ENOENT (No such
file or directory)<br>
open("/lib/libresolv.la", O_RDONLY) = -1 ENOENT (No such file
or directory)<br>
open("/usr/lib/libresolv.la", O_RDONLY) = -1 ENOENT (No such file
or directory)<br>
access("/usr/local/lib/libresolv.so", R_OK) = -1 ENOENT (No such
file or directory)<br>
access("/lib/libresolv.so", R_OK) = -1 ENOENT (No such file
or directory)<br>
access("/usr/lib/libresolv.so", R_OK) = 0<br>
open("/usr/lib/libresolv.so", O_RDONLY) = 4<br>
read(4,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0.X\0\0\0004"...,
512) = 512<br>
fstat64(4, {st_mode=S_IFREG|0755, st_size=92607, ...}) = 0<br>
mmap(0x6ffcb000, 150532, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x6ffcb000<br>
mprotect(0x6ffdd000, 61440, PROT_NONE) = 0<br>
mmap(0x6ffec000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x11000) = 0x6ffec000<br>
mmap(0x6ffee000, 7172, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6ffee000<br>
close(4) = 0<br>
open("/etc/ld.so.cache", O_RDONLY) = 4<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=4841, ...}) = 0<br>
mmap(NULL, 4841, PROT_READ, MAP_PRIVATE, 4, 0) = 0x48002000<br>
close(4) = 0<br>
open("/lib/libc.so.6", O_RDONLY) = 4<br>
read(4,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\356T\0\0\0004"...,
512) = 512<br>
fstat64(4, {st_mode=S_IFREG|0755, st_size=1733649, ...}) = 0<br>
mmap(0x6fe4f000, 1487896, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x6fe4f000<br>
mprotect(0x6ffa4000, 61440, PROT_NONE) = 0<br>
mmap(0x6ffb3000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x154000) = 0x6ffb3000<br>
mmap(0x6ffb8000, 9240, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6ffb8000<br>
close(4) = 0<br>
open("/lib/ld.so.1", O_RDONLY) = 4<br>
read(4,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1_x\0\0\0004"...,
512) = 512<br>
fstat64(4, {st_mode=S_IFREG|0755, st_size=143055, ...}) = 0<br>
mmap(0x6fe10000, 192148, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x6fe10000<br>
mprotect(0x6fe2e000, 61440, PROT_NONE) = 0<br>
mmap(0x6fe3d000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1d000) = 0x6fe3d000<br>
close(4) = 0<br>
mprotect(0x6fe3d000, 4096, PROT_READ) = 0<br>
mprotect(0x6ffb3000, 8192, PROT_READ) = 0<br>
mprotect(0x6ffec000, 4096, PROT_READ) = 0<br>
--- SIGSEGV (Segmentation fault) @ 0 (0) ---<br>
+++ killed by SIGSEGV +++</small><br>
<br>
gbd-radiusd.log : <br>
<small><br>
* 1 process 1821 0x100da888 in add_to_global ()<br>
<br>
Thread 1 (process 1821):<br>
#0 0x100da888 in add_to_global ()<br>
No locals.<br>
#1 0x100db1e4 in dl_open_worker ()<br>
No locals.<br>
#2 0x100d8fa0 in _dl_catch_error ()<br>
No locals.<br>
#3 0x100da620 in _dl_open ()<br>
No locals.<br>
#4 0x10096428 in dlopen_doit ()<br>
No locals.<br>
#5 0x100d8fa0 in _dl_catch_error ()<br>
No locals.<br>
#6 0x10096828 in _dlerror_run ()<br>
No locals.<br>
#7 0x10096364 in __dlopen ()<br>
No locals.<br>
#8 0x10074d34 in dlopen ()<br>
No locals.<br>
#9 0x10074cdc in sys_dl_open (loader_data=<value optimized
out>, <br>
filename=0x1027d5b8 "/usr/lib/libresolv.so") at ltdl.c:1115<br>
module = <value optimized out><br>
__FUNCTION__ = "sys_dl_open"<br>
#10 0x10071db8 in tryall_dlopen (handle=0xbff58570, <br>
filename=0x1027d5b8 "/usr/lib/libresolv.so", useloader=0x0) at
ltdl.c:2487<br>
cur = (lt_dlhandle) 0x1027d528<br>
loader = (lt_dlloader *) 0x1027d1e8<br>
saved_error = 0x101341fc "file not found"<br>
errors = <value optimized out><br>
#11 0x10074b40 in find_handle_callback (<br>
filename=0x1027d5b8 "/usr/lib/libresolv.so", data=0xbff58570,
<br>
ignored=<value optimized out>) at ltdl.c:2844<br>
notfound = 0<br>
#12 0x10072b54 in foreach_dirinpath (search_path=<value
optimized out>, <br>
base_name=0x1027d4d0 "libresolv.so", <br>
func=0x10074ae0 <find_handle_callback>,
data1=0xbff58570, data2=0x0)<br>
at ltdl.c:2767<br>
lendir = 9<br>
dir_name = 0x1027d515 "/usr/lib"<br>
result = <value optimized out><br>
filenamesize = 22<br>
lenbase = 12<br>
argz_len = 14<br>
argz = 0x1027d510 "/lib"<br>
filename = 0x1027d5b8 "/usr/lib/libresolv.so"<br>
canonical = 0x1027d4f8 "/lib:/usr/lib"<br>
__PRETTY_FUNCTION__ = "foreach_dirinpath"<br>
__FUNCTION__ = "foreach_dirinpath"<br>
#13 0x10072d74 in find_handle (search_path=0x10134088
"/lib:/usr/lib", <br>
base_name=0x1027d4d0 "libresolv.so", handle=0xbff58570) at
ltdl.c:2867<br>
__FUNCTION__ = "find_handle"<br>
#14 0x10073d74 in try_dlopen (phandle=0xbff585d8, <br>
filename=0x1027d4b8 "libresolv.so") at ltdl.c:3438<br>
saved_error = 0x101341fc "file not found"<br>
canonical = 0x1027d4d0 "libresolv.so"<br>
base_name = 0x1027d4d0 "libresolv.so"<br>
dir = 0x0<br>
name = <value optimized out><br>
errors = 0<br>
newhandle = (lt_dlhandle) 0x1027d528<br>
__PRETTY_FUNCTION__ = "try_dlopen"<br>
#15 0x10074a7c in lt_dlopenext (filename=<value optimized
out>) at ltdl.c:3606<br>
handle = (lt_dlhandle) 0x1027d528<br>
tmp = 0x1027d4b8 "libresolv.so"<br>
len = 9<br>
errors = <value optimized out><br>
__FUNCTION__ = "lt_dlopenext"<br>
#16 0x100746e4 in try_dlopen (phandle=0xbff58678, <br>
filename=<value optimized out>) at ltdl.c:3011<br>
file = <value optimized out><br>
libdir = 0x1027cf58 "/usr/local/lib"<br>
deplibs = 0x1027cf10 " /usr/local/lib/libfreeradius-radius.la
-lnsl -lresolv -lpthread"<br>
line = <value optimized out><br>
line_len = <value optimized out><br>
dlname = 0x0<br>
old_name = 0x1027d3e0 "librlm_exec.a"<br>
installed = 1<br>
saved_error = 0x0<br>
canonical = 0x1027d3c0 "rlm_exec.la"<br>
base_name = <value optimized out><br>
dir = 0x1027d5a0 "/usr/local/lib"<br>
name = 0x1027d3d0 "rlm_exec"<br>
errors = <value optimized out><br>
newhandle = <value optimized out><br>
__PRETTY_FUNCTION__ = "try_dlopen"<br>
#17 0x10074984 in lt_dlopenext (filename=<value optimized
out>) at ltdl.c:3564<br>
handle = (lt_dlhandle) 0x1027cf70<br>
tmp = 0x1027d3b0 "rlm_exec.la"<br>
len = 8<br>
errors = <value optimized out><br>
__FUNCTION__ = "lt_dlopenext"<br>
#18 0x10012aac in find_module_instance (modules=<value
optimized out>, <br>
instname=0x1019362c "exec", do_link=1) at modules.c:491<br>
check_config_safe = <value optimized out><br>
cs = (CONF_SECTION *) 0x10195bb0<br>
name1 = <value optimized out><br>
node = (module_instance_t *) 0x1027d290<br>
myNode = {<br>
name =
"exec\000\005¶`\020\031.\b\000\000\000\t¿õ\212@\020\000CÄ", '\0'
<repeats 20 times>, "\020\022\006´\020\031/þ\000\000\000
\000\000\000\000\000\000\000\000¿õ\212@\000\000\000\000\000\000\000\000\020\026-ø¿õ\220Ø\020\026\000\000\020\026\000\000\020\026.\b\020\021þ\034\000\000\000\000\020\002Y¸\020\021\224\004\020\026\000\000\020\021\234h\020\026\000\000\020\032 ¿õ\212\200\020\026ã|\000\000\000\024\020\026-ø¿õ\212\220\020\026\000\000\020\026\000\000\020\026-ø¿õ\220Ø\020\026\000\000\020\026\000\000\020\0314\200¿õ\212p\000\000\000\000\020\021¶ä\020\031\017\210¿õ\212\220\020\005¶\020\002\000\000\000¿õ\212¨\020\031"...,
<br>
entry = 0x10190f88, insthandle = 0x0, mutex = 0x0, cs =
0x10193480, <br>
dead = 270077832, mh = 0x1019362c}<br>
module_name =
<a class="moz-txt-link-rfc2396E" href="mailto:rlm_exec\000õ\206À\020\tCd\000\000\000\000\020\031û\020¿õ\206à\020\t.à\020\026\000\000\020\026.\b\020\026\000\000\000\000\000ÿH\000\003s\020\031û\020¿õ\206ð\020\t;\204\000\000\000\000\020\031û\020¿õ\2070\020\tI°\020\026\000\000\020\026.\b¿õ\211@\000\000\000\000\020\031\017h¿õ\207X¿õ\207\020\021\224\004¿õ\207X\020\031&\210¿õ\207@\020\005¶\020\002\000ã|¿õ\207X¿õ\207\200\020\021\224\004\020\031%Ð\020\026-ø¿õ\220Ø\020\026\000\000\020\026\000\000\020\026.\b\020\026\000\000¿õ\207Ø\020\031%Ð\020\026\000\000¿õ\211\030\020\031&\020\026;@\000\000\000\000">"rlm_exec\000õ\206À\020\tCd\000\000\000\000\020\031û\020¿õ\20
6à\020\t.à\020\026\000\000\020\026.\b\020\026\000\000\000\000\000ÿH\000\003s\020\031û\020¿õ\206ð\020\t;\204\000\000\000\000\020\031û\020¿õ\2070\020\tI°\020\026\000\000\020\026.\b¿õ\211@\000\000\000\000\020\031\017h¿õ\207X¿õ\207
\020\021\224\004¿õ\207X\020\031&\210¿õ\207@\020\005¶\020\002\000ã|¿õ\207X¿õ\207\200\020\021\224\004\020\031%Ð\020\026-ø¿õ\220Ø\020\026\000\000\020\026\000\000\020\026.\b\020\026\000\000¿õ\207Ø\020\031%Ð\020\026\000\000¿õ\211\030\020\031&
\020\026;@\000\000\000\000"</a>...<br>
__FUNCTION__ = "find_module_instance"<br>
#19 0x10012fec in setup_modules (reload=<value optimized
out>, <br>
config=0x10190f88) at modules.c:1542<br>
ci = (CONF_ITEM *) 0x10193608<br>
name = 0x1019362c "exec"<br>
cs = (CONF_SECTION *) 0x10193540<br>
modules = (CONF_SECTION *) 0x10193480<br>
listener = <value optimized out><br>
__FUNCTION__ = "setup_modules"<br>
#20 0x100106bc in read_mainconfig (reload=<value optimized
out>)<br>
at mainconfig.c:959<br>
p = 0x10190f68 "/usr/local/etc/raddb"<br>
cs = (CONF_SECTION *) 0x10190f88<br>
statbuf = {st_dev = 2065, st_ino = 8163, st_mode = 16877, <br>
st_nlink = 7, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, <br>
st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = {<br>
tv_sec = 1288775159, tv_nsec = 0}, st_mtim = {tv_sec =
1288780664, <br>
tv_nsec = 0}, st_ctim = {tv_sec = 1288780691, tv_nsec = 0},
__unused4 = 0, <br>
__unused5 = 0}<br>
cc = <value optimized out><br>
buffer = "/usr/local/etc/raddb/radiusd.conf", '\0' <repeats
711 times>, "¿õ\217°", '\0' <repeats 12 times>,
"¿õ\220ü\000\000\000!\000\000\000\000¿õ\220ø¿õ\220ð\020\006\226¤\020\006\235,\020\000\000\004",
'\0' <repeats 80 times>, "¿õ\2200", '\0' <repeats 12
times>,
"\020\026-\224\020\026éD¿õ\224\024\020\026öH¿õ\220 \020\ná\034",
'\0' <repeats 32 times>,
"\204\000\004h\020\026-ø¿õ\220°\020\026\000\000\020\t8è\000\000\000\000\020\026\000\000\000\000\000\000\020\026.°\020\021Ç\b\020\021Ë\214$\000\004l\020\026.°\020"...<br>
__FUNCTION__ = "read_mainconfig"<br>
#21 0x10015ac0 in main (argc=2, argv=0xbff59414) at radiusd.c:265<br>
rcode = <value optimized out><br>
argval = <value optimized out><br>
spawn_flag = 0<br>
dont_fork = 1<br>
flag = 0<br>
act = {__sigaction_handler = {sa_handler = 0, sa_sigaction =
0}, <br>
sa_mask = {__val = {0 <repeats 32 times>}}, sa_flags = 0,
sa_restorer = 0}</small><br>
<br>
</body>
</html>