anything
AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 


Author Topic: RBFeeder on RPi has memory leak with UAT  (Read 2003 times)

0 Members and 4 Guests are viewing this topic.

abcd567

  • Sr. Member
  • ****
  • Posts: 344
  • CYYZ - Toronto
Re: RBFeeder on RPi has memory leak with UAT
« Reply #15 on: June 28, 2020, 08:56:05 PM »
Thank you continuous reply. I saw you in many threads. dump978_port= idea was also from your thread! Thank you again.

The dump978_port idea was not mine, I only used it after it was discovered by user @dpbxcorp  (click here).


I'm using piaware on Raspbian buster "32bit" armv71,  RPi3 model B rev1.2 .  oh, 64 bit OS is available?

Yes, Beta version available since May 27, 2020.

Howto Install Piaware 3.8.1 on 64 bit Raspbian OS / Pi4

https://github.com/abcd567a/piaware-64bit-raspbian/blob/master/README.md


RB24feeder (Beta version) for 64-bit Raspbian is also available since June 23, 2020.
Thanks to Jonis Ceara and Andre Brandao for their prompt action.
Radarbox24 arm64 feeder


I am running rbfeeder:arm64 on 64-bit Raspbian buster. Here is the site:
https://www.radarbox.com/stations/EXTRPI000036


.


« Last Edit: June 28, 2020, 08:58:19 PM by abcd567 »

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #16 on: July 07, 2020, 01:56:09 AM »
I am running rbfeeder:arm64 on 64-bit Raspbian buster.
I've just started running the 64bit version of rbfeeder.
Code: [Select]
$ file /usr/bin/rbfeeder
/usr/bin/rbfeeder: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=2e66bf959e89f98dbfe27ef27a32216f747d4a3b, stripped
However, unfortunately it still has leaking.
Code: [Select]
$ while true ; do date ; grep 'VmData' /proc/`pidof rbfeeder`/status ; sleep 3600 ; done
Mon 06 Jul 2020 06:00:01 AM PDT
VmData:   107200 kB
  :
VmData:   517396 kB
Mon 06 Jul 2020 02:00:01 PM PDT
VmData:   579092 kB
My cron restarts rbfeeder three times a day.
Thank you.

csecse

  • New Member
  • *
  • Posts: 1
Re: RBFeeder on RPi has memory leak with UAT
« Reply #17 on: July 14, 2020, 02:35:24 AM »
I am having the same issue. I also am running rbfeeder with a UAT feed that gets lots of TIS-B messages.

I have a fresh installation of rbfeeder that I installed yesterday and it was running for less than a day when I noticed the substantial memory leak.  The graph below shows the memory usage for the eight hours right before I restarted rbfeeder:


Process stats of rbfeeder before I restarted it:
Code: [Select]
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root       634  0.7 28.7 385172 272864 ?       Ssl  Jul12   9:44 /usr/bin/rbfeeder

immediately after I restarted it:
Code: [Select]
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     17891  1.0  1.1 120580 10488 ?        Ssl  19:05   0:03 /usr/bin/rbfeeder

(RSS decrease from 272864 to 10488 immediately after restart.)


Some more stats:
Code: [Select]
# rbfeeder -v
RBFeeder v0.3.4 (build 20200423004254)

Code: [Select]
# cat /etc/rbfeeder.ini
[client]
network_mode=true
log_file=/var/log/rbfeeder.log
key=<REDACTED>
sn=<REDACTED>
lat=<REDACTED>
lon=<REDACTED>
alt=<REDACTED>
sat_used=0
sat_visible=0

[network]
mode=beast
external_port=30005
external_host=127.0.0.1

[mlat]
autostart_mlat=true
#mlat_cmd=/usr/bin/python3.5 /usr/bin/mlat-client

[dump978]
dump978_enabled=true
dump978_port=30979

Code: [Select]
# systemctl status rbfeeder
● rbfeeder.service - RBFeeder Service
   Loaded: loaded (/lib/systemd/system/rbfeeder.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-07-13 19:05:05 PDT; 9min ago
 Main PID: 17891 (rbfeeder)
    Tasks: 12 (limit: 2200)
   Memory: 9.8M
   CGroup: /system.slice/rbfeeder.service
           └─17891 /usr/bin/rbfeeder

Jul 13 19:13:51 piaware rbfeeder[17891]: [2020-07-13 19:13:51]  Data sent: 114.9 KB
Jul 13 19:13:51 piaware rbfeeder[17891]: [2020-07-13 19:13:51]  Data received: 1.2 KB
Jul 13 19:14:22 piaware rbfeeder[17891]: [2020-07-13 19:14:22]  ******** Statistics updated every 30 seconds ********
Jul 13 19:14:22 piaware rbfeeder[17891]: [2020-07-13 19:14:22]  Packets sent in the last 30 seconds: 257, Total packets sent since startup: 3939
Jul 13 19:14:22 piaware rbfeeder[17891]: [2020-07-13 19:14:22]  Data sent: 123.1 KB
Jul 13 19:14:22 piaware rbfeeder[17891]: [2020-07-13 19:14:22]  Data received: 1.3 KB
Jul 13 19:14:53 piaware rbfeeder[17891]: [2020-07-13 19:14:53]  ******** Statistics updated every 30 seconds ********

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #18 on: July 14, 2020, 03:35:18 AM »
I am having the same issue. I also am running rbfeeder with a UAT feed that gets lots of TIS-B messages.

Hello csecse,  thank you reporting memory leaking!!

I hope someone in AirNav finds this article and fix it soon.

Runway 31

  • Moderator
  • Hero Member
  • *****
  • Posts: 29492
Re: RBFeeder on RPi has memory leak with UAT
« Reply #19 on: July 14, 2020, 09:04:14 AM »
Why don't you email [email protected]

Alan

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #20 on: July 14, 2020, 04:13:38 PM »
Why don't you email [email protected]

Nice idea!! will do.
[email protected]  would be the correct email.
« Last Edit: July 14, 2020, 04:40:56 PM by josh »

Runway 31

  • Moderator
  • Hero Member
  • *****
  • Posts: 29492
Re: RBFeeder on RPi has memory leak with UAT
« Reply #21 on: July 14, 2020, 05:02:19 PM »
Both go to the same place

Alan

Jonis Maurin Ceara

  • AirNav Systems
  • New Member
  • *****
  • Posts: 8
Re: RBFeeder on RPi has memory leak with UAT
« Reply #22 on: July 15, 2020, 01:27:26 AM »
Guys, thank you very much for your feedback. I think I found the leak problem. I'll make some tests tomorrow and reply in this topic with a beta-test link for new version.

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #23 on: July 15, 2020, 06:11:57 AM »
Guys, thank you very much for your feedback. I think I found the leak problem. I'll make some tests tomorrow and reply in this topic with a beta-test link for new version.
Wow it's good news.
I can beta-test it anytime.

Jonis Maurin Ceara

  • AirNav Systems
  • New Member
  • *****
  • Posts: 8
Re: RBFeeder on RPi has memory leak with UAT
« Reply #24 on: July 15, 2020, 09:17:55 PM »
Hi!
I've build a new version for x64. Can you test please?

Besides the leak problem, this is a major new version of rbfeeder (alpha). In this version, we have split dump1090 and our code. This way, we can start/stop dump1090 (if needed) and run other programs that use the same dongle without losing connection to our servers.
Also, if you get data from another host (or program, like already running dump1090), the rbfeeder itself will use a lot less resources since it doesn't have all the code to access and demodulate data from dongle.
This package already include dump1090-rb, which is a simples dump1090 just renamed. If you are using 'network mode' in your configuration, this executable will not be used. If not (local dongle), rbfeeder will start it automatically.

Link for download (only for 64bits for now): https://drive.google.com/file/d/1tu2D4rK7ZM3n6yq6612rP4iFY5EtVV1R/view?usp=sharing

Note that I've also added an option to disable all log information, if you want (even rbfeeder status every 30 seconds).
This parameter is:
Code: [Select]
[client]
disable_log=true/false

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #25 on: July 16, 2020, 12:57:38 AM »
Hi jmaurin,
I've build a new version for x64. Can you test please?
Code: [Select]
$ /usr/bin/rbfeeder -v
RBFeeder v0.4.0 (build 20200715113500)
I did 3 hours run of your new version with NO LEAK !!

Thank you great & quick fix !
Now I disabled scheduled RBFeeder restarting.

I love also the switch to stop logging. Had you known the idea I hope?

Could you provide 32bit version also later?  Many feeders are still using armv7.
csecse seems to use RPi3 but may use 32bit OS.

Thank you again.

Jonis Maurin Ceara

  • AirNav Systems
  • New Member
  • *****
  • Posts: 8
Re: RBFeeder on RPi has memory leak with UAT
« Reply #26 on: July 16, 2020, 11:45:28 AM »
Yes, we will release 32bits  very soon.

abcd567

  • Sr. Member
  • ****
  • Posts: 344
  • CYYZ - Toronto
Re: RBFeeder on RPi has memory leak with UAT
« Reply #27 on: July 17, 2020, 05:11:07 PM »
@jmaurin
Great work!

(1) Where did you find the source-code for rbfeeder and dump978-rb?

(2) What argument/parameters you used when you build the .deb package from source-code?

(3) The link to Google Drive you have posted requires the .deb package to be first downloaded to a computer using web browser, then moved to RPi using SCP software like FileZilla or WinSCP. Following is the wget command which directly downloads your .deb package on RPi. I have tested it, and it works. Give it a try :)

NOTE: It is a very long command. Scroll right to see and copy-paste it in full.
Code: [Select]

wget -O /home/pi/rbfeeder_0.4.0-20200715113500_arm64.deb "https://drive.google.com/uc?export=download&id=1tu2D4rK7ZM3n6yq6612rP4iFY5EtVV1R"   



(4) Installed over existin 64 bit rbfeeder from RB24 repositories:
Code: [Select]
[email protected]:~ $ sudo dpkg -i rbfeeder_0.4.0-20200715113500_arm64.deb

[email protected]:~ $ apt policy rbfeeder
rbfeeder:
  Installed: 0.4.0-20200715113500
  Candidate: 0.4.0-20200715113500
  Version table:
 *** 0.4.0-20200715113500 100
        100 /var/lib/dpkg/status
     0.3.5-20200623164017 500
        500 https://apt.rb24.com buster/main arm64 Packages


(5) Checked your .deb package:
Code: [Select]
[email protected]:~ $ file rbfeeder_0.4.0-20200715113500_arm64.deb
rbfeeder_0.4.0-20200715113500_arm64.deb: Debian binary package (format 2.0)

Code: [Select]
[email protected]:~ $ readelf -a rbfeeder_0.4.0-20200715113500_arm64.deb

File: rbfeeder_0.4.0-20200715113500_arm64.deb(debian-binary   )
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

File: rbfeeder_0.4.0-20200715113500_arm64.deb(control.tar.xz  )
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

File: rbfeeder_0.4.0-20200715113500_arm64.deb(data.tar.xz     )
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start



Code: [Select]
[email protected]:~ $ sudo dpkg-deb -c rbfeeder_0.4.0-20200715113500_arm64.deb
drwxr-xr-x root/root         0 2020-07-15 04:28 ./
drwxr-xr-x root/root         0 2020-07-15 04:28 ./etc/
-rw-r--r-- root/root       249 2020-07-15 04:28 ./etc/rbfeeder.ini
drwxr-xr-x root/root         0 2020-07-15 04:28 ./lib/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./lib/systemd/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./lib/systemd/system/
-rw-r--r-- root/root       202 2020-07-15 04:28 ./lib/systemd/system/rbfeeder.service
drwxr-xr-x root/root         0 2020-07-15 04:28 ./opt/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./opt/radarbox/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./opt/radarbox/specs/
-rwxr-xr-x root/root    110597 2020-07-15 04:28 ./opt/radarbox/specs/cat21_2.1.json
-rwxr-xr-x root/root    117364 2020-07-15 04:28 ./opt/radarbox/specs/cat21_2.4.json
drwxr-xr-x root/root         0 2020-07-15 04:28 ./usr/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./usr/bin/
-rwxr-xr-x root/root    307280 2020-07-15 04:28 ./usr/bin/dump1090-rb
-rwxr-xr-x root/root    421752 2020-07-15 04:28 ./usr/bin/rbfeeder
drwxr-xr-x root/root         0 2020-07-15 04:28 ./usr/share/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./usr/share/doc/
drwxr-xr-x root/root         0 2020-07-15 04:28 ./usr/share/doc/rbfeeder/
-rw-r--r-- root/root      1199 2020-07-15 04:28 ./usr/share/doc/rbfeeder/changelog.Debian.gz
-rw-r--r-- root/root      1255 2020-07-15 04:28 ./usr/share/doc/rbfeeder/copyright


Code: [Select]
[email protected]:~ $ sudo dpkg -L rbfeeder
/.
/etc
/etc/rbfeeder.ini
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/rbfeeder.service
/opt
/opt/radarbox
/opt/radarbox/specs
/opt/radarbox/specs/cat21_2.1.json
/opt/radarbox/specs/cat21_2.4.json
/usr
/usr/bin
/usr/bin/dump1090-rb
/usr/bin/rbfeeder
/usr/share
/usr/share/doc
/usr/share/doc/rbfeeder
/usr/share/doc/rbfeeder/changelog.Debian.gz
/usr/share/doc/rbfeeder/copyright

« Last Edit: July 17, 2020, 05:47:39 PM by abcd567 »

josh

  • New Member
  • *
  • Posts: 15
Re: RBFeeder on RPi has memory leak with UAT
« Reply #28 on: July 17, 2020, 08:23:48 PM »
I believe @jmaurin is AirNav developer to support of my e-mail request, can access everything.

abcd567

  • Sr. Member
  • ****
  • Posts: 344
  • CYYZ - Toronto
Re: RBFeeder on RPi has memory leak with UAT
« Reply #29 on: July 17, 2020, 09:58:22 PM »
I believe @jmaurin is AirNav developer to support of my e-mail request, can access everything.

I also suspected this, but not sure as he is not shown as AirNav Staff or Support, but just like an ordinary member.

Also his debian package is uploaded to Google Drive, not the RadarBox repository.

That is why I asked him the questions.

By the way, on 14 July I have reported this issue to AirNav's Jonis and Andre. Please see attached screenshot.

« Last Edit: July 18, 2020, 01:39:38 PM by abcd567 »