Place chicken bones in a roasting pan, drizzle with the oil, and toss to coat. Transfer roasting pan to oven and roast, 15 to 20 minutes, until lightly colored.
Add onions, carrots, celery, mushrooms, if desired, and garlic; roast, turning chicken and vegetables occasionally, until bones are golden brown, about 30 minutes more.
Transfer bones and vegetables to a large stockpot and add 40 cups cold water. Pour off any excess fat from roasting pan. Add a splash of water to pan and scrape up browned bits from the bottom and into the stockpot. Bring to a simmer over medium-high heat.
Skim fat that has risen to the surface and reduce heat to low. Place thyme, parsley, and bay leaf in a piece of cheesecloth; tie with kitchen twine to enclose. Add cheesecloth packet to stock, along with salt and peppercorns. Simmer gently for 2 to 3 hours, skimming occasionally and adding more water as necessary to keep bones covered.
Prepare an ice-water bath; set aside. Strain stock through a colander into a large container. Let bones and vegetables drain thoroughly before discarding. Strain stock again through a fine-mesh or cheesecloth-lined strainer into a container set in the ice-water bath. Let cool, stirring occasionally.
Cover stock and transfer to refrigerator. When stock has chilled, remove any fat from surface.
Stock will keep 3 to 4 days, refrigerated. After 4 days, bring stock to a boil and reduce to a simmer; simmer for 3 minutes. Refrigerate up to 3 days more. Or keep frozen up to 3 months.