• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Segmentation fault wth gpio-platform raspberrypi1b1
#1
Hi!

When trying to get things working after a while I on a new raspbian installation, I run into a segmentation fault. This fault occurs when I set:

Code:
  "gpio-platform": "raspberrypi1b1"

Log/version:

Code:
[Aug 30 18:11:14:182921] pilight-daemon: INFO: version v8.1.2-nightly-e12cbcb2
[Aug 30 18:11:14:185361] pilight-daemon: DEBUG: ssdp sent search
[Aug 30 18:11:14:296212] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Aug 30 18:11:14:327157] pilight-daemon: INFO: daemon listening to port: 5000
Segmentation fault

When I set gpio-platform to rapberrypi2 or raspberrypi3, pilight starts normally nut sending receiving does not work. It could be that the install image or hardware might be corrupt, but maybe anyone can reproduce?
 
Reply
#2
Can you provide debug output?
 
Reply
#3
Code:
[Sep 02 18:26:18:240905] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Sep 02 18:26:18:271458] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Sep 02 18:26:18:276270] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Sep 02 18:26:18:286729] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Sep 02 18:26:18:296389] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Sep 02 18:26:18:303250] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Sep 02 18:26:18:316242] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Sep 02 18:26:18:326497] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Sep 02 18:26:18:329639] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Sep 02 18:26:18:333251] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Sep 02 18:26:18:346287] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Sep 02 18:26:18:349610] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Sep 02 18:26:18:356245] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Sep 02 18:26:18:359637] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Sep 02 18:26:18:366567] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Sep 02 18:26:18:370165] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Sep 02 18:26:18:386421] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Sep 02 18:26:18:396551] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Sep 02 18:26:18:414316] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[Sep 02 18:26:18:419159] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[Sep 02 18:26:18:426766] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[Sep 02 18:26:18:442451] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[Sep 02 18:26:18:468025] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[Sep 02 18:26:18:472931] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[Sep 02 18:26:18:482398] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Sep 02 18:26:18:536641] pilight-daemon: INFO: version v8.1.2-nightly-e12cbcb2
[Sep 02 18:26:18:538785] pilight-daemon: DEBUG: ssdp sent search
[Sep 02 18:26:18:644215] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Sep 02 18:26:18:718782] pilight-daemon: INFO: daemon listening to port: 5000
Segmentation fault
 
Reply
#4
I meant gdb debug output. Sorry for the misunderstanding.
 
Reply
#5
Code:
[email="root@meloenpi"]root@meloenpi[/email]:~# gdb --args pilight-daemon -D
GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <[url=http://gnu.org/licenses/gpl.html]http://gnu.org/licenses/gpl.html[/url]>
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-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<[url=http://www.gnu.org/software/gdb/bugs/]http://www.gnu.org/software/gdb/bugs/[/url]>.
Find the GDB manual and other documentation resources online at:
<[url=http://www.gnu.org/software/gdb/documentation/]http://www.gnu.org/software/gdb/documentation/[/url]>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pilight-daemon...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/local/sbin/pilight-daemon -D
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ Sep 03 09:09:40:10585] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[ Sep 03 09:09:40:14854] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[ Sep 03 09:09:40:19683] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[ Sep 03 09:09:40:23665] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[ Sep 03 09:09:40:27697] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[ Sep 03 09:09:40:31849] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[ Sep 03 09:09:40:34217] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[ Sep 03 09:09:40:37010] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[ Sep 03 09:09:40:39320] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[ Sep 03 09:09:40:41910] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[ Sep 03 09:09:40:44418] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[ Sep 03 09:09:40:46807] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[ Sep 03 09:09:40:49177] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[ Sep 03 09:09:40:51666] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[ Sep 03 09:09:40:54364] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[ Sep 03 09:09:40:56988] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[ Sep 03 09:09:40:59514] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[ Sep 03 09:09:40:62273] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[ Sep 03 09:09:40:68679] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[ Sep 03 09:09:40:72673] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[ Sep 03 09:09:40:75682] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[ Sep 03 09:09:40:80509] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[ Sep 03 09:09:40:84717] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[ Sep 03 09:09:40:88214] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[ Sep 03 09:09:40:98518] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Sep 03 09:09:40:115748] pilight-daemon: INFO: version v8.1.2-nightly-e12cbcb2
[Sep 03 09:09:40:117409] pilight-daemon: DEBUG: ssdp sent search
[Sep 03 09:09:40:225505] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Sep 03 09:09:40:259876] pilight-daemon: INFO: daemon listening to port: 5000
[New Thread 0xb6256460 (LWP 29662)]
[New Thread 0xb5a56460 (LWP 29663)]
[New Thread 0xb4eff460 (LWP 29664)]
[Sep 03 09:09:40:369241] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Sep 03 09:09:40:370763] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 52976
[Sep 03 09:09:40:370956] pilight-daemon: DEBUG: client fd: 13
[Sep 03 09:09:40:371059] pilight-daemon: DEBUG: client id: 1
Cannot access memory at address 0x0
Program received signal SIGSEGV, Segmentation fault.
Cannot access memory at address 0x0
0xb664f708 in ?? () from /usr/lib/libwiringx.so
(gdb)  backtrace
Cannot access memory at address 0x0
#0  0xb664f708 in ?? () from /usr/lib/libwiringx.so
#1  0xb6655524 in ?? () from /usr/lib/libwiringx.so
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) frame 1
#1  0xb6655524 in ?? () from /usr/lib/libwiringx.so
(gdb) frame 0
#0  0xb664f708 in ?? () from /usr/lib/libwiringx.so
 
Reply
#6
You need to install the gdb versions of both wiringx and pilight first to get a proper backtrace.
 
