what happen if the property owner filed a bankrupcy on the day I bought the house at trustee sale?

Just bought a property at trustee sale a few days ago. When I contacted the (ex-)owner of the property, they told me that they have just filed a bankruptcy protection on the day of trustee sale. What should I do?
I also contacted the trustee and they assure me that the sale is valid because the owner has filed for bankruptcy for 3 times within a year.
What should I do?

It is quite common for debtors to file BK the morning of the trustee sale in an effort to halt or cancel the sale. Almost always, even if a property sold to a third party at trustee sale, the automatic stay is honored by the trustee/beneficiary and the sale is cancelled/money refunded. However, for serial BK filers, the BK code protections become less and less with each filing. You should consult a real estate attorney and the trustee to assist you in making sure the sale was valid and the BK will not haunt you in the future. It is good news for you that the trustee continued on with the sale. Good Luck.

Mike’s answer is great, as his advice at the end. One thing I’ll add is that it is my understanding that one of the reasons that CivilCode 2924 makes trustee’s deed’s effective as of 8am the day of sale, as long as they are recorded within 15 days, is to avoid this issue as it is impossible to file BK on or before 8am exactly - and as such the transfer technically occurred before the BK filing. But as Mike said, it is probably a good idea to consult an attorney and the trustee.