|
From: Lei Z. <lz...@ju...> - 2004-01-10 03:21:00
|
bummer, scratch that. It's my bad, I modified
waitfor_chan_stat_quiescent() to debug another problem... sorry about
the fuss.
Lei Zhang wrote:
> Just tripped over another beepcore-c problem: race condition at
> session shutdown time. I'm gonna use null-profile.c to explain the
> problem:
>
> In null-profile.c:
> pro_frame_available ()
> {
> 1. f = bpc_query_frame(...)
>
> 2. /* do fancy processing */
>
> 3. bpc_frame_destroy();
> }
>
> In 2. a RPY can be sent to acknowlege a MSG; now the channel 0 thread
> takes over and destroys the null-profile channel instance (because the
> channel is considered QUIESCENT); now back to the above 3, bummer!!
> core dump on GET_WRAPPER(inst->conn) then grabbing wrap->core_lock!
>
> I'm now just working around this by doing bpc_frame_destroy() before
> sending RPY. Any better/real fix?
>
|