Open adarnimrod opened 4 years ago
GLib:ERROR:../glib/gvariant-serialiser.c:1367:g_variant_serialised_n_children: code should not be reached
certainly that last error looks like my bug with parental controls, which should be fixed by #107
Oh, good catch. Even though we want to fix this particular case, azafea shouldn't crash when sent an unexpected variant. The exception should be caught, logged and the event rejected. I've never looked that closely at this code but having done lots of variant handling with ostree in Python it shouldn't be too hard to catch. We should add a test for that, too.
I filed https://phabricator.endlessm.com/T29910 about it. I don’t think it’s hard to fix for any one particular metrics event, but would be a fair amount of work (including testing) to fix for all of them.
Thanks. Without having looked at the code it seems that WrongPayloadError
is being raised by the event processor, but I can't tell if that GVariant
assertion is happening afterwards. So, maybe the error is not where I'm expecting. That said, what I think you'd want to do is catch the exception at a higher level of azafea so that an event processing error doesn't bring down the whole process. So, for event processing unit tests you'd still look for specific exceptions. But at the higher level that passes in the event for processing you'd catch the generic exception, log it, reject the event and carry on.
The assertion failures I’m talking about are GVariant
assertions from within GLib, and they abort the python process; no Python exceptions are involved. There are definitely several different bugs at play in the error log in the 0th comment of this issue.
In the dev environment we got the following error running
metrics-2 replay-unknown
: