Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 178 of 806  Not logged in ELOG logo
icon4.gif   elogd Service exited with abnormal code: 1, posted by Alessio Sarti on Tue Apr 23 14:06:36 2019 
Dear all.

I am running elog 

elogd 3.1.4 , revision ead6bbc6
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Stefan Ritt on Tue Apr 23 14:26:51 2019 
This kind of behavior we typically see if some elog entry is corrupt. After a few hours you might access this corrupt entry by accident, and then the
server stops. If you see however this behavior on a fresh logbook with no corrupt entries, then the problem must lie somewhere else.

Do you see the same problem running under linux?
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Alessio Sarti on Thu Apr 25 11:16:06 2019 
Thanks for the prompt feedback.

a) I confirm that the problems shows up also when running interactively the elog through  elogd -p 8080

b) I am trying to catch the exit using lldb on the mac machine. I will be able to give you some feedback on that I hope in the next week (not
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Stefan Ritt on Thu Apr 25 11:27:21 2019 
What you recommend is enough. Just make sure to compile elogd with the flags mentioned before, and when you get the segment violation, do a stack trace
inside the debugger to learn where the fault happend. Maybe also print the contents of some variables at the current location.

Stefan
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Alessio Sarti on Tue Apr 30 12:47:46 2019 
I was finally able to catch the crash.

I paste below the info provided by lldb..

It seems that it has something to do with the 'first' logbook that contains 115 entries and is displayed in 6 pages.
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Alessio Sarti on Tue Apr 30 14:07:52 2019 
Actually it is a little bit more difficult than that.

I have restarted elogd and got a crash but this time it seems related to a different logbook...

Below the stack trace..
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Stefan Ritt on Wed May 1 10:59:59 2019 
Ok, that helped. It looks to me that the strlcpy() function from MacOSC does not like overlapping stings as parameters. Funny that this does not happen
on my Mac (Mojave 10.14.4). I fixed the two cases you reported (lines 18712 and 19021) and committed the changes to bitbucket, from where you can pull
and test it again (see https://elog.psi.ch/elog/download.html for instructions). If it happens
    icon2.gif   Re: elogd Service exited with abnormal code: 1, posted by Alessio Sarti on Thu May 2 09:47:41 2019 
Thanks a lot for providing a quick fix!

The elog is now happily running since two days without problems :)

I will get back to you in case anything else shows up.
ELOG V3.1.5-3fb85fa6