OpenSolaris

Printable Version Enter a New Search
Bug ID 6734170
Synopsis do block-detach immediately after block-attach can hang xdf
State 10-Fix Delivered (Fix available in build)
Category:Subcategory xvm:kernel-io
Keywords xvm-server10-reviewed
Responsible Engineer Max Zhen
Reported Against snv_75
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_100
Fixed In snv_100
Release Fixed solaris_nevada(snv_100)
Related Bugs
Submit Date 6-August-2008
Last Update Date 8-October-2008
Description
If I do 'xm block-detach' right after 'xm block-attach' to the same vbd, xdf can hang.

This is caused by xdf not handling XenbusStateClosing oestate change well.
'xm block-detach' will change backend xenbus state to XenbusStateClosing. This can happen before backend state being switched to XenbusStateConnected (i.e. 'xm block-detach' before xdb and xdf is connected).  So, xdf will see XenbusStateClosing (changed by 'xm block-detach') before XenbusStateConnected (changed by xdb).  In this case, xdf should ignore XenbusStateConnected and keep doing detaching (since in handling XenbusStateClosing, it switched itself to XenbusStateClosed to tell xdb to close).  But, in handing XenbusStateClosing in xdf_oe_change(), xdf did not change vdp->xdf_status to XD_CLSOING, but leave it as XD_INIT.  Thus, when xdf saw XenbusStateConnected, it will wrongly keep connecting to xdb and cause a hang since at that time, xdb is closed already.
Work Around
N/A
Comments
N/A