Reply
#7
Code:
(gdb) run
Starting program: /usr/local/sbin/pilight-daemon -D
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[Sep 03 17:36:35:325258] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Sep 03 17:36:35:336315] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Sep 03 17:36:35:342939] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Sep 03 17:36:35:349633] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Sep 03 17:36:35:354329] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Sep 03 17:36:35:359044] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Sep 03 17:36:35:363351] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Sep 03 17:36:35:367487] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Sep 03 17:36:35:371786] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Sep 03 17:36:35:376873] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Sep 03 17:36:35:381151] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Sep 03 17:36:35:385780] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Sep 03 17:36:35:390417] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Sep 03 17:36:35:394979] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Sep 03 17:36:35:399302] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Sep 03 17:36:35:403878] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Sep 03 17:36:35:408353] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Sep 03 17:36:35:412899] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Sep 03 17:36:35:448558] pilight-daemon: INFO: version 040e3d863d4e11464e87fb42a1ea7dc184b5c011-nightly-040e3d8
[Sep 03 17:36:35:450926] pilight-daemon: DEBUG: ssdp sent search
[Sep 03 17:36:35:556874] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Sep 03 17:36:35:587216] pilight-daemon: INFO: daemon listening to port: 5000
[New Thread 0xb625b470 (LWP 6716)]
[New Thread 0xb58ff470 (LWP 6717)]
[New Thread 0xb4eff470 (LWP 6718)]
[Sep 03 17:36:35:608339] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Sep 03 17:36:35:611353] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 56772
[Sep 03 17:36:35:618180] pilight-daemon: DEBUG: client fd: 13
[Sep 03 17:36:35:619240] pilight-daemon: DEBUG: client id: 1
[New Thread 0xb46ff470 (LWP 6719)]
Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
0xb6645238 in soc_readl () from ./libwiringx.so
(gdb) backtrace
#0  0xb6645238 in soc_readl () from ./libwiringx.so
#1  0xb664ae3c in broadcom2835PinMode () from ./libwiringx.so
#2  0xb682be20 in gpio433HwInit () at /root/pilight/libs/pilight/hardware/433gpio.c:174
#3  0x0001c864 in start_pilight (argc=2, argv=0xbefffcf4) at /root/pilight/daemon.c:3222
#4  0x0001cc68 in main (argc=2, argv=0xbefffcf4) at /root/pilight/daemon.c:3492
(gdb) frame 4
#4  0x0001cc68 in main (argc=2, argv=0xbefffcf4) at /root/pilight/daemon.c:3492
3492            int ret = start_pilight(argc, argv);
(gdb) frame 3
#3  0x0001c864 in start_pilight (argc=2, argv=0xbefffcf4) at /root/pilight/daemon.c:3222
3222                            if(tmp_confhw->hardware->init() == EXIT_FAILURE) {
(gdb) frame 2
#2  0xb682be20 in gpio433HwInit () at /root/pilight/libs/pilight/hardware/433gpio.c:174
174                     pinMode(gpio_433_out, PINMODE_OUTPUT);
(gdb) frame 1
#1  0xb664ae3c in broadcom2835PinMode () from ./libwiringx.so
(gdb) frame 0
#0  0xb6645238 in soc_readl () from ./libwiringx.so
 
Reply
#8
Are you really sure you are using a Raspberry Pi 1b1? Can you post the output of cat /proc/cpuinfo? These segmentation faults cannot be preventing, because wiringX requires low level memory access. Defining the wrong device reads and writes on the wrong memory adresses, therefor faulting.
 
Reply
#9
Code:
[email="root@meloenpi"]root@meloenpi[/email]:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7
Hardware        : BCM2835
Revision        : 0002
Serial          : 00000000438f62a1

Code:
[email="root@meloenpi"]root@meloenpi[/email]:~# cat /sys/firmware/devicetree/base/model

Raspberry Pi Model B Rev 1

Setting { "gpio-platform": "raspberrypi2" } result in a running pilight but sending does not work. Receiving appears to be working (seeing a lot of noise), but no decent protocol recognition. Could be that I'm the only one and my hardware or SDcard is broken, but wondering Smile
 
Reply
#10
Can you check the wiringx program interrupt to test if sending and receiving indeed doesn't work:
Code:
wiringx-interrupt raspberrypi1b1 1 0
And then connect a jumper wire between GPIO 0 and 1.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 717 06-11-2019, 05:19 PM
Last Post: curlymo
  GPIO input -> starting a rule scootermacro 1 162 06-09-2019, 07:40 AM
Last Post: curlymo
  pilight-debug with 433nano Segmentation fault hurdigurdi 6 771 09-30-2018, 12:07 PM
Last Post: hurdigurdi
  [SOLVED] Home Assistant switch gpio segalion 5 770 09-10-2018, 12:39 PM
Last Post: segalion
  Segmentation fault pluis29 7 791 06-10-2018, 12:40 PM
Last Post: pluis29
  no gpio-platform configured hansrijn2 2 4,018 06-03-2017, 10:01 PM
Last Post: hansrijn2
  Help: switch a gpio switch with webcontrol on pilight stable segalion 7 2,903 07-31-2016, 03:32 PM
Last Post: playerhot
  AdHoc - GPIO RPI2 & OrangePI2 error powerich 5 2,252 04-07-2016, 08:22 PM
Last Post: powerich
  usb will reset gpio koos147 3 1,440 02-23-2016, 08:12 PM
Last Post: koos147
Tongue Trying to activate relay/gpio with remote control 433 mhz Horst 3 2,398 02-15-2016, 05:35 PM
Last Post: Niek

Forum Jump:


Browsing: 1 Guest(s)