The answer to 'P-trap foul smell' is that a foul odor coming from a P-trap is usually caused by a blockage or dry trap. The P-trap is the curved pipe underneath a sink or shower that prevents sewer gases from entering the home. If the trap dries out or becomes clogged, it can allow unpleasant smells to come back up through the drain.
Common causes include infrequent use of the fixture, a clogged drain, or a leak in the trap. Symptoms include a strong sewage-like odor coming from the drain. Solutions may involve refilling the trap with water, clearing a clog, or replacing the trap if it's damaged.