Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549918 - net-dialup/accel-ppp: changing order of modules in config file will result in unresolved symbols during startup
Summary: net-dialup/accel-ppp: changing order of modules in config file will result in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2015-05-19 22:06 UTC by Christian Roessner
Modified: 2016-05-05 15:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
accel-ppp-1.9.0.ebuild (accel-ppp-1.9.0.ebuild,1.91 KB, text/plain)
2015-05-20 09:17 UTC, Christian Roessner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Roessner 2015-05-19 22:06:42 UTC
Something is really strange with the accel-ppp-1.8.0-r1 version. I can compile it, but when starting, it terminates and leaves a core.log file, which tells me many unresolved symbols.

The only solution is to enable a dozen of modules in the config file and to ensure that the order is correct. This is definitely a bug, as unused modules should never lead to unresolved symbols.

This is, what my log reported and I tried many times until I got accel-ppp running on Gentoo:

[2015-05-19 20:00:06.380]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 20:01:45.77]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 20:51:17.964]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 20:52:07.53]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 23:23:29.391]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 23:28:37.345]loader: failed to load 'pppoe': /usr/local/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
[2015-05-19 23:41:53.787]loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: connlimit_check
[2015-05-19 23:43:15.511]loader: failed to load 'net-snmp': /usr/lib64/accel-ppp/libnet-snmp.so: undefined symbol: l2tp_get_stat
[2015-05-19 23:44:07.262]loader: failed to load 'l2tp': /usr/lib64/accel-ppp/libl2tp.so: undefined symbol: connlimit_check
[2015-05-19 23:44:37.309]loader: failed to load 'net-snmp': /usr/lib64/accel-ppp/libnet-snmp.so: undefined symbol: pptp_get_stat
[2015-05-19 23:45:11.951]loader: failed to load 'net-snmp': /usr/lib64/accel-ppp/libnet-snmp.so: undefined symbol: ipoe_get_stat
[2015-05-19 23:45:42.644]loader: failed to load 'ipoe': /usr/lib64/accel-ppp/libipoe.so: undefined symbol: rad_dict_find_attr

I do not know what is different here on Gentoo compared with Debian Whezzey, where I use accl-ppp since years without ever having problems. Could it be that the build proceess with CMake is broken here? Something that happens with the libraries?

Here is my currently working config:

[modules]
log_file
connlimit
radius
ipoe
pptp
l2tp
pppoe
auth_mschap_v2
auth_mschap_v1
auth_chap_md5
auth_pap
ippool
sigchld
pppd_compat
net-snmp
[core]
log-error=/var/log/accel-ppp/core.log
thread-count=4
[ppp]
verbose=1
min-mtu=1492
mtu=1492
mru=1492
check-ip=1
single-session=replace
ipv4=require
lcp-echo-interval=30
lcp-echo-failure=3
[pppoe]
interface=bond1.109
ac-name=DELTAWEB1
service-name=DELTAWEB1
verbose=1
interim-verbose=1
[dns]
dns1=193.239.107.129
dns2=193.239.107.36
[radius]
dictionary=/etc/accel-ppp.d/dictionary
nas-identifier=accel-ppp
nas-ip-address=127.0.0.1
gw-ip-address=193.239.107.129
server=127.0.0.1,<HIDDEN>,auth-port=1812,acct-port=1813,req-limit=0,fail-time=0
verbose=1
interim-verbose=1
[client-ip-range]
10.0.0.0/8
[ip-pool]
gw-ip-address=193.239.107.129
shuffle=1
attr=Framed-Pool
193.239.105.0-255
193.239.106.0-200
193.239.107.131-254
[log]
log-file=/var/log/accel-ppp/accel-ppp.log
log-emerg=/var/log/accel-ppp/emerg.log
log-fail-file=/var/log/accel-ppp/auth-fail.log
copy=0
color=0
level=4
[pppd-compat]
ip-up=/etc/ppp/ip-up
ip-down=/etc/ppp/ip-down
radattr-prefix=/var/run/radattr
verbose=1
attr-up=RP-Upstream-Speed-Limit
attr-down=RP-Downstream-Speed-Limit
down-burst-factor=0.1
up-burst-factor=1.0
latency=50
up-limiter=police
down-limiter=htb
leaf-qdisc=sfq perturb 10
verbose=1
[cli]
telnet=127.0.0.1:2000
tcp=127.0.0.1:2001
[snmp]
master=0
agent-name=accel-ppp
[connlimit]
limit=10/min
burst=3
timeout=60

On Debian I do not need ipoe, letp and connlimit. And the order of loading the modules on Debian is as follows:

