Fresh walnuts will emit a nutty aroma, whereas rancid walnuts give off a scent similar to paint thinner or rotten eggs.