Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
UnixODBC+FreeTDS broken on FR3 on RHEL7 #1277
Comments
|
There's nothing in the server which uses the "get_vtable" API. So the problem is in the libraries. My guess is that the libraries suddenly require an additional library to be linked to the application. Or, the libraries are broken. A simple google search yields this page: http://fossies.org/dox/unixODBC-2.3.4/shl__load_8c.html Which says:
So it's a library problem. The libraries were built such that they didn't define get_vtable correctly. Please file a bug with CentOS and/or RedHat. Ask them to supply libraries which aren't broken. There is nothing we can do to FreeRADIUS which will fix this problem. |
alandekok
closed this
Sep 28, 2015
bluikko
commented
Sep 28, 2015
|
Thank you! |
gustavoheredia
commented
Oct 2, 2015
|
Same issue in Ubuntu 14.04 with Freeradius 3.1.0 rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used |
bluikko
commented
Oct 3, 2015
|
Can you please give more information - what version of UnixODBC? Seems you use FreeTDS with it, what version? Also how did you install UnixODBC/FreeTDS, compile from source or install from a repository? |
gustavoheredia
commented
Oct 7, 2015
|
UnixODBC 2.2.14p2-5ubuntu5 and FreeTDS 0.91-5 installed from a repository . With this version of UnixODBC and FreeTDS in the same machine works without issue FreeRadius 2.1.12 with rlm_sql_unixodbc |
|
Check the linkages on 2.1.12 and 3.0.x, see how they differ? |
bluikko
commented
Oct 8, 2015
|
That (gustavoheredia) does sound like a problem in FreeRADIUS or problem in build of FreeRADIUS... edit: removed broken link |
arr2036
reopened this
Oct 9, 2015
gustavoheredia
commented
Oct 9, 2015
|
bluiko i can`t see the link that you mentioned (Page not found) |
bluikko
commented
Oct 9, 2015
|
Thanks, fixed |
|
What was the conclusion with this? |
|
Apparently nothing, i'll close the issue then... |
arr2036
closed this
Nov 27, 2015
bluikko
commented
Nov 27, 2015
|
No conclusion, your closing of the bug seems to be the only reply from FR side? |
|
|
Did we receive any linkage information? no. If you're not willing to help diagnose this issue, i'm not going to keep it hanging around in the bug tracker. |
bluikko
commented
Nov 27, 2015
|
I can do troubleshooting but I am not a developer. If there are some specific commands I can run to help, please list them. Otherwise I understand closing the bug if nobody would work on it anyways. |
|
Run |
arr2036
reopened this
Nov 27, 2015
bluikko
commented
Nov 27, 2015
|
Not working: $ cat /etc/centos-release Working: $ cat /etc/centos-release |
bluikko
commented
Nov 27, 2015
|
Seems to be the solution, so this bug can be closed. |
alandekok
closed this
Nov 27, 2015
|
@alandekok, @arr2036, it appears there's more to this. We did a bit of research for our RHEL customers, and it appears the problem is that FreeRADIUS defines symbols lt_dlopenext, lt_dlsym, lt_dlclose, and lt_dlerror, which are also defined by libltdl, which is used by libodbc. As a result, when rlm_sql_unixodbc loads libodbc, which in turn loads libltdl, it gets to use the FreeRADIUS version of those symbols, not the ones from libltdl. From this chaos ensues, including linker data corruption, as seen in those question marks in the output in the first message here. My question is: does anything else use these, except the explicit uses in FreeRADIUS code, and can we perhaps rename these to avoid the clash? If yes, then I'll do the patch. If no, then what else uses this and what options do we have? Thank you. |
|
You can reproduce the problem with this command:
Provided you added this to /etc/odbcinst.ini:
And put this into /etc/odbc.ini:
Here is an excerpt from LD_DEBUG=all output:
|
arr2036
reopened this
Nov 3, 2016
|
Ah, that's what's going on. I don't think they're used, just vestigial @alandekok? |
|
They're used for the local dlopen wrappers. They could just as well be named |
|
Alright, thanks Alan, Arran. I'll do a patch for v3.0.x renaming them to fr_* today or tomorrow, if you don't do it first. |
alandekok
added a commit
that referenced
this issue
Nov 3, 2016
|
|
alandekok |
cb75828
|
alandekok
closed this
Nov 3, 2016
|
Thanks, Alan! |
praiskup
commented
Nov 3, 2016
|
Thanks! Just a suggestion, it is always worth limiting the number of "exported symbols" as much as possible, so you avoid such linking issues in future. IOW, it is very rare case some symbol is going to be used (from binary), for example [1]. But again, thank you -> changing name-space should work for us. [1] https://blog.flameeyes.eu/2008/02/why-would-an-executable-export-symbols/ |
|
The symbols aren't exported in the radiusd bindary. They're exported in libfreeradius-server, which modules link to and is linked to by the radiusd binary. |
praiskup
commented
Nov 3, 2016
|
That would mean the library is linked statically? But anyways:
While
|
|
It changed in v3.1.x/v4.0.x. |
praiskup
commented
Nov 3, 2016
•
|
Great, thanks for the info! |
lytboris
pushed a commit
to lytboris/freeradius-server
that referenced
this issue
Nov 8, 2016
|
|
alandekok + |
40af09a
|
bluikko commentedSep 28, 2015
radiusd -X gives error when trying to use rlm_sql_unixodbc:
rlm_sql_unixodbc: 01000 [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libtdsodbc.so.0' : ??????: undefined symbol: get_vtable
This is NOT ODBC/TDS problem with libraries or so, since I can connect to the database with the "isql" tool just fine.
CentOS 7, tested with following UnixODBC and FreeTDS versions:
With RHEL7 standard FreeRADIUS 3.0.4
Many people have raised this issue on various mailing lists over the past few years and nobody seems to have an answer!