[modules]
log_file
pppoe
auth_mschap_v2
auth_mschap_v1
auth_chap_md5
auth_pap
radius
ippool
sigchld
pppd_compat
net-snmp

Here is my emerge --info:

Portage 2.2.18 (python 2.7.9-final-0, hardened/linux/amd64/no-multilib, gcc-4.8.4, glibc-2.20-r2, 3.18.9-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.9-hardened-x86_64-QEMU_Virtual_CPU_version_2.1.2-with-gentoo-2.2
KiB Mem:     4050152 total,   2256000 free
KiB Swap:    6290428 total,   6290428 free
Timestamp of repository gentoo: Tue, 19 May 2015 21:15:01 +0000
sh bash 4.2_p53
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.4.1::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           2.8.12.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.12.6::gentoo, 1.13.4::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

croessner
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --binpkg-respect-use=y --binpkg-changed-deps=y --usepkg=y --rebuilt-binaries=y --rebuilt-binaries-timestamp=20140405050000"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ rsync://de-mirror.org/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="acl adns aio amd64 bacula-clientonly bacula-console bash-completion berkdb bindist btrfs bzip2 caps cli cracklib crypt curl cxx device-mapper dri gdbm hardened iconv ipv6 justify logrotate loop-aes lzo mmap mmx mmxext modules ncurses nls nptl nscd ntp openmp openssl pam pax_kernel pcre readline session sse sse2 ssl tcpd threads unicode urandom vim-syntax xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

net-dialup/accel-ppp-1.8.0-r1::gentoo was built with the following:
USE="doc radius shaper snmp -debug -postgres -valgrind"
Comment 1 Christian Roessner 2015-05-20 08:39:30 UTC
I found the reason in another forum. The ebuild must modify LDFLAGS. By compiling the package like this:

LDFLAGS="-Wl,-z,lazy" emerge accel-ppp

everything works perfectly again :-)

So I guess the ebuild needs some modification?
Comment 2 Christian Roessner 2015-05-20 09:17:20 UTC
Created attachment 403658 [details]
accel-ppp-1.9.0.ebuild

Version bump and fix for LDFLAGS provided
Comment 3 Sergey Popov gentoo-dev 2015-05-25 07:54:29 UTC
Upstream says that order of loading modules matters. Not sure if this a bug, or not. Try to put 'radius' module higher, before 'pppoe'

It helps me in similar error with 'pptp' module
Comment 4 Christian Roessner 2015-05-28 05:38:01 UTC
Sorry, if I answer a little bit harsh, but it seems you really did not read carefully through my comments nor did you have a closer look at the source code and my fix.

- The source code uses dolmen() with lazy binding, so LDFLAGS must be corrected
- I have looked through all files in accel-ppp* folder and there is nothing concerning order.
- I already tried changing order as written in my comments and I tell you that this is not really fixing things, as you would have to enable modules that you do not want.

And now the friendly part :-)

I use accel-ppp as a ISP in a small town and we serve thousands of connections over accel-pppd ince 2012. So maybe you can trust me, if I tell you that the config works, if accel-pppd was committed and linked correctly ;-)

So please commit my changes if possible.

BTW: We still could optimize the build concerning PPTP and L2TP. And maybe digging deeper, why IPoE does not work.

Sorry, if I was a little bit rude at the beginning, but I spent hours to find the source of this problem as well as the solution.
Comment 5 Sergey Popov gentoo-dev 2015-05-29 11:04:14 UTC
(In reply to Christian Roessner from comment #4)
> - I already tried changing order as written in my comments and I tell you
> that this is not really fixing things, as you would have to enable modules
> that you do not want.

This modules will be enabled if you use "lazy" option, you just would not request them directly(or at lease - functions, declared in those modules).

Anyway, you patch did not help either. I am still getting exactly the same errors if i change order of loaded modules in config file.

So, i suppose Debian guys patched accel-ppp in a some way.

I will reopen this bug, but i am strongly advise you redirect this to upstream.

And yes, this is reproduced both in 1.8.0-r1 and test ebuild for 1.9.0

Do you have a link on accel-ppp package in Debian? I will try to investigate how they built it
Comment 6 Christian Roessner 2015-05-29 18:43:25 UTC
Hi,

hm, I wonder, because my patch works for me.

Concerning Debian: I compiled accel-ppp from source; not using the deb-file.

What exactly did you test, which my patch did _not_ solve? Maybe we can find out what goes wrong?

I think LDFLAGS was one point. What are you CFLAGS?

Do you also receive unresolved symbols?

I am in good contact with upstream, as the author and I already had mail conversation concerning making access-ppp high-available (some discussion about this).

If you can provide helpful information, I can help you and contact Dmitry.
Comment 7 Christian Roessner 2015-05-29 18:45:39 UTC
You can also find a working Debian package, which a friend uses with same settings than I:

http://sourceforge.net/projects/accel-ppp/files/debian/accel-ppp-1.9.0/
Comment 8 Christian Roessner 2015-05-29 19:47:07 UTC
I only get the up kerne module build by hand. Not the ppt module. In case of pie we must ensure that the exactly same gcc version is used for kernel and module, else compilation aborts with errors.

rns root@binhost  /usr/local/src/accel-ppp-1.9.0/build/drivers/ipoe/driver # l
total 212
drwxr-xr-x 3 root root  4096 May 29 21:33 ./
drwxr-xr-x 4 root root  4096 May 29 21:19 ../
-rw-r--r-- 1 root root   335 May 29 21:33 .ipoe.ko.cmd
-rw-r--r-- 1 root root 29417 May 29 21:33 .ipoe.mod.o.cmd
-rw-r--r-- 1 root root 50836 May 29 21:33 .ipoe.o.cmd
drwxr-xr-x 2 root root  4096 May 29 21:33 .tmp_versions/
lrwxrwxrwx 1 root root    58 May 29 21:19 CMakeLists.txt -> /usr/local/src/accel-ppp-1.9.0/drivers/ipoe/CMakeLists.txt
lrwxrwxrwx 1 root root    52 May 29 21:19 Makefile -> /usr/local/src/accel-ppp-1.9.0/drivers/ipoe/Makefile
-rw-r--r-- 1 root root     0 May 29 21:33 Module.symvers
lrwxrwxrwx 1 root root    50 May 29 21:19 ipoe.c -> /usr/local/src/accel-ppp-1.9.0/drivers/ipoe/ipoe.c
lrwxrwxrwx 1 root root    50 May 29 21:19 ipoe.h -> /usr/local/src/accel-ppp-1.9.0/drivers/ipoe/ipoe.h
-rw-r--r-- 1 root root 48446 May 29 21:33 ipoe.ko
-rw-r--r-- 1 root root  5303 May 29 21:33 ipoe.mod.c
-rw-r--r-- 1 root root  8840 May 29 21:33 ipoe.mod.o
-rw-r--r-- 1 root root 40672 May 29 21:33 ipoe.o
-rw-r--r-- 1 root root    72 May 29 21:33 modules.order

rns root@binhost  /usr/local/src/accel-ppp-1.9.0/build/drivers/ipoe/driver # modinfo ./ipoe.ko
filename:       /usr/local/src/accel-ppp-1.9.0/build/drivers/ipoe/driver/./ipoe.ko
license:        GPL
depends:
vermagic:       3.18.9-hardened SMP mod_unload modversions REFCOUNT GRSEC RANDSTRUCT_PLUGIN_dd5ef105fd901f94908e8261474230a5b2218cd2d2a63d1177802d66864efee3
Comment 9 Sergey Popov gentoo-dev 2015-06-03 01:34:42 UTC
(In reply to Christian Roessner from comment #6)
> What exactly did you test, which my patch did _not_ solve? Maybe we can find
> out what goes wrong?
> 
> I think LDFLAGS was one point. What are you CFLAGS?

pinkbyte@phantom ~ $ emerge --info | grep CFLAGS
CFLAGS="-O2 -pipe"
 
> Do you also receive unresolved symbols?
> 

Yes, just as before applying patch. Nothing changes at all, but LDFLAGS are passed successfully. And nothing unusual in CFLAGS either.


(In reply to Christian Roessner from comment #8)
> I only get the up kerne module build by hand. Not the ppt module. In case of
> pie we must ensure that the exactly same gcc version is used for kernel and
> module, else compilation aborts with errors.

Yep, i am familiar with those errors. Unfortunately, errors that were thrown in older versions of accel-ppp are different. Check bug #548762, maybe i misunderstood and talked about other type of errors. I did not try compiling ipoe module in 1.9.0 though
Comment 10 Sergey Popov gentoo-dev 2016-05-05 15:16:58 UTC
commit 36f95f1a89199d80adc56e0588d9dfbdb52de00a
Author: Sergey Popov <pinkbyte@gentoo.org>
Date:   Thu May 5 18:11:37 2016 +0300

    net-dialup/accel-ppp: version bump to 1.10.2

    Properly install ipoe kernel module,
    add necessary LDFLAGS to properly handle lazy linking.
    Drop old version.

    Reported-by: Christian Roessner <info@roessner-net.com>
    Gentoo-Bug: 549918

    Package-Manager: portage-2.2.28


Finally fixed. Thanks for your efforts!