Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
segmentation fault in freeradius 2.1.6 caused by libc-2.17 ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
plindgren90
n00b
n00b


Joined: 05 Jun 2014
Posts: 6

PostPosted: Mon Jun 23, 2014 10:03 am    Post subject: segmentation fault in freeradius 2.1.6 caused by libc-2.17 ? Reply with quote

Hello.

I am currently trying to compile freeradius 2.1.6 on a Gentoo 64-bit server. I need this specific version because of external requirements.

This is what i have done to install it:

download freeradius 2.1.6 into /root/downloads

edit configure and add a prefix /usr/local/myprefix
Code:
./configure


nano src/modules/rlm_eap/Makefile
Locate the entry below..
Code:
radeapclient: radeapclient.lo $(CLIENTLIBS) $(LIBTOOL) –mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) -o radeapclient radeapclient.lo$(CLIENTLIBS) $(LIBS) $(OPENSSL_LIBS)

and change it to..
Code:
radeapclient: radeapclient.lo $(CLIENTLIBS) $(LIBTOOL) –mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) -o radeapclient radeapclient.lo$(CLIENTLIBS)
/root/downloads/freeradius-server-2.1.6/src/lib/.libs/libfreeradius-radius-2.1.6.so $(LIBS) $(OPENSSL_LIBS)

patch /src/main/modules.c with the below patch after #includes:

Code:
#ifndef lt__PROGRAM__LTX_preloaded_symbols
LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
#endif



save the files and go back to your Freeradius main folder then issue make
Code:
make

After these edits i have no make issues and i do:
Code:
ldconfig
make install


The installation works fine and if i do
Code:
/usr/local/myprefix/radiusd -v

it outputs correctly

then if i do radiusd -X
i get this:
Code:
FreeRADIUS Version 2.1.6, for host x86_64-unknown-linux-gnu, built on Jun 23 2014 at 12:16:55
Copyright (C) 1999-2009 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License v2.
Starting - reading configuration files ...
including configuration file /usr/local/myprefix/etc/raddb/radiusd.conf
including configuration file /usr/local/myprefix/etc/raddb/proxy.conf
including configuration file /usr/local/myprefix/etc/raddb/clients.conf
including files in directory /usr/local/myprefix/etc/raddb/modules/
including configuration file /usr/local/myprefix/etc/raddb/modules/pam
including configuration file /usr/local/myprefix/etc/raddb/modules/acct_unique
including configuration file /usr/local/myprefix/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /usr/local/myprefix/etc/raddb/modules/sradutmp
including configuration file /usr/local/myprefix/etc/raddb/modules/always
including configuration file /usr/local/myprefix/etc/raddb/modules/mac2ip
including configuration file /usr/local/myprefix/etc/raddb/modules/krb5
including configuration file /usr/local/myprefix/etc/raddb/modules/detail.log
including configuration file /usr/local/myprefix/etc/raddb/modules/echo
including configuration file /usr/local/myprefix/etc/raddb/modules/pap
including configuration file /usr/local/myprefix/etc/raddb/modules/files
including configuration file /usr/local/myprefix/etc/raddb/modules/chap
including configuration file /usr/local/myprefix/etc/raddb/modules/otp
including configuration file /usr/local/myprefix/etc/raddb/modules/radutmp
including configuration file /usr/local/myprefix/etc/raddb/modules/linelog
including configuration file /usr/local/myprefix/etc/raddb/modules/exec
including configuration file /usr/local/myprefix/etc/raddb/modules/expiration
including configuration file /usr/local/myprefix/etc/raddb/modules/logintime
including configuration file /usr/local/myprefix/etc/raddb/modules/detail.example.com
including configuration file /usr/local/myprefix/etc/raddb/modules/inner-eap
including configuration file /usr/local/myprefix/etc/raddb/modules/mschap
including configuration file /usr/local/myprefix/etc/raddb/modules/attr_rewrite
including configuration file /usr/local/myprefix/etc/raddb/modules/etc_group
including configuration file /usr/local/myprefix/etc/raddb/modules/mac2vlan
including configuration file /usr/local/myprefix/etc/raddb/modules/detail
including configuration file /usr/local/myprefix/etc/raddb/modules/expr
including configuration file /usr/local/myprefix/etc/raddb/modules/ldap
including configuration file /usr/local/myprefix/etc/raddb/modules/smsotp
including configuration file /usr/local/myprefix/etc/raddb/modules/attr_filter
including configuration file /usr/local/myprefix/etc/raddb/modules/policy
including configuration file /usr/local/myprefix/etc/raddb/modules/perl
including configuration file /usr/local/myprefix/etc/raddb/modules/checkval
including configuration file /usr/local/myprefix/etc/raddb/modules/digest
including configuration file /usr/local/myprefix/etc/raddb/modules/ippool
including configuration file /usr/local/myprefix/etc/raddb/modules/counter
including configuration file /usr/local/myprefix/etc/raddb/modules/unix
including configuration file /usr/local/myprefix/etc/raddb/modules/wimax
including configuration file /usr/local/myprefix/etc/raddb/modules/passwd
including configuration file /usr/local/myprefix/etc/raddb/modules/preprocess
including configuration file /usr/local/myprefix/etc/raddb/modules/smbpasswd
including configuration file /usr/local/myprefix/etc/raddb/modules/realm
including configuration file /usr/local/myprefix/etc/raddb/modules/sql_log
including configuration file /usr/local/myprefix/etc/raddb/eap.conf
including configuration file /usr/local/myprefix/etc/raddb/policy.conf
including files in directory /usr/local/myprefix/etc/raddb/sites-enabled/
including configuration file /usr/local/myprefix/etc/raddb/sites-enabled/inner-tunnel
including configuration file /usr/local/myprefix/etc/raddb/sites-enabled/default
including configuration file /usr/local/myprefix/etc/raddb/sites-enabled/control-socket
including dictionary file /usr/local/myprefix/etc/raddb/dictionary
main {
   prefix = "/usr/local/myprefix"
   localstatedir = "/usr/local/myprefix/var"
   logdir = "/usr/local/myprefix/var/log/radius"
   libdir = "/usr/local/myprefix/lib"
   radacctdir = "/usr/local/myprefix/var/log/radius/radacct"
   hostname_lookups = no
   max_request_time = 30
   cleanup_delay = 5
   max_requests = 1024
   allow_core_dumps = no
   pidfile = "/usr/local/myprefix/var/run/radiusd/radiusd.pid"
   checkrad = "/usr/local/myprefix/sbin/checkrad"
   debug_level = 0
   proxy_requests = yes
 log {
   stripped_names = no
   auth = no
   auth_badpass = no
   auth_goodpass = no
 }
 security {
   max_attributes = 200
   reject_delay = 1
   status_server = yes
 }
}
radiusd: #### Loading Realms and Home Servers ####
 proxy server {
   retry_delay = 5
   retry_count = 3
   default_fallback = no
   dead_time = 120
   wake_all_if_all_dead = no
 }
 home_server localhost {
   ipaddr = 127.0.0.1
   port = 1812
   type = "auth"
   secret = "testing123"
   response_window = 20
   max_outstanding = 65536
   require_message_authenticator = no
   zombie_period = 40
   status_check = "status-server"
   ping_interval = 30
   check_interval = 30
   num_answers_to_alive = 3
   num_pings_to_alive = 3
   revive_interval = 120
   status_check_timeout = 4
   irt = 2
   mrt = 16
   mrc = 5
   mrd = 30
 }
 home_server_pool my_auth_failover {
   type = fail-over
   home_server = localhost
 }
 realm example.com {
   auth_pool = my_auth_failover
 }
 realm LOCAL {
 }
radiusd: #### Loading Clients ####
 client localhost {
   ipaddr = 127.0.0.1
   require_message_authenticator = no
   secret = "testing123"
   nastype = "other"
 }
Segmentation fault (core dumped)


So then i do:
Code:
gdb radiusd core

and the output is:
Code:
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/local/myprefix/sbin/radiusd...done.
[New LWP 2424]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./radiusd -X'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f8d3e34c526 in ?? () from /lib64/libc.so.6

So from what i can tell. this error originates from something in /lib64/lib.so.6 which is a link to libc-2.17.so

Does anyone know how to troubleshoot this issue?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8974

PostPosted: Tue Jun 24, 2014 1:52 am    Post subject: Reply with quote

You need debug symbols for glibc and possibly for your program. Why are you installing the program outside of the package manager? If you need an old version, find or create an ebuild for that version, but keep it under control of Portage so that installed files can be tracked and shared libraries can be preserved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum