FreeRADIUS 2 not listening on right port
John Dennis
jdennis at redhat.com
Wed May 28 17:57:04 CEST 2008
John Dennis wrote:
> Phil Mayers wrote:
>> Alan DeKok wrote:
>>> Michael Griego wrote:
>>>> I did a little looking into this this evening. This assessment
>>>> looks to
>>>> be correct as it looks to be related to compiler optimizations. With
>>>> the optimizations disabled in Make.inc, FreeRADIUS will start up on
>>>> the
>>>> correct port. For the fr_socket function, gcc appears to be
>>>> optimizing
>>>> the arguments by sending them through the registers instead of the
>>>> stack
>>>> frame, but the "port" argument is being clobbered ("optimized out")
>>>> before the htons(port) call. Specifically, according to a
>>>> step-through
>>>> with GDB, after the first function call in fr_socket (which is to
>>>> socket()), the port variable is gone ("optimized out").
>>>
>>> <sigh> I've started testing the server with other compilers. GCC is
>>> getting too ugly for my liking.
>>>
>>> I'll put a note on the main web page.: DON'T USE -O2 ON FEDORA!
>>
Please note, this bug only seems to be present in the F-9 (recently
released version 9 of Fedora).
>> I can confirm this; I've opened a bug in the Fedora bugzilla:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=446864
>>
>> ...with any luck, the toolchain will get fixed - it's clearly not a
>> FreeRadius bug, and I wonder what else it's broken...
>
> FYI, I have rebuilt the F-9 RPM with optimization turned off and
> submitted it for an update (should hit the mirrors sometime soon).
>
> Just a heads up. I have some time constraints at my end. The only
> thing I had time for before leaving until next Wednesday was to
> rebuild the package, I cannot not confirm at this moment if the
> resulting package resolves the issue, but given the comments in this
> thread it would appear to solve the problem in the near term. I
> thought it was worthwhile to push the new RPM out, even under these
> constraints.
>
> When I return I will investigate the root cause of the failure
> further. Obviously this is a temporary workaround and if there are
> compiler issues it needs to get addressed as soon as possible.
I have investigated this further. It does appear as though there is a
compiler bug based on my examination of the generated machine code, I
have opened the following bug report against GCC. The bug report
includes the preprocessed C code, the generated machine code, and the
disassembly of the machine code. The bug report also points the exact
line (compound statement) which seems to be omitted in the optimized
machine code.
https://bugzilla.redhat.com/show_bug.cgi?id=448743
For the time being I will build the F-9 FreeRADIUS packages without
optimization until this is resolved.
>
> In the interim I would appreciate feedback on the new package.
>
> The new package is: freeradius-2.0.3-3.fc9
>
> My sincere thank you to everyone who contributed to diagnosing the
> problem and my apologies for not catching this earlier.
>
--
John Dennis <jdennis at redhat.com>
More information about the Freeradius-Users
mailing list