Bug #3836
TVHeadend crash, invalid pointer
0%
Description
I'm running TVH version 4.1.2076 now but have this for a longer period with earlier versions also.
For some reason when i navigate in GUI , do some changes or let the GUI stay idle TVH crashes.
It also crashes with recordings.
I'm running it on a Synology DS715 and launched TVH from CLI using the following (extra=bold) commands
/usr/local/tvheadend-testing/bin/tvheadend -u tvheadend-testing -g users -c /usr/local/tvheadend-testing/var -p /usr/local/tvheadend-testing/var/tvheadend.pid -l /volumeUSB1/usbshare/logs/tvheadend/debug.log --debug --trace --fileline
When i check logging it looks like i'm missing the debug information, the same for trace etc.
The only thing I see from CLI is this:
2016-06-02 10:35:12.907 [ INFO] xmltv: broadcasts tot= 42 new= 42 mod= 42
- Error in `/usr/local/tvheadend-testing/bin/tvheadend': realloc(): invalid pointer: 0x73696544 ***
Aborted
root@DS715:~#
Please advice me on how to retrieve the needed info to check this issue.
History
Updated by Jaroslav Kysela over 8 years ago
It looks like a memory corruption. If you have the valgrind pakage available and tvh with debugging symbols, you may try to run tvheadend under valgrind, if it shows something.
Updated by Randy M over 8 years ago
Memory corruption? I doubt it but will run a RAM test tonight using Synology Assist since i'm not familiar with valgrind for Synology.
Why i don't think it's a memory issue is that TVH runs perfectly fine for several weeks (or longer) as long you keep away from the GUI or do recordings.
It also has several other apps installed that have no issues.
1 thing i can try also is to downgrade to a version revision 4.1.8xx or something like that since that didn't show such issues.
Updated by Jaroslav Kysela over 8 years ago
I mean with 'memory corruption' that some code in TVH uses unallocated or wrong memory areas, thus the process does unpredictable things... But it's difficult to debug. I'm using valgrind or clang (memory checkers) to debug this.
Updated by Randy M over 8 years ago
Sorry, my bad. I'll try if I can get the needed information for you.
Updated by danny skjodt over 8 years ago
The easiest way to get valgrind on a synology will be using the debian chroot.
https://github.com/SynoCommunity/spksrc/wiki/Debian-Chroot
Updated by Randy M over 8 years ago
cindy lonely
Thanks, I will try if i can get it done this weekend.
Updated by Randy M over 8 years ago
I'm having a hard time getting it setup to troubleshoot, i can only say that it definitely crashes when i access GUI and leave it.
Will do my best for proper information.
Updated by Randy M over 8 years ago
Is there a simple guide on how to get tvh running under debian chroot?
Updated by Mark Clarkstone over 8 years ago
Randy M wrote:
Is there a simple guide on how to get tvh running under debian chroot?
Updated by Jaroslav Kysela over 8 years ago
If you're using the SAT>IP client code (you have SAT>IP tuners), then try v4.1-2130-g55fec0f . I tried to fix a serious problem there.
Updated by Randy M over 8 years ago
Jaroslav Kysela wrote:
If you're using the SAT>IP client code (you have SAT>IP tuners), then try v4.1-2130-g55fec0f . I tried to fix a serious problem there.
I'm not using SAT>IP but I also noticed a few http server fixes. I think this might fix a few issues for me also.
Read alot about how to setup my test environment and i think i have it now i need to find the time to finish it but first i'll upgrade.
Updated by Randy M over 8 years ago
Updated to 4.1.2130 and the first time I accessed GUI and leaved it i was hopeful since it would mostly crash instantly when leaving it.
Now it took a few minutes longer before it crashed.
Going for the valgrind method but this will be after the weekend.
Updated by Randy M over 8 years ago
Okay, got TVH running under Debian Chroot but doesn't look like i can reproduce the crash by leaving GUI.
So far it seems to be running and i can't get it forced to crash.
Updated by Randy M over 8 years ago
Installed version 4.0-git04998595df and it runs without issues, i can do everything i want.
No crashes with GUI access, Recordings, timeshift etc etc
For some reason a debian chroot install seems to run fine also so i'm out of ideas how to trouble shoot this.
Updated by Randy M almost 8 years ago
Today i installed version 4.1.2389 and again it crashes when you access GUI and leave it or doing a recording.
What kind of drastic things happened during version version 4.1.1945 (which is running perfectly fine without crashes) and now?
I did not do a debian chroot install but a synology package compiled by syno.dierkse.nl
Did he miss some dependencies maybe?
Updated by Randy M almost 8 years ago
Is there a explanation why it runs under debian chroot and not when you cross compile it for Synology?
Updated by Jaroslav Kysela almost 8 years ago
Provide some logs which can be used to analyze the issue: https://tvheadend.org/projects/tvheadend/wiki/Debugging
Updated by Randy M almost 8 years ago
I compiled a new version for my Synology (DS715 / Alpine) and used different folder names and ports (6681/6682 instead of 9981/9982) and so far it seems to run. This is strange though since in previous attempts when i removed old install and reinstalled newer version it mostly immediately crashed when trying to reproduce.
Could it have something to do with these files that are on my system, should i remove them first when doing a new install?
root@DS715:~# find / -name *.core
/volume1/@tvh:tcp-start.core
/volume1/@tvheadend.core
root@DS715:~#
Anyway, my debug setup is running next to original setup and i have configured the logging like this:
When i checked the log it seems to work, got debug and trace info so now wait until it crashes again.
Updated by Randy M about 7 years ago
After a long period of silence it started to crash again on my Synology.
Some must have happend during configuration of things because it worked perfect for months and now suddenly it crashes and mainly when closing browser thus leaving TVH Gui.
I uploaded full debug here https://drive.google.com/open?id=0B24WYfMEmyxNbVV3NndrcG5MWFk
Latest file before crash is debug.log.016
Updated by Randy M almost 7 years ago
At the end it all seems an issue with libstdc++
Recieved a different package compiled with different toolchain and now it seems to work as expected.
Updated by Mono Polimorph almost 7 years ago
Randy M wrote:
At the end it all seems an issue with libstdc++
Then, please close this issue.