[SOLVED] Ubuntu - Clean install gives "Segmentation fault"

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
espenri
Posts: 6
Joined: Friday 20 November 2015 22:52
Target OS: Linux
Domoticz version:
Contact:

[SOLVED] Ubuntu - Clean install gives "Segmentation fault"

Post by espenri »

Hi,

I'm running Ubuntu 12.04:

Code: Select all

uname -a
Linux filserver 3.2.0-44-generic-pae #69-Ubuntu SMP Thu May 16 18:50:07 UTC 2013 i686 athlon i386 GNU/Linux
I've finally gotten around to install domoticz on my ubuntu filserver. Some notes on what I had to do during installation that deviated from the wiki article found here: https://www.domoticz.com/wiki/Install.txt

1) First I had to manually point cmake at the location of my openssl / libssl-dev installation in order to enable SSL / TLS during compilation:

Code: Select all

sudo cmake -DOPENSSL_INCLUDE_DIR=/usr/include/openssl/ -DOPENSSL_LIBRARY=/usr/bin/openssl/ -DCMAKE_BUILD_TYPE=Release /home/domoticz/domoticz/
2) Second the libboost in the ubuntu PPA was an older version that did not allow me to make the project, so I had to manually compile libboost. I first removed existing libs and installed version 1.59.0 from this url: http://sourceforge.net/projects/boost/f ... st/1.59.0/

That did the trick for compiling the code.

I should also mention:
* I've created domoticz user for this service, domoticz is installed in this users home folder
* I've done chown on all files in domoticz folder
* I've specified the log file location in domoticz.sh (also in domoticz.sh in /etc/init.d), but no log is appearing there (all users can write to containing folder /tmp)

When trying to run domoticz, either as root, or as domoticz user I'm getting this error:

Code: Select all

$ sudo service domoticz.sh start
Segmentation fault
All I could find in the forum is related to update routines, and more specifically update routines on the RasPI, but I can't understand why that should be related to my problem.

Thanks in advance for all help.

Edit: Tried reading in the syslog, and apparently the segmentation fault also happens when trying to start the daemon manually with or without any parameters:

Code: Select all

$ sudo ./domoticz -daemon
$ tail /var/log/syslog
Nov 20 23:22:13 filserver kernel: [97619.475694] domoticz[16152]: segfault at 80c0ee8 ip b7713bdb sp bfb11170 error 6 in ld-2.15.so[b7708000+20000]
Nov 20 23:22:15 filserver kernel: [97621.532635] domoticz[16159]: segfault at 80c0ee8 ip b774bbdb sp bfa7ca50 error 6 in ld-2.15.so[b7740000+20000]
Nov 20 23:25:57 filserver kernel: [97843.407045] domoticz[16177]: segfault at 80c0ee8 ip b7710bdb sp bfd59150 error 6 in ld-2.15.so[b7705000+20000]
Nov 20 23:27:50 filserver kernel: [97957.350093] domoticz[16479]: segfault at 80c0ee8 ip b7786bdb sp bfc58540 error 6 in ld-2.15.so[b777b000+20000]
Nov 20 23:30:35 filserver kernel: [98121.822551] domoticz[16491]: segfault at 80c0ee8 ip b76f1bdb sp bf870260 error 6 in ld-2.15.so[b76e6000+20000]
Nov 20 23:31:18 filserver kernel: [98164.766859] domoticz[16493]: segfault at 80c0ee8 ip b77e3bdb sp bf968770 error 6 in ld-2.15.so[b77d8000+20000]
Nov 20 23:31:42 filserver kernel: [98189.348367] domoticz[16495]: segfault at 80c0ee8 ip b771cbdb sp bfaa4e40 error 6 in ld-2.15.so[b7711000+20000]
Nov 20 23:33:24 filserver kernel: [98290.893489] domoticz[16559]: segfault at 80c0ee8 ip b7736bdb sp bfb5cff0 error 6 in ld-2.15.so[b772b000+20000]
Nov 20 23:33:40 filserver kernel: [98306.938879] domoticz[16569]: segfault at 80c0ee8 ip b7705bdb sp bf983880 error 6 in ld-2.15.so[b76fa000+20000]
Nov 20 23:38:43 filserver kernel: [98609.852131] domoticz[16623]: segfault at 80c0ee8 ip b77adbdb sp bf9f8b20 error 6 in ld-2.15.so[b77a2000+20000]
/Espen
Last edited by espenri on Monday 23 November 2015 13:57, edited 1 time in total.
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by gizmocuz »

Please try to compile in debug mode, you can more details for the crash

also try starting domoticz from it's folder

cd domoticz
./domoticz

do you see something ?
Quality outlives Quantity!
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by ThinkPad »

Have you tried this tutorial: http://domoticz.com/wiki/Linux ? Works fine here with Ubuntu Server
I am not active on this forum anymore.
espenri
Posts: 6
Joined: Friday 20 November 2015 22:52
Target OS: Linux
Domoticz version:
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by espenri »

gizmocuz wrote:Please try to compile in debug mode, you can more details for the crash

also try starting domoticz from it's folder

cd domoticz
./domoticz

do you see something ?
Starting domoticz from the folder gives same result, no output in terminal, but seg fault in syslog

Code: Select all

Nov 22 13:31:45 filserver kernel: [234991.694729] domoticz[21086]: segfault at 80c0ee8 ip b77b8bdb sp bf912ab0 error 6 in ld-2.15.so[b77ad000+20000]
Tried compiling in debug mode now, output from both cmake and make can be found on pastebin:

cmake:

Code: Select all

sudo cmake -DOPENSSL_INCLUDE_DIR=/usr/include/openssl/ -DOPENSSL_LIBRARY=/usr/bin/openssl/ -DCMAKE_BUILD_TYPE=Release --debug-output /home/domoticz/domoticz/
http://pastebin.com/Lx25bwnW
make:

Code: Select all

sudo make -d
https://drive.google.com/file/d/0B6Adjx ... sp=sharing

I have limited knowledge on compiling on linux, so I don't know what to look for. And the make -d is quite verbose!
espenri
Posts: 6
Joined: Friday 20 November 2015 22:52
Target OS: Linux
Domoticz version:
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by espenri »

ThinkPad wrote:Have you tried this tutorial: http://domoticz.com/wiki/Linux ? Works fine here with Ubuntu Server
I followed this guide in the wiki:

https://www.domoticz.com/wiki/Install.txt

But as far as i can see they seem to be identical for the linux / compiling parts...
espenri
Posts: 6
Joined: Friday 20 November 2015 22:52
Target OS: Linux
Domoticz version:
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by espenri »

FYI; tried settings up on Ubuntu 14.04 in virtualbox, no issues, so there is most likely something with the 12.04 version that does not work, I wold presume its either the openssl or the libboost compiling.

No one else has this running on Ubuntu 12.04?

/Espen
espenri
Posts: 6
Joined: Friday 20 November 2015 22:52
Target OS: Linux
Domoticz version:
Contact:

Re: Ubuntu - Clean install gives "Segmentation fault"

Post by espenri »

Ok, another update, sorry for the spam.

Removed the static linking to openssl, and compiled once again. And now I'm able to start domoticz. I do have a different issue, but I'l create another thread about it.

I suppose it is not that important to use the SSL, and rather VPN into my network when access outside is required.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest