Page MenuHomeVyOS Platform

accel-ppp eats all memory with a small sstp config
Open, HighPublicBUG

Description

hi,

I tried this config:

vyos@vyos:~$ show configuration commands
set interfaces ethernet eth0 address 'dhcp'
set interfaces ethernet eth0 address 'dhcpv6'
set interfaces ethernet eth0 hw-id '08:00:27:bc:40:19'
set interfaces ethernet eth0 ipv6 address autoconf
set interfaces ethernet eth1 hw-id '08:00:27:0b:d1:40'
set interfaces ethernet eth2 hw-id '08:00:27:40:63:64'
set interfaces ethernet eth3 hw-id '08:00:27:6e:10:21'
set interfaces loopback lo
set service ssh
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'vyos'
set system login user vyos authentication encrypted-password '$6$FxKIHB4Vqj2U5u/4$xAsKwr8j1HX1fot66n1r1GuAEkyhf853tXiNPBMxns/zxGRunU//W932.KtdaxADn6NJwMLl6UIgPYVXNyx7d/'
set system login user vyos authentication plaintext-password ''
set system ntp server 0.pool.ntp.org
set system ntp server 1.pool.ntp.org
set system ntp server 2.pool.ntp.org
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
set vpn sstp authentication local-users username foo password 'bar'
set vpn sstp authentication mode 'local'
set vpn sstp network-settings client-ip-settings gateway-address '192.0.2.254'
set vpn sstp network-settings client-ip-settings subnet '192.0.2.0/25'
set vpn sstp network-settings client-ipv6-pool prefix 2001:db8::/64 mask '128'
set vpn sstp network-settings name-server '10.0.0.1'
set vpn sstp network-settings name-server '10.0.0.2'
set vpn sstp ssl ca-cert-file '/config/user-data/sstp/ca.crt'
set vpn sstp ssl cert-file '/config/user-data/sstp/server.crt'
set vpn sstp ssl key-file '/config/user-data/sstp/server.key'
vyos@vyos:~$

After commit:

Jun 08 11:54:14 vyos kernel: Out of memory: Kill process 5693 (accel-pppd) score 900 or sacrifice child
Jun 08 11:54:14 vyos kernel: Killed process 5693 (accel-pppd) total-vm:1907184kB, anon-rss:1833484kB, file-rss:1656kB, shmem-rss:0kB
Jun 08 11:54:14 vyos kernel: oom_reaper: reaped process 5693 (accel-pppd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Jun 08 11:54:14 vyos systemd[1]: [email protected]: Main process exited, code=killed, status=9/KILL
Jun 08 11:54:14 vyos systemd[1]: [email protected]: Failed with result 'signal'.
Jun 08 11:54:15 vyos systemd[1]: [email protected]: Service RestartSec=100ms expired, scheduling restart.
Jun 08 11:54:15 vyos systemd[1]: [email protected]: Scheduled restart job, restart counter is at 30.
Jun 08 11:54:15 vyos systemd[1]: Stopped Accel-PPP - High performance VPN server application for Linux.
Jun 08 11:54:15 vyos systemd[1]: Starting Accel-PPP - High performance VPN server application for Linux...
Jun 08 11:54:15 vyos systemd[1]: [email protected]: Can't open PID file /run/accel-pppd/sstp.pid (yet?) after start: No such file or directory
Jun 08 11:54:15 vyos systemd[1]: Started Accel-PPP - High performance VPN server application for Linux.

every second. Box has 2GB RAM.

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202006070117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

rherold created this object in space S1 VyOS Public.
syncer assigned this task to Unknown Object (User).Jun 8 2020, 12:05 PM
syncer triaged this task as High priority.
syncer changed the subtype of this task from "Task" to "Bug".
Unknown Object (User) added a comment.Jun 9 2020, 10:34 AM

In this case, SSTP daemon trying to allocate RAM for ipv6 pool and router does not have enough RAM. Dynamic memory allocation is not implemented for ip-pools.
Maybe, in this case, we need to calculate before commit, and show commit fail message with reason?
Calculating:
2^64 bit = 18446744073709551616 bit or 2305843009213693952 byte
2305843009213693952 * 64 (structure size byte) = 147573952589676412928 byte or 137438953472 GB
Correct me if my calculation wrong.

Hi guys, I decided to revive this thread because it seems better than to create a new one, the subject seems to be the same. Im running a Vyos in a R420 with 16gb of ram (no errors in my tests while preparing the machine for the Vyos) and 2 processors, and after some 30 days running flawlessly, it started failing partially. It started working fine again after a reboot. After some 5-7 days the same problem reoccurred. At the first time I managed to see some errors in its screens and they said basically:

out of memory: kill process (ssh) score 9 or sacrifice child "vyos"

At first I was wondering it could to be something related to the SSDs and the native RAID of the VYOS (this R420 doesn't have a off-board RAID controller so its configured for "AHCI" in its bios and the Vyos' RAID software is taking care of the disk redundancy (2 SSD SATA3 120gb each).

Now, after seeing in many Ubuntu forums people relating it with a RAM problem, Im not so sure anymore.

My network consultant have no experience with Vyos, he knows how to configure a BGP but he doesn't knows exactly how the VYOS works, how the OS deals with the hardware... I'm the one who installed the OS in the machine, it was a pretty standard installation. We're kinda lost here. Do you guys know anything that can help me figuring it out? Its a complicated situation because this machine is operative right now, there are plenty of clients connected through it, I cant just bring it to the lab and start testing stuff :/

Unknown Object (User) added a comment.Jan 15 2021, 12:08 PM

@GregGreg you describe definitely another issue that needs another topic. Will be better to discuss troubleshooting on the forum.
As for this topic, I pan to add some checks in the verify function.

erkin renamed this task from accel-ppp eats al memory with small sstp config to accel-ppp eats all memory with a small sstp config.Aug 30 2021, 5:41 AM
erkin set Issue type to Bug (incorrect behavior).
erkin removed a subscriber: Active contributors.
syncer reassigned this task from Unknown Object (User) to Viacheslav.Jul 11 2023, 11:57 PM
syncer added a subscriber: Unknown Object (User).