If your bathroom sink is overflowing and smells bad, it's likely because the P-trap is not functioning properly. The P-trap is a U-shaped pipe that's located under the sink. Its purpose is to prevent sewer gas from escaping into your home. If the P-trap is not working, sewer gas will escape and cause a bad smell. To fix this problem, you'll need to clean or replace the P-trap.