segfault in current master

Brian Candler B.Candler at pobox.com
Thu Feb 14 16:17:49 CET 2013


Just tried to build current master branch under OSX:
./configure -with-redis-include-dir=/usr/local/include/hiredis --enable-boilermake --prefix=/Users/brian/Build/freeradius-master && make && make install

(Note: This is from a git checkout where I had switched branches, but I have
done a "make distclean" first)

Then I symlinked ../mods-available/redis and rediswho into mods-enabled/.
That's the only config change I made.

Started it with sbin/radiusd -X (as unpriviledged user), send a radclient
packet like this:

  echo -e "User-Name = brian\nFramed-IP-Address = 1.2.3.4\nAcct-Status-Type = Start\n" | bin/radclient localhost acct testing123

and this is what happened:

rad_recv: Accounting-Request packet from host 127.0.0.1 port 54630, id=248, length=39
	User-Name = "brian"
	Framed-IP-Address = 1.2.3.4
	Acct-Status-Type = Start
(0) # Executing section preacct from file /Users/brian/Build/freeradius-master/etc/raddb/sites-enabled/default
(0)   group preacct {
(0)  - entering group preacct {...}
(0)   [preprocess] = ok
(0)    policy acct_unique {
(0)   - entering policy acct_unique {...}
(0)    ? if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i)
(0) 	expand: '%{string:Class}' -> ''
Segmentation fault: 11

Oops. But annoyingly, running it again under gdb it was fine:

gdb sbin/radiusd
run -X
...
rad_recv: Accounting-Request packet from host 127.0.0.1 port 62354, id=3, length=39
	User-Name = "brian"
	Framed-IP-Address = 1.2.3.4
	Acct-Status-Type = Start
(0) # Executing section preacct from file /Users/brian/Build/freeradius-master/etc/raddb/sites-enabled/default
(0)   group preacct {
(0)  - entering group preacct {...}
(0)   [preprocess] = ok
(0)    policy acct_unique {
(0)   - entering policy acct_unique {...}
(0)    ? if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i)
(0) 	expand: '%{string:Class}' -> ''
(0) ? Evaluating ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i) -> FALSE
(0)    ? if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i) -> FALSE
(0)     else else {
(0)    - entering else else {...}
(0)     update request {
(0) 	expand: '%{User-Name}%{Acct-Session-ID}%{NAS-IP-Address}%{NAS-Identifier}%{NAS-Port-ID}%{NAS-Port}' -> 'brian127.0.0.1'
(0) 	expand: '%{md5:%{User-Name}%{Acct-Session-ID}%{NAS-IP-Address}%{NAS-Identifier}%{NAS-Port-ID}%{NAS-Port}}' -> '434d399a6c4094ac3ee91533331275e8'
(0)     } # update request = ok
(0)    - else else returns ok
(0)   - policy acct_unique returns ok
(0) suffix : No '@' in User-Name = "brian", looking up realm NULL
(0) suffix : No such realm "NULL"
(0)   [suffix] = noop
(0)   [files] = noop
(0) # Executing section accounting from file /Users/brian/Build/freeradius-master/etc/raddb/sites-enabled/default
(0)   group accounting {
(0)  - entering group accounting {...}
(0) detail : 	expand: '%{Packet-Src-IP-Address}' -> '127.0.0.1'
(0) detail : 	expand: '/Users/brian/Build/freeradius-master/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d' -> '/Users/brian/Build/freeradius-master/var/log/radius/radacct/127.0.0.1/detail-20130214'
(0) detail : /Users/brian/Build/freeradius-master/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d expands to /Users/brian/Build/freeradius-master/var/log/radius/radacct/127.0.0.1/detail-20130214
(0) detail : 	expand: '%t' -> 'Thu Feb 14 14:58:07 2013'
(0)   [detail] = ok
(0)   [unix] = noop
(0)   [exec] = noop
(0) attr_filter.accounting_response : 	expand: '%{User-Name}' -> 'brian'
(0) attr_filter.accounting_response : Matched entry DEFAULT at line 12
(0)   [attr_filter.accounting_response] = updated
Sending Accounting-Response of id 3 from 0.0.0.0 port 1813 to 127.0.0.1 port 62354
(0) Finished request 0.
Waking up in 0.3 seconds.
(0) Cleaning up request packet ID 3 with timestamp +41
Ready to process requests.

Running again without gdb, it still crashes.

So next thing is to try to get a core dump:

(configure: allow_core_dumps = yes in radiusd.conf)
(check /cores directory is writeable)
ulimit -c unlimited
sbin/radiusd -X

Crashes but no dump :-(

Suspiciously, the message "Core dumps are enabled." does not appear on the
console output.

I'll keep poking around, but if someone knows why the core dumps aren't
being created, that would save me some time.

Cheers,

Brian.


More information about the Freeradius-Devel mailing list