Where flashing fails
Federal building guidance from the Building America Solution Center lists the spots to know:
Roof-to-wall joints, such as a lower rear roof meeting the main wall or a dormer side. These use step flashing, short overlapping pieces woven in with the shingles.
The bottom end of that joint, which needs kick-out flashing to turn runoff into the gutter instead of down the wall.
Pipes and vents, which need a boot or collar. Chimneys, skylights and solar mounts all need their own flashing too.
Valleys where two roof slopes meet, and the drip edge along the roof's lower edge, which should extend into the gutter, not behind it.
The NPS brief names three causes of flashing failure: poor workmanship, stress from heating and cooling, and corrosion of the metal or its fasteners. It also warns that some roofing and flashing materials aren't compatible with each other.
On a flat (low-slope) roof, like many rowhome roofs, the weak points are the same idea: the joints at walls, curbs, drains and scuppers. The guidance on roof penetrations says a low-slope roof should still drain, with a minimum slope of 1/4 inch per foot recommended, so water doesn't sit against those joints.
Why the stain may not be under the problem
Water that gets past flashing can run along the roof deck, rafters or the inside of a wall before it shows up. A stain under the chimney makes the chimney a good place to start, but it doesn't rule out a joint farther up the roof. Note whether the spot gets wet only during rain or also in dry weather; wetting in dry weather means plumbing or condensation should be checked too.
Missing kick-out flashing often shows up on the outside wall rather than a ceiling. The step and kick-out guide lists streaks, mold or algae on the wall below a roof-wall joint, rotting wood and peeling paint as warning signs. It also notes that wood siding shows this quickly, while fiber cement, vinyl siding and brick veneer can hide it for years.
What you can check without climbing
Stay off the roof and don't lift shingles or pull siding. From the ground or a window, with binoculars or a phone zoom, look for:
Streaks or peeling paint on the wall right below where a roof meets it.
Water overflowing the gutter at that same corner during rain.
Bent sheet-metal scraps standing in for a kick-out. The Building America guide says field-made deflectors are often too small for the water coming down the roof.
Loose or rusted metal around the chimney or vent pipes.
Inside, photograph the stain with the date and weather, and check whether it grows after storms. If a ceiling sags or water is near lights or outlets, keep people away and call a pro promptly, an electrician as well if wiring is involved. For curling or bare shingles, our guide on what a roof inspection should check covers the rest of the roof.
What to ask the roofer
Hire a roofer who works on your roof type. Ask them to show you photos of the exact defect and to explain how the new flashing will tie into the wall's water barrier, not just the shingles. The Building America guidance says the house wrap or wall barrier should lap over the step flashing; if it's tucked underneath, water can get behind the flashing and into the wall.
For a size check, the Department of Energy's step flashing page says step flashing should extend at least 4 inches up the wall and 4 inches onto the roof deck. Your local code and the shingle maker's instructions still govern the actual job.
Be wary of a quote that's only sealant. Ask how caulk fixes a missing piece or a backwards lap. Also ask what happens if rot turns up: the NPS brief notes that replacing flashing can mean removing large sections of roofing, and on slate it can take substantial removal of the surrounding slates. Get a written price or process for hidden damage before work starts.
Permits in Philadelphia and the suburbs
The City's building permit page says that if your home isn't on the Philadelphia Historic Register, repairs that are regular maintenance often don't need a permit, while major repairs do. If the fix turns into replacing the roof covering, see our guide on when a rowhome roof replacement needs a permit. On a historic property, check the historic designation rules first, because L&I won't take a permit application without Historical Commission approval. In Bucks and Montgomery County, ask your township or borough code office before work starts. You can browse more leak guides.