Am 15.11.24 um 19:25 schrieb Marko Mäkelä:
Thu, Nov 14, 2024 at 01:37:42PM +0100, schorpp wrote:
Hello,
Hi,
I'm about fixing this old BUG exiting VDR on every 1st recording start:
# gdb attach <pid of vdr>
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x9c801b40 (LWP 8182)]
0x08136f6a in cFrameDetector::Analyze(unsigned char const*, int) ()
(gdb) bt
#0 0x08136f6a in cFrameDetector::Analyze(unsigned char const*, int) ()
On Debian and many other GNU/Linux distributions, executables are
without debug symbols by default. The debug symbols are separately
available in another repository, which you can add to a file in
/etc/apt/sources.list.d:
deb http://deb.debian.org/debian-debug/ bookworm-debug main
(Replace bookworm with your Debian version of choice.)
After an apt-update, you should be able to execute
sudo apt install vdr-dbgsym
to get some files under /usr/lib/debug/.build-id/ that should match the
BuildID that should be reported by the following command:
file /usr/bin/vdr
That said, sometimes it is possible to find the bug by executing simply
the following commands in GDB:
disassemble 0x08136f6a
info registers
If GDB complains that it does not know the function boundaries, you can
try to start disassembly from a few bytes earlier:
x/32i 0x08136f50
cool, thanks, i forgot so many things :-)
Hopefully this will show the problem, and this is easy enough to match
with the source code. If not, the debugging symbols for your vdr
executable should help you to produce a fully resolved stack trace
including the values of local variables (backtrace full).
I've installed the vdr-dbg debian package to provide debugging symbols
I can't find a package with that name at https://packages.debian.org.
$ apt-cache policy vdr-dbg
vdr-dbg:
Installiert: 2.0.6-6yavdr1~woprr
Installationskandidat: 2.0.6-6yavdr1
Versionstabelle:
2.0.6-6yavdr1 0
995 http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu/
precise/main i386 Packages
*** 2.0.6-6yavdr1~woprr 0
100 /var/lib/dpkg/status
2.0.3-3 0
500 http://archive.debian.org/debian/ jessie/main i386 Packages
1.7.28-1 0
500 http://archive.debian.org/debian/ wheezy/main i386 Packages
$ diff -U3 /usr/sbin/runvdr.precise /usr/sbin/runvdr
--- /usr/sbin/runvdr.precise 2014-07-20 02:47:00.000000000 +0200
+++ /usr/sbin/runvdr 2024-11-15 10:08:21.700827294 +0100
@@ -7,7 +7,7 @@
VDR_ENV="$VDR_ENV VDR_CHARSET_OVERRIDE=$VDR_CHARSET_OVERRIDE"
fi
-VDRCMD="$VDR_ENV /usr/bin/vdr $*"
+VDRCMD="$VDR_ENV /usr/bin/vdr-dbg $*"
did the trick
Attaching to process 29155
Reading symbols from /usr/bin/vdr...Reading symbols from
/usr/lib/debug/.build-id/10/e8b576883246ca77ad6f40e2c26053ba2d357c.debug...done.
done.
bt full / thread apply all bt
#2 0x081330f4 in cRemote::Get (WaitMs=10, UnknownCode=0x0) at remote.c:194
MutexLock = {mutex = 0x822feb0, locked = true}
#3 0x080f225b in cInterface::GetKey (this=0x9ee02c8, Wait=<optimized
out>) at interface.c:41
No locals.
#4 0x080aeda3 in main (argc=0, argv=<optimized out>) at vdr.c:1066
Now = 1731696012
Interact = <optimized out>
key = <optimized out>
PreviousChannelIndex = 0
LastChannelChanged = 1731695003
IsInfoMenu = false
Menu = 0x0
LastChannel = 18
LastTimerChannel = 54
PreviousChannel = {18, 2}
CurrentSkin = <optimized out>
LastInteract = 1731696012
MaxLatencyTime = 6
InhibitEpgScan = false
VideoDirectory = 0x38 <Address 0x38 out of bounds>
ResourceDirectory = 0x8194440 "/usr/share/vdr"
EpgDataFileName = <optimized out>
AudioCommand = 0x0
CacheDirectory = 0x8194431 "/var/cache/vdr"
...
Strange is the the bug does no more occur using the vdr-dbg exe?
Maybe some left over debug break point or C++ assertion...
Best regards,
Marko
y
tom