nfs-ganesha / ntirpc

New development on tirpc
25 stars 49 forks source link

Add RETRY in svc_destroy_it to prevent destroying uninitialized xprt #289

Closed xueqianhu47 closed 1 month ago

xueqianhu47 commented 7 months ago

During showdown, ganesha tries to desstroy all xprts, but then crashes because ganesha assert a xprt to be destroyed must have xp_ops initialized already. But in svc_vc_ncreatef and svc_fd_ncreatef, we don't have lock to protect the allocation and initialization part to be together. Shutdown could happen in between, in this case, above assertion will fail Instead of directly asserting, RETRY with some sleep to wait for the initialization of xp_ops to be done

xueqianhu47 commented 7 months ago

Please help review

ffilz commented 7 months ago

I think we need to do something different to synchronize shutfown.

ffilz commented 2 months ago

That looks good to me now, but I would like @dang to review also.