On Sat, 23 Jul 2016, at 06:08 PM, Dhananjay Joshi wrote: > Hi > we are getting the below assertion failed in libpulse ultimately causes > crash. > > static pa_usec_t calc_next_timeout(pa_mainloop *m) { > pa_time_event *t; > pa_usec_t clock_now; > > if (m->n_enabled_time_events <= 0) > return PA_USEC_INVALID; > > * pa_assert_se(t = find_next_time_event(m));* //// assertion failed > here > and causes the crash > > if (t->time <= 0) > return 0; > > clock_now = pa_rtclock_now(); > > if (t->time <= clock_now) > return 0; > > return t->time - clock_now; > } > > > this crash happened due to the following API call. > > pa_context_suspend_sink_by_name(context,sink_name,suspend/resume,NULL.NULL); > > above function causes a crash in libpulse code. > > #0 __GI_raise (sig=sig at entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:57 > #1 0xb6bd5690 in __GI_abort () at abort.c:89 > #2 0xb525dbe0 in calc_next_timeout (m=<optimized out>) at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:719 > #3 pa_mainloop_prepare (m=0x0, m at entry=0xb37d8, > timeout=timeout at entry=-1) > at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:800 > #4 0xb525e4dc in pa_mainloop_iterate (m=m at entry=0xb37d8, > block=block at entry=1, > retval=retval at entry=0x0) at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:923 > #5 0xb525e5bc in pa_mainloop_run (m=0xb37d8, retval=retval at entry=0x0) at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:944 > #6 0xb526e1a0 in thread (userdata=0xb2820) at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/thread-mainloop.c:88 > #7 0xb51fc11c in internal_thread_func (userdata=0xb62c0) at > /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulsecore/thread-posix.c:81 > #8 0xb6df4040 in start_thread (arg=0xb00fe420) at pthread_create.c:314 > > Note: This issue occurs randomly. with pulseaudio-6.0 > > Request to help in resolution of this issue: Could you try with 9.0? If it still happens, it would be nice to have a testcase that maybe does what you're doing in a loop until it breaks. Cheers, Arun