pfclient automatic setup

#21
Bash:
==============================,
======== Waiting for dump1090 to start up,
==============================,
==============================,
,
==============================,
======== Ping test to dump1090,
==============================,
PING dump1090 (172.18.0.2) 56(84) bytes of data.,
64 bytes from docker-ads-b_dump1090_1.dockeradsb_default (172.18.0.2): icmp_seq=1 ttl=64 time=0.265 ms,
64 bytes from docker-ads-b_dump1090_1.dockeradsb_default (172.18.0.2): icmp_seq=2 ttl=64 time=0.150 ms,
64 bytes from docker-ads-b_dump1090_1.dockeradsb_default (172.18.0.2): icmp_seq=3 ttl=64 time=0.189 ms,
,
--- dump1090 ping statistics ---,
3 packets transmitted, 3 received, 0% packet loss, time 2006ms,
rtt min/avg/max/mdev = 0.150/0.201/0.265/0.049 ms,
==============================,
,
==============================,
======== Running with,
==============================,
 - PLANEFINDER_SHARECODE=XXXXXXXXXXXXX,
 - PLANEFINDER_LATITUDE =56.412574,
 - PLANEFINDER_LONGITUDE=-3.035684,
==============================,
,
==============================,
======== pfclient-config.json template,
==============================,
{,
  "connection_type": "1",,
  "data_format": "1",,
  "tcp_address": "dump1090",,
  "tcp_port": "30005",,
,
  "data_upload_interval": "10",,
  "aircraft_timeout": "30",,
  "select_timeout": "10",,
,
  "sharecode": "PLANEFINDER_SHARECODE",,
  "latitude": "PLANEFINDER_LATITUDE",,
  "longitude": "PLANEFINDER_LONGITUDE",
},
==============================,
,
==============================,
======== customising config,
==============================,
==============================,
,
==============================,
======== pfclient-config.json customised,
==============================,
{,
  "connection_type": "1",,
  "data_format": "1",,
  "tcp_address": "dump1090",,
  "tcp_port": "30005",,
,
  "data_upload_interval": "10",,
  "aircraft_timeout": "30",,
  "select_timeout": "10",,
,
  "sharecode": "XXXXXXXXXXXXX",,
  "latitude": "56.412574",,
  "longitude": "-3.035684",
},
==============================,
,
==============================,
======== Permissions,
==============================,
I am: root,
4.0K -rw-r--r-- 1 root root 278 Jun 20 14:36 /etc/pfclient/pfclient-config.json,
4.9M -rwxr-xr-x 1 root root 4.9M Jun 18 06:18 /usr/local/bin/pfclient,
==============================,
,
==============================,
======== pfclient version,
==============================,
2018-06-20 14:36:02.139354 [-] PF Client version: 4.1.1,
,
==============================,
,
==============================,
====== Starting pfclient,
==============================,
Segmentation fault (core dumped),
*** Segmentation fault,
Register dump:,
,
 R0: 00000000   R1: 9842d500   R2: 4bad3e1d   R3: bfdc1494,
 R4: 3c08ae00   R5: 3fdc1495   R6: 944ff3a9   R7: be917123,
 R8: 4bad3e1d   R9: bfdc1494   SL: 32cb22bf   FP: bfdd11d7,
 IP: 7ffb23bf   SP: 7ebe4610   LR: 76f2e1c4   PC: 76f0333c,
,
 CPSR: 60000010,
,
 Trap: 0000000e   Error: 0000080d   OldMask: 00000000,
 Addr: 9842d500,
,
Backtrace:,
,
Memory map:,
,
00010000-00108000 r-xp 00000000 b3:02 3542316 /usr/local/bin/pfclient,
00117000-00118000 r--p 000f7000 b3:02 3542316 /usr/local/bin/pfclient,
00118000-003c7000 rw-p 000f8000 b3:02 3542316 /usr/local/bin/pfclient,
003c7000-003f6000 rw-p 00000000 00:00 0,
00d4a000-00d6b000 rw-p 00000000 00:00 0 [heap],
701fc000-701fd000 ---p 00000000 00:00 0,
701fd000-709fd000 rw-p 00000000 00:00 0,
711fe000-711ff000 ---p 00000000 00:00 0,
711ff000-719ff000 rw-p 00000000 00:00 0,
72200000-72221000 rw-p 00000000 00:00 0,
72221000-72300000 ---p 00000000 00:00 0,
723ff000-72400000 ---p 00000000 00:00 0,
72400000-72c00000 rw-p 00000000 00:00 0,
72c00000-72c21000 rw-p 00000000 00:00 0,
72c21000-72d00000 ---p 00000000 00:00 0,
72dff000-72e00000 ---p 00000000 00:00 0,
72e00000-73600000 rw-p 00000000 00:00 0,
73600000-73621000 rw-p 00000000 00:00 0,
73621000-73700000 ---p 00000000 00:00 0,
73700000-7372f000 rw-p 00000000 00:00 0,
7372f000-73800000 ---p 00000000 00:00 0,
73800000-73821000 rw-p 00000000 00:00 0,
73821000-73900000 ---p 00000000 00:00 0,
73a00000-73a21000 rw-p 00000000 00:00 0,
73a21000-73b00000 ---p 00000000 00:00 0,
73baa000-73bc8000 r-xp 00000000 b3:02 1271855 /usr/lib/arm-linux-gnueabi/libgcc_s.so.1,
73bc8000-73bd7000 ---p 0001e000 b3:02 1271855 /usr/lib/arm-linux-gnueabi/libgcc_s.so.1,
73bd7000-73bd8000 r--p 0001d000 b3:02 1271855 /usr/lib/arm-linux-gnueabi/libgcc_s.so.1,
73bd8000-73bd9000 rw-p 0001e000 b3:02 1271855 /usr/lib/arm-linux-gnueabi/libgcc_s.so.1,
73bd9000-73bea000 r-xp 00000000 b3:02 1271914 /usr/lib/arm-linux-gnueabi/libresolv-2.27.so,
73bea000-73bf9000 ---p 00011000 b3:02 1271914 /usr/lib/arm-linux-gnueabi/libresolv-2.27.so,
73bf9000-73bfa000 r--p 00010000 b3:02 1271914 /usr/lib/arm-linux-gnueabi/libresolv-2.27.so,
73bfa000-73bfb000 rw-p 00011000 b3:02 1271914 /usr/lib/arm-linux-gnueabi/libresolv-2.27.so,
73bfb000-73bfd000 rw-p 00000000 00:00 0,
73bfd000-73bfe000 ---p 00000000 00:00 0,
73bfe000-743fe000 rw-p 00000000 00:00 0,
743fe000-743ff000 ---p 00000000 00:00 0,
743ff000-74bff000 rw-p 00000000 00:00 0,
74bff000-74c00000 ---p 00000000 00:00 0,
74c00000-75400000 rw-p 00000000 00:00 0,
75400000-75421000 rw-p 00000000 00:00 0,
75421000-75500000 ---p 00000000 00:00 0,
75511000-75515000 r-xp 00000000 b3:02 1271887 /usr/lib/arm-linux-gnueabi/libnss_dns-2.27.so,
75515000-75524000 ---p 00004000 b3:02 1271887 /usr/lib/arm-linux-gnueabi/libnss_dns-2.27.so,
75524000-75525000 r--p 00003000 b3:02 1271887 /usr/lib/arm-linux-gnueabi/libnss_dns-2.27.so,
75525000-75526000 rw-p 00004000 b3:02 1271887 /usr/lib/arm-linux-gnueabi/libnss_dns-2.27.so,
75526000-7552f000 r-xp 00000000 b3:02 1271889 /usr/lib/arm-linux-gnueabi/libnss_files-2.27.so,
7552f000-7553e000 ---p 00009000 b3:02 1271889 /usr/lib/arm-linux-gnueabi/libnss_files-2.27.so,
7553e000-7553f000 r--p 00008000 b3:02 1271889 /usr/lib/arm-linux-gnueabi/libnss_files-2.27.so,
7553f000-75540000 rw-p 00009000 b3:02 1271889 /usr/lib/arm-linux-gnueabi/libnss_files-2.27.so,
75540000-75546000 rw-p 00000000 00:00 0,
75546000-75547000 ---p 00000000 00:00 0,
75547000-75d47000 rw-p 00000000 00:00 0,
75d47000-75d48000 ---p 00000000 00:00 0,
75d48000-76548000 rw-p 00000000 00:00 0,
76548000-76549000 ---p 00000000 00:00 0,
76549000-76d49000 rw-p 00000000 00:00 0,
76d49000-76e87000 r-xp 00000000 b3:02 1271830 /usr/lib/arm-linux-gnueabi/libc-2.27.so,
76e87000-76e96000 ---p 0013e000 b3:02 1271830 /usr/lib/arm-linux-gnueabi/libc-2.27.so,
76e96000-76e98000 r--p 0013d000 b3:02 1271830 /usr/lib/arm-linux-gnueabi/libc-2.27.so,
76e98000-76e99000 rw-p 0013f000 b3:02 1271830 /usr/lib/arm-linux-gnueabi/libc-2.27.so,
76e99000-76e9c000 rw-p 00000000 00:00 0,
76e9c000-76ea2000 r-xp 00000000 b3:02 1271916 /usr/lib/arm-linux-gnueabi/librt-2.27.so,
76ea2000-76eb1000 ---p 00006000 b3:02 1271916 /usr/lib/arm-linux-gnueabi/librt-2.27.so,
76eb1000-76eb2000 r--p 00005000 b3:02 1271916 /usr/lib/arm-linux-gnueabi/librt-2.27.so,
76eb2000-76eb3000 rw-p 00006000 b3:02 1271916 /usr/lib/arm-linux-gnueabi/librt-2.27.so,
76eb3000-76f65000 r-xp 00000000 b3:02 1271872 /usr/lib/arm-linux-gnueabi/libm-2.27.so,
76f65000-76f74000 ---p 000b2000 b3:02 1271872 /usr/lib/arm-linux-gnueabi/libm-2.27.so,
76f74000-76f75000 r--p 000b1000 b3:02 1271872 /usr/lib/arm-linux-gnueabi/libm-2.27.so,
76f75000-76f76000 rw-p 000b2000 b3:02 1271872 /usr/lib/arm-linux-gnueabi/libm-2.27.so,
76f76000-76f8e000 r-xp 00000000 b3:02 1271912 /usr/lib/arm-linux-gnueabi/libpthread-2.27.so,
76f8e000-76f9d000 ---p 00018000 b3:02 1271912 /usr/lib/arm-linux-gnueabi/libpthread-2.27.so,
76f9d000-76f9e000 r--p 00017000 b3:02 1271912 /usr/lib/arm-linux-gnueabi/libpthread-2.27.so,
76f9e000-76f9f000 rw-p 00018000 b3:02 1271912 /usr/lib/arm-linux-gnueabi/libpthread-2.27.so,
76f9f000-76fa1000 rw-p 00000000 00:00 0,
76fa1000-76fa3000 r-xp 00000000 b3:02 1271812 /usr/lib/arm-linux-gnueabi/libSegFault.so,
76fa3000-76fb2000 ---p 00002000 b3:02 1271812 /usr/lib/arm-linux-gnueabi/libSegFault.so,
76fb2000-76fb3000 r--p 00001000 b3:02 1271812 /usr/lib/arm-linux-gnueabi/libSegFault.so,
76fb3000-76fb4000 rw-p 00002000 b3:02 1271812 /usr/lib/arm-linux-gnueabi/libSegFault.so,
76fb4000-76fd5000 r-xp 00000000 b3:02 1271808 /usr/lib/arm-linux-gnueabi/ld-2.27.so,
76fdd000-76fdf000 rw-p 00000000 00:00 0,
76fe2000-76fe4000 rw-p 00000000 00:00 0,
76fe4000-76fe5000 r--p 00020000 b3:02 1271808 /usr/lib/arm-linux-gnueabi/ld-2.27.so,
76fe5000-76fe6000 rw-p 00021000 b3:02 1271808 /usr/lib/arm-linux-gnueabi/ld-2.27.so,
7ebc4000-7ebe5000 rw-p 00000000 00:00 0 [stack],
7eef7000-7eef8000 r-xp 00000000 00:00 0 [sigpage],
7eef8000-7eef9000 r--p 00000000 00:00 0 [vvar],
7eef9000-7eefa000 r-xp 00000000 00:00 0 [vdso],
ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors],
 

ab cd

Senior Member
#22
Are you able to see how many users are reporting locations of -1.000000/-1.000000 as this is a silent error and more users may have issues. My best guess is some float issue.

I have installed ver 4.1.1 yesterday, and dont face latitude/longitude -1.000000 problem

.
pfclient 4.1.1 lat lon-2.png

.
.
pfclient 4.1.1 lat lon.png
 
Last edited:

Lee Armstrong

Administrator
Staff member
#23
Yeah we have quite a few people using 4.1.1 now with perfect location. Does it work fine if you install directly to your Pi without running in Docker?

I’ve seen similar issues when running on the wrong architecture, why do you link in the armhf shared libs? Is this actually an i386 docker image?

Edit: Just seen your Core Dump and the gnueabi is soft float which we don’t publicly have a build for!
 

Lee Armstrong

Administrator
Staff member
#25
To find by command, what is the PFClient's current version available:

Code:
$ wget -O pfc "https://planefinder.net/sharing/client"

$ grep 'armhf.deb' pfc | grep -o 'pfclient.*._armhf.deb'

pfclient_4.1.1_armhf.deb
That’s no good if the OS is soft float. As he is downloading the tar.gz it bypasses install checks. As it’s still ARM it’s likely to run but I think as we are seeing with float issues and segfaults.

We don’t publish or support armel releases. We used to but it’s not something we want to maintain as there is no need any more.
 
