Sounds like it has pear midge.....they overwinter in soil after falling to the ground in the black pears that drop off, crawl up the stem and bore into the new pears and so on....if you put a thick grease band around the trunk of the tree and burn/dispose of any infected black fruits you can break the life cycle and the tree will recover ok. Sorry to go off topic!