Ну, я думаю, что нашел проблему. Кажется, это проблема модуля inspect и базового кода C в многопоточном приложении. Модуль с кодом выше импортируется из разных потоков. И этот второй график указывает на проблему.

function
, указанный здесь в 3-м узле внизу, - inspect.getmodule (). Я не мог вместить все это там, и мне пришлось немного подрезать.
(Pdb) objgraph.at(3510928)
<cell at 0x359290: dict object at 0x3849c0>
А внутри диктата есть все кадры
(Pdb) objgraph.at(0x3849c0)
{(<frame object at 0x97a288>, '/lib/python26.zip/logging/__init__.py'): <module 'logging' from '/lib/python26.zip/logging/__init__.py'>,
(<frame object at 0x896288>, '/lib/python26.zip/logging/__init__.py'): <module 'logging' from '/lib/python26.zip/logging/__init__.py'>,
(<frame object at 0xa621b0>, '/lib/python26.zip/logging/__init__.py'): <module 'logging' from '/lib/python26.zip/logging/__init__.py'>,
(<frame object at 0x11266e8>, '/lib/python26.zip/logging/__init__.py'): <module 'logging' from '/lib/python26.zip/logging/__init__.py'>,
...}
И если вы получите внешние кадры всех этих кадров
(Pdb) inspect.getouterframes(objgraph.at(0x97a288))
[(<frame object at 0x97a288>, '/lib/python26.zip/logging/__init__.py', 1028, 'debug', [' self._log(DEBUG, msg, args, **kwargs)\n'], 0),
(<frame object at 0x794040>, '/lib/python26.zip/logging/__init__.py', 1505, 'debug', [' root.debug(*((msg,)+args), **kwargs)\n'], 0),
(<frame object at 0x794e58>, '/mmc/src/core/controller/main.py', 1046, '__startCharge', [' self.chargeLock.release()\n'], 0),
(<frame object at 0x5c4260>, '/mmc/src/core/controller/main.py', 1420, 'watchScheduleStartChargeCondition', [' ret = self.__startCharge(0, eventCode=eventCode)\n'], 0),
(<frame object at 0x5c0dd0>, '/home/ephibian/Python2/_install/lib/python2.6/threading.py', 484, 'run', None, None),
(<frame object at 0x5c3b48>, '/home/ephibian/Python2/_install/lib/python2.6/threading.py', 532, '__bootstrap_inner', None, None),
(<frame object at 0x218170>, '/home/ephibian/Python2/_install/lib/python2.6/threading.py', 504, '__bootstrap', None, None)]
Все они указывают на метод __bootstrap в потоке. Я мог оказаться здесь не на том пути, но контекст некоторых из этих фреймов далеко не там, где я вызываю опубликованный мной метод.