#26
I've found the upstream Docker issue (https://github.com/moby/moby/issues/34875) around picking the wrong ARM variant when running on ARM32v7.

Thanks for the help! I have now worked around the Docker bug and it works great! If it is easy to detect and warn about running on soft float that would be a great feature for the ARM builds.

----
For referance
---
So the segfault is in glib around cos/sin that is all math/float. Along with the config/UI not working with float types but working with other types I agree its around hard/soft float.

Bash:
root@20f84f6984f1:/# 
uname -a
Linux 20f84f6984f1 4.14.39-v7+ #1112 SMP Sat May 5 12:01:33 BST 2018 armv7l GNU/Linux

root@20f84f6984f1:/# dpkg --print-architecture
armel
armel = soft and not the required armhf



Code:
root@20f84f6984f1:/# gdb /usr/local/bin/pfclient /tmp/core.pfclient
GNU gdb (Debian 7.12-6+b2) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/pfclient...done.
[New LWP 20]
[New LWP 24]
[New LWP 23]
[New LWP 22]
[New LWP 21]
[New LWP 25]
[New LWP 26]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
Core was generated by `pfclient --config_path=/etc/pfclient/pfclient-config.json --log_path=/var/log'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x76e6cc38 in reduce_and_compute_sincos (cosx=0x0, sinx=0x0, x=1.4853970536756906e-313) at ../sysdeps/ieee754/dbl-64/s_sincos.c:59
59    ../sysdeps/ieee754/dbl-64/s_sincos.c: No such file or directory.
[Current thread is 1 (Thread 0x76f49010 (LWP 20))]
(gdb) dir /usr/src/glibc/glibc-2.27/sysdeps
Source directories searched: /usr/src/glibc/glibc-2.27/sysdeps:$cdir:$cwd
(gdb) dir /usr/src/glibc/glibc-2.27       
(gdb) bt
#0  0x76e6cc38 in reduce_and_compute_sincos (cosx=0x0, sinx=0x0, x=1.4853970536756906e-313) at ../sysdeps/ieee754/dbl-64/s_sincos.c:59
#1  __sincos (x=<error reading variable: access outside bounds of object referenced via synthetic pointer>, sinx=<optimized out>, cosx=<optimized out>) at ../sysdeps/ieee754/dbl-64/s_sincos.c:101
#2  0x0002c6cc in pf_greatcircle_check (_lat0=<optimized out>, _lon0=<optimized out>, _lat1=<optimized out>, _lon1=<optimized out>) at /var/pfclient/PFClient-NG/pfclient/pfclient/decoders/pf_cpr_decoder.c:349
#3  0x0002d0cc in pf_global_cpr (a=a@entry=0x2394d10, decoded_message=decoded_message@entry=0x23944d8, current_ts=3687472.8407504158, lat=0x7ea31738, lat@entry=0x7ea31730, lon=0x7ea31740, lon@entry=0x7ea31738,
    nuc=0x7ea31734, nuc@entry=0x7ea3172c) at /var/pfclient/PFClient-NG/pfclient/pfclient/decoders/pf_cpr_decoder.c:235
#4  0x0002d630 in pf_update_cpr_position (a=a@entry=0x2394d10, decoded_message=decoded_message@entry=0x23944d8, current_ts=3687472.8407504158)
    at /var/pfclient/PFClient-NG/pfclient/pfclient/decoders/pf_cpr_decoder.c:65
#5  0x0003e778 in pf_update_aircraft (decoded_message=decoded_message@entry=0x23944d8, current_ts=3687472.8407504158) at /var/pfclient/PFClient-NG/pfclient/pfclient/pf_aircraft.c:104
#6  0x000308a0 in pf_beast_listen (fd=0, fd@entry=5, connection_type=connection_type@entry=PF_CONNECTION_TYPE_TCP) at /var/pfclient/PFClient-NG/pfclient/pfclient/formats/pf_beast_format.c:190
#7  0x00040ae0 in pf_listen_loop (fd=fd@entry=5, connection_type=connection_type@entry=PF_CONNECTION_TYPE_TCP) at /var/pfclient/PFClient-NG/pfclient/pfclient/pf_client.c:456
#8  0x00040c34 in pf_init_tcp_connection (address=address@entry=0x23916b8 "dump1090", port=port@entry=0x23915e0 "30005") at /var/pfclient/PFClient-NG/pfclient/pfclient/pf_client.c:524
#9  0x00040e54 in pf_client_loop () at /var/pfclient/PFClient-NG/pfclient/pfclient/pf_client.c:237
#10 0x0002747c in main (argc=<optimized out>, argv=<optimized out>) at /var/pfclient/PFClient-NG/pfclient/pfclient/main.c:20
 
Top