Hmm well a little more info.
I see these illegal state messages whilst working on a local test server (i.e. 127.0.0.1) (and both client and server are not modified).
If I pick up a stack and split it - usually splitting the stack into an inventory location other than the origin I get these messages on the server log. Not always, but sometimes.
For example, pick up a stack of 64 ingots of iron from a chest, then right click to drop 1 ingot into my "local" inventory. The stack split will happen but I see this message on the server (again, sometimes but not always).
This "illegal state" message will continue for each subsequent stack split. Whilst the stack is still in use. Dropping the stack back to original chest, left clicking on another item and then accessing the original item (i.e. 64 ingots of iron) then stops the message.
A PlayerIllegalStateEvent would be good for starters even if I don't choose to cancel the event, at least I can create a log file. That way I can determine the frequency of these events as well as any pattern (i.e. if its specific players mainly causing them or like with my testing an infrequent anomaly).