Bug 1917157 - python3-freeradius: module fails to load due to undefined symbol
Summary: python3-freeradius: module fails to load due to undefined symbol
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: freeradius
Version: 33
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio Torres
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1948622
TreeView+ depends on / blocked
 
Reported: 2021-01-17 17:35 UTC by Emil Renner Berthing
Modified: 2021-09-30 11:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-09-30 11:49:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-6992 0 None None None 2021-09-30 11:53:40 UTC

Description Emil Renner Berthing 2021-01-17 17:35:25 UTC
Description of problem:

The python3 freeradius module fails to load. When radiusd is configured to use the python3 module it errors on startup with the message:

Failed to link to module 'rlm_python3': /usr/lib64/freeradius/rlm_python3.so: undefined symbol: PyTuple_Type

Version-Release number of selected component (if applicable):

python3-freeradius-3.0.21-7.fc33.x86_64

How reproducible:

Every time radiusd tries to start.

Steps to Reproduce:
1. Install python3-freeradius
2. Configure radiusd to use the python3 module
3. Start the radiusd server

Actual results:

Module doesn't load and radiusd fails to start.

Expected results:

Module would be loaded and working.

Additional info:

This happens on a fresh install of Fedora 33 with only the fedora and fedora-updates repos enabled. This used to work in Fedora 31, but I haven't tried Fedora 32.

Comment 1 Emil Renner Berthing 2021-01-17 20:10:05 UTC
Ok, I just tried on Fedora 32, and that too seems to be broken in the same way.

However I think the problem is that rlm_python3.so is missing libpython3.so as a dependency:

root@space~# ldd /usr/lib64/freeradius/rlm_python3.so 
	linux-vdso.so.1 (0x00007fff7dfe0000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6d2f27c000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f6d2f275000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f6d2f0aa000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6d2f2ae000)

Forcing the libpython3.so to be loaded seems to fix the issue:

root@space~# cat /etc/systemd/system/radiusd.service.d/libpython3.conf 
[Service]
Environment=LD_PRELOAD='/usr/lib64/libpython3.so'

Comment 2 Fedora Admin user for bugzilla script actions 2021-03-02 00:10:35 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Robbie Harwood 2021-03-10 22:58:07 UTC
Can you share your radius configuration files?

Comment 4 Emil Renner Berthing 2021-03-10 23:20:12 UTC
I can, but it's probably easier to just enable the python3 example module by symlink /etc/raddb/mods-enabled/python3 to ../mods-available/python3 which should load the python module and run /etc/raddb/mods-config/example.py.

See https://wiki.freeradius.org/modules/Rlm_python

Comment 5 Emil Renner Berthing 2021-03-10 23:31:19 UTC
Sorry, *run /etc/raddb/mods-config/python3/example.py.

This reminds me to suggest that future versions of the radius packages should probably drop /etc/raddb/mods-available/python and put /etc/raddb/mods-available/python3 in the python3-freeradius package.

Comment 6 Robbie Harwood 2021-03-22 19:38:44 UTC
Thanks.  I'm swamped at the moment, but if you want this sooner, I'm happy to take pull requests at https://src.fedoraproject.org/rpms/freeradius

Comment 8 Emil Renner Berthing 2021-06-25 19:57:19 UTC
Thanks!


Note You need to log in before you can comment on or make changes to this bug.