Section 5. A lien upon land for the erection, alteration, repair or removal of a building or other structure or other improvement of real property or for professional services relating thereto or a lien established under section seventy-six of chapter sixty-three, or section 6 of chapter 183A shall be enforced by a civil action brought in the superior court for the county where such land lies or in the district court in the judicial district where such land lies. The plaintiff shall bring his action in his own behalf and in behalf of all other persons in interest who shall become parties. An attested copy of the complaint, which shall contain a brief description of the property sufficient to identify it, and a statement of the amount due, shall be filed in the registry of deeds and recorded as provided in section nine within thirty days of the commencement of the action, or such lien shall be dissolved. All other parties in interest may appear and have their rights determined in such action, and at any time before entry of final judgment, upon the suggestion of any party in interest that any other person is or may be interested in the action, or of its own motion, the court may summon such person to appear in such cause on or before a day certain or be forever barred from any rights thereunder. The court may in its discretion provide for notice to absent parties in interest. The terms ''party in interest'' and ''person in interest'', as used in this chapter, shall include mortgages and attaching creditors.