A weird bug feeding off a fresh cut stump. The long black bit extended from its back end down into the stump, and seemed to be sucking sap out of the wood.
And the prize goes to Ulla -- good guess. It is indeed laying eggs. Apparently, this is an ichneumon wasp, which lays its eggs in dead trees. And thanks Google for helping me find the answer ;)