<div dir="ltr"><div>Hi <br>we are getting the below assertion failed in libpulse ultimately causes crash.<br><br>static pa_usec_t calc_next_timeout(pa_mainloop *m) {<br>    pa_time_event *t;<br>    pa_usec_t clock_now;<br><br>    if (m->n_enabled_time_events <= 0)<br>        return PA_USEC_INVALID;<br><br><span style="background-color:rgb(255,255,0)"><span style="color:rgb(0,0,0)"> <b>   pa_assert_se(t = find_next_time_event(m));</b></span></span> //// assertion failed here and causes the crash<br><br>    if (t->time <= 0)<br>        return 0;<br><br>    clock_now = pa_rtclock_now();<br><br>    if (t->time <= clock_now)<br>        return 0;<br><br>    return t->time - clock_now;<br>}<br><br><br></div><div>this crash happened due to the following API call.<br><br>pa_context_suspend_sink_by_name(context,sink_name,suspend/resume,NULL.NULL);<br><br></div><div>above function causes a crash in libpulse code.<br><br>#0  __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:57<br>#1  0xb6bd5690 in __GI_abort () at abort.c:89<br>#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<br>#3  pa_mainloop_prepare (m=0x0, m@entry=0xb37d8, timeout=timeout@entry=-1) at /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:800<br>#4  0xb525e4dc in pa_mainloop_iterate (m=m@entry=0xb37d8, block=block@entry=1, retval=retval@entry=0x0) at /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:923<br>#5  0xb525e5bc in pa_mainloop_run (m=0xb37d8, retval=retval@entry=0x0) at /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/mainloop.c:944<br>#6  0xb526e1a0 in thread (userdata=0xb2820) at /usr/src/debug/pulseaudio/6.0-r0/pulseaudio-6.0/src/pulse/thread-mainloop.c:88<br>#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<br>#8  0xb6df4040 in start_thread (arg=0xb00fe420) at pthread_create.c:314<br><br></div><div>Note: This issue occurs randomly. with pulseaudio-6.0<br><br></div><div>Request to help in resolution of this issue:<br><br></div><div>Regards,<br></div><div>Dhananjay<br></div><div><br><br></div></div>