The sinfulness of such a doubt would be dependent upon the degree to which it was willful.
For the scrupulous, it is usually not willed - it’s something they cannot control, almost like OCD.
For those who are not truly sorry for their sins, it might be appropriate to doubt. I do not refer here to imperfect contrition, or attrition, but to no real contrition at all, with no purpose of amendment.
For those who have encountered a grumpy priest, a doubt might be the result of an emotional reaction or a lack of proper formation regarding the Sacrament.
I guess there are people out there who habitually do things to make themselves miserable, and perhaps they would fall into the category of willful doubters.
What are you envisioning with your question?
Betsy