My wife' washer does the same thing..
This is caused by the cloth fibers that accumulate in areas that do not get submersed and rinsed regularly.
The soaps and conditioners, softeners build up on the fiber residue and mold begins to grow.
Because this is in an area that does not get SUPER wet or submerged you rarely if at all notice any odors on your washed clothing.
Set the load to high, hot, and fill the washer with water and add 2-3 cups of white vinegar (more if you like) and a box of baking soda (1/2 box if it's a large box), about 1/2 cup to a cup.
Stop the washer when it is full (sometimes you can get a pail and add more water to get the water level closer to the top).
Swish this around with a suitable brush, like a toilet brush that is new (the long handle and large brush makes this much easier), be sure to get under the top lip, like cleaning under the rim of a toilet.
Let it sit for a few hours or even overnight. Then using the toilet brush give the top of the drum, including under the rim, a good scrubbing. Turn the washer back on and finish the cycle.
Run another cycle ... large-load setting, but cold water is fine ... this is just to rinse the vinegar smell out (this step isn't necessary if you don't mind the smell of vinegar).
The acidity of the vinegar will cut through any residue (detergent, fabric softener, etc.) that may be built up inside your washer ... and
the baking soda will act as a mild cleanser or abrasive to clean all the little nooks and crannies.
Citric acid will work also, but it's more expensive than vinegar!
*If you leave the top open after washing this helps to dry the drum and inside and the mold cannot grow, thus no odor (after you clean it as above).