# Segmentation fault

**URL:** <https://community.openenergymonitor.org/t/segmentation-fault/5073>\
**Category:** Emoncms\
**Created:** [11 September 2017 09:37 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073 "2017-09-11T09:37:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 09:37 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/1 "2017-09-11T09:37:21Z")

</div>

I’ve just deleted an unused feed, not realizing that there was a redundant input process still in existence, so the input list showed an ERROR against that process.  
Logical step then was to delete the input process, but they still remained after clicking the trash can (the input is redundant - so not recreated because of an update).  
So… then rebooted hoping that it may clear, but things then got worse!

The FEEDS page is blank apart from the spinning ‘busy’ wheel, (should be about 30 phpfina feeds), and checking my browser, I see a console error of `GET http://192.168.1.10/emoncms/feed/list.json net::ERR_EMPTY_RESPONSE VM47:1`.

The INPUT’s page shows all of my inputs, except they are not updating, and the process lists are showing `wait...`

My apache log is showing `[Mon Sep 11 10:14:59.059545 2017] [core:notice] [pid 1260] AH00052: child pid 3435 exit signal Segmentation fault (11)`

No errors in the emoncms log since reboot.

Any ideas?

Emoncms Version 9.8.10 | 2017.08.17 (self build)

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 16:22 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/2 "2017-09-11T16:22:44Z")

</div>

The lines in the log just prior to the segfault may offer some insight.  
Could you post about 10 lines from that part of the log?

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 17:08 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/3 "2017-09-11T17:08:46Z")

</div>

Thanks Bill, here are the preceding entries.  
The 09:41:12 is the first entry for today.  
Feed 76 is the feed which I mentioned above.

```auto
[Mon Sep 11 09:41:12.343460 2017] [:error] [pid 12775] [client 192.168.1.9:53214] PHP Warning: fopen(/var/lib/phpfina/76.dat): failed to open stream: Permission deni$
[Mon Sep 11 10:04:09.032362 2017] [mpm_prefork:notice] [pid 1239] AH00169: caught SIGTERM, shutting down
[Mon Sep 11 10:04:42.829508 2017] [mpm_prefork:notice] [pid 15755] AH00163: Apache/2.4.10 (Raspbian) OpenSSL/1.0.1t configured -- resuming normal operations
[Mon Sep 11 10:04:42.830000 2017] [core:notice] [pid 15755] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 11 10:04:43.836211 2017] [core:notice] [pid 15755] AH00052: child pid 15760 exit signal Segmentation fault (11)
[Mon Sep 11 10:04:43.836582 2017] [core:notice] [pid 15755] AH00052: child pid 15761 exit signal Segmentation fault (11)

```

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 17:12 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/4 "2017-09-11T17:12:24Z")

</div>

> [@Paul](#):
>
> failed to open stream: Permission deni$

Looks like a permision error.

Is this a system that’s been running for some time, or a new system?

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 17:14 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/5 "2017-09-11T17:14:42Z")

</div>

No, not new, it’s running constantly.  
The reason it couldn’t open 76.dat was because I had deleted it, as I mentioned in my first post

> [@Paul](#):
>
> I’ve just deleted an unused feed, not realizing that there was a redundant input process still in existence, so the input list showed an ERROR against that process.

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 17:17 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/6 "2017-09-11T17:17:27Z")

</div>

> [@Paul](#):
>
> net::ERR\_EMPTY\_RESPONSE VM47:1

Right, bu that shouldn’t give you a _permission_ error.  
I’m thinking more along the lines of a _file not found_ type of error.

What came to mind, is failing flash memory. Especially if it’s a system that has been running for a long time.  
It _looks_ as if it’s trying to re-create the missing data, but can’t, which is what made me think “flash going south.”

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 17:18 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/7 "2017-09-11T17:18:46Z")

</div>

It’s an external HDD, not a SD card.

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 17:20 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/8 "2017-09-11T17:20:30Z")

</div>

Just thought of that. I recall a comment you made a few years ago about one of the side bennies of having a Pi on an HDD was the server providing strorage for other things…

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 17:22 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/9 "2017-09-11T17:22:28Z")

</div>

At any rate, it might be worth a look at the directory the file was in, to verify the permissions are OK.

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 17:35 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/10 "2017-09-11T17:35:10Z")

</div>

Yep, they are fine.  
I can’t help but think that this is Redis related…  
If you look at the para starting ‘March 2016’ in the link below that mentions ‘Segmentation errors in Apache log’ and I did have php5-redis v2.2.5 installed (which I have now updated to v2.2.7 but still the same problem).

Paul

> **[emoncms/docs/RaspberryPi at master · emoncms/emoncms](https://github.com/emoncms/emoncms/tree/master/docs/RaspberryPi)**
>
> master/docs/RaspberryPi

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 17:47 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/11 "2017-09-11T17:47:11Z")

</div>

_the updated version of php5-redis_

And the updated module, that’s been installed too?

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 18:47 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/12 "2017-09-11T18:47:00Z")

</div>

Do you mean phpredis V3.1.1?  
If so, no because the guide says;

‘This guide will be updated to reflect this change once tested in due course.’

Paul

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [11 September 2017 18:50 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/13 "2017-09-11T18:50:41Z")

</div>

Is 3.1.1 redis itself or the php module?

I was speaking of the module.

Looks like this is one for @glyn.hudson

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [11 September 2017 18:59 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/14 "2017-09-11T18:59:13Z")

</div>

I’ve not specifically updated php, and it’s showing  
`PHP v5.6.30-0+deb8u1 (Zend Version 2.6.0)`  
Redis version  
`v2.8.17`

Paul

---

<div class="post-metadata">

**Author:** ![Paul](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/paul/32/28_2.png) [@Paul](https://community.openenergymonitor.org/u/Paul)\
**Post date:** [13 September 2017 09:30 UTC](https://community.openenergymonitor.org/t/segmentation-fault/5073/15 "2017-09-13T09:30:09Z")

</div>

Doesn’t matter now, I’m rebuilding the system from scratch in **Raspbian Stretch** , using PHP7.0 and many other updated libraries.

I’m documenting as I’m progressing, and will put together an installation guide shortly.

Paul
