I have the same problem in four year old carpet, stains in every bedroom, turns out the dog was never outside....only way to get rid of it is to replace carpet and underlay.
The tenants told us they are spilt coffee stains, they couldn't explain the smell ...but if that is they case, then I'm...