Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion failure with XBMC Gotham beta3 #159

Closed
wbx-github opened this issue Apr 2, 2014 · 4 comments
Closed

assertion failure with XBMC Gotham beta3 #159

wbx-github opened this issue Apr 2, 2014 · 4 comments

Comments

@wbx-github
Copy link

Hi,

on startup of XBMC gotham beta 3 I get following assertion:

Reading symbols from /usr/lib/xbmc/xbmc.bin...  done.
(gdb) run
Starting program: /usr/lib/xbmc/xbmc.bin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb51e73f0 (LWP 387)]
[New Thread 0xb47ff3f0 (LWP 388)]
[New Thread 0xb3dff3f0 (LWP 390)]
[New Thread 0xb35ff3f0 (LWP 391)]
[New Thread 0xb2dff3f0 (LWP 392)]
[New Thread 0xb25ff3f0 (LWP 393)]
[New Thread 0xb1dff3f0 (LWP 394)]
[New Thread 0xb15ff3f0 (LWP 395)]
[New Thread 0xb0dff3f0 (LWP 396)]
[New Thread 0xb05ff3f0 (LWP 397)]
assertion failure:/adk/xbmc/build_raspberry-pi_arm_glibc_eabihf/w-bcm2835-vc-0.4-1/bcm2835-vc-0.4/interface/vmcs_host/vc_vchi_tvservice.c:430:vc_tv_unregister_callback():done
[New Thread 0xafdff3f0 (LWP 398)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb05ff3f0 (LWP 397)]
0xb53b1cc0 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0xb53b1cc0 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0xb53b31e4 in __GI_abort () at abort.c:89
#2  0xb621a484 in vcos_pthreads_logging_assert (file=file@entry=0xb6238160 "/adk/xbmc/build_raspberry-pi_arm_glibc_eabihf/w-bcm2835-vc-0.4-1/bcm2835-vc-0.4/interface/vmcs_host/vc_vchi_tvservice.c", 
    func=func@entry=0xb6237cec <__func__.9374> "vc_tv_unregister_callback", line=line@entry=430, fmt=0xb623770a "%s")
    at /adk/xbmc/build_raspberry-pi_arm_glibc_eabihf/w-bcm2835-vc-0.4-1/bcm2835-vc-0.4/interface/vcos/pthreads/vcos_pthreads.c:560
#3  0xb6232cb0 in vc_tv_unregister_callback (callback=0xb3fdcc90 <rpi_tv_callback(void*, unsigned int, unsigned int, unsigned int)>)
    at /adk/xbmc/build_raspberry-pi_arm_glibc_eabihf/w-bcm2835-vc-0.4-1/bcm2835-vc-0.4/interface/vmcs_host/vc_vchi_tvservice.c:430
#4  0xb3fddff0 in CEC::CRPiCECAdapterCommunication::Close (this=0x239c1e0) at adapter/RPi/RPiCECAdapterCommunication.cpp:356
#5  0xb3fddc28 in CEC::CRPiCECAdapterCommunication::Open (this=0x239c1e0, iTimeoutMs=3333, UNUSED_bSkipChecks=false, bStartListening=true) at adapter/RPi/RPiCECAdapterCommunication.cpp:294
#6  0xb3f93ef8 in CEC::CCECProcessor::OpenConnection (this=0x2399248, strPort=0x2369044 "RPI", iBaudRate=38400, iTimeoutMs=10000, bStartListening=true) at CECProcessor.cpp:182
#7  0xb3f93a68 in CEC::CCECProcessor::Start (this=0x2399248, strPort=0x2369044 "RPI", iBaudRate=38400, iTimeoutMs=10000) at CECProcessor.cpp:115
#8  0xb3fa054c in CEC::CLibCEC::Open (this=0x23990b0, strPort=0x2369044 "RPI", iTimeoutMs=10000) at LibCEC.cpp:75
#9  0x01784a70 in PERIPHERALS::CPeripheralCecAdapter::OpenConnection (this=0x2366468) at PeripheralCecAdapter.cpp:328
#10 0x01784d0c in PERIPHERALS::CPeripheralCecAdapter::Process (this=0x2366468) at PeripheralCecAdapter.cpp:359
#11 0x01883d14 in CThread::Action (this=0x23664f0) at Thread.cpp:220
#12 0x018838f4 in CThread::staticThread (data=0x23664f0) at Thread.cpp:130
#13 0xb6632f74 in start_thread (arg=0xb05ff3f0) at pthread_create.c:311
#14 0xb5455848 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92 from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

I use following version of user land a8fbe2c from 25.03.2014.
The problem does not exist for Frodo builds.
Any help would be appreciated.

@popcornmix
Copy link
Contributor

Sounds like libCEC is unregistering a callback it didn't register.
Perhaps you could add logging to vc_tv_register_callback and vc_tv_unregister_callback showing the callback parameter.

Are you running on raspbian?
Where did you get (or how did you build) gotham beta 3 and cec service?

@waldemar-brodkorb
Copy link

Yes, you are right. I added some debug info.

Following patch to libcec fixes it for me, so it is not a rpi-userland bug:

--- libcec-2.1.4.orig/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp    2013-12-15 12:48:14.000000000 +0100
+++ libcec-2.1.4/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp 2014-04-04 16:42:04.781854374 +0200
@@ -353,7 +353,9 @@ void CRPiCECAdapterCommunication::Close(
     else
       return;
   }
-  vc_tv_unregister_callback(rpi_tv_callback);
+
+  if (m_bInitialised)
+    vc_tv_unregister_callback(rpi_tv_callback);

   UnregisterLogicalAddress();

@popcornmix
Copy link
Contributor

Could you create an issue on https://github.com/Pulse-Eight/libcec/
(or submit a pull request)?

@wbx-github
Copy link
Author

Pulse-Eight/libcec#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants