<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/contrib/libs/backtrace, branch main</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=main</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2026-07-22T16:10:52Z</updated>
<entry>
<title>Update contrib/libs/backtrace to 2026-07-06</title>
<updated>2026-07-22T16:10:52Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-07-22T15:37:36Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=7e00c04bca9c4c8425ba96c5354aba7c7f093833'/>
<id>urn:sha1:7e00c04bca9c4c8425ba96c5354aba7c7f093833</id>
<content type='text'>
commit_hash:d67fc0764372998e21e1adbd7e87e4ce07ad2a58
</content>
</entry>
<entry>
<title>libbacktrace abbrev cache</title>
<updated>2026-07-20T18:40:42Z</updated>
<author>
<name>denkitaev</name>
<email>denkitaev@yandex-team.com</email>
</author>
<published>2026-07-20T17:50:15Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=92668a25e40f1ae9c5b4dcd40d5d68aec54e75b8'/>
<id>urn:sha1:92668a25e40f1ae9c5b4dcd40d5d68aec54e75b8</id>
<content type='text'>
### Проблема

libbacktrace парсит DWARF abbrev-таблицу заново для каждого CU — кэша по offset в build_address_map нет. Инструменты, дедуплицирующие .debug_abbrev между CU (llvm-bolt --update-debug-sections, dwz, -flto=full), сводят все таблицы к одной общей, на которую ссылаются все CU разом - и стоимость инициализации символизатора становится O(N_CU × размер общей таблицы). На BOLT-бинаре yabs-server (\~70k CU) первый же резолв бэктрейса разворачивает в память 70 тысяч копий одной и той же таблицы: 15.7 ГиБ анонимной памяти, в проде - OOM-цикл сервиса при включённой DWARF-символизации. Дедупликация таблиц есть и без BOLT (линкер мёржит одинаковые), поэтому эффект, в меньшем масштабе, заметен везде.

### Воспроизведение

&lt;https://nda.ya.ru/t/L_uavEhP7jBnqo&gt;

```bash
cd junk/denkitaev/libbacktrace_debug/repro
ya make -r &amp;&amp; ./repro  # .debug_abbrev не дедуплицированна
ya make -r -DUSE_LTO=yes &amp;&amp; ./repro  # .debug_abbrev дедуплицированна
```

### Фикс

Кэш распарсенных таблиц по abbrev_offset внутри build_address_map: таблица парсится один раз, CU получают shallow-копии. Кэш локален для одного вызова (одна .debug_abbrev-секция; потокобезопасность не меняется), владеет таблицами; fail-путь освобождает их ровно один раз — прежний per-unit free_abbrevs при шаринге дал бы double-free. Горячий путь резолва не тронут.

#|
||

**&lt;a href="https://nda.ya.ru/t/s7nuA8_37jBnqq" target="_blank"&gt;![](https://nda.ya.ru/t/mAiQIjHx7Mm3JC =30x) Echo tests&lt;/a&gt;**

||
|#
commit_hash:d101e82766f99efbc214a894c1e0971822ba0485
</content>
</entry>
<entry>
<title>Update contrib/libs/backtrace to 2026-06-27</title>
<updated>2026-07-13T15:42:20Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-07-13T14:58:28Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=14c4b955f542d1a4bcacf7e2d78e6160edfb5c16'/>
<id>urn:sha1:14c4b955f542d1a4bcacf7e2d78e6160edfb5c16</id>
<content type='text'>
commit_hash:a58b8b28043192162d00b6e1a124727bac3b19b6
</content>
</entry>
<entry>
<title>update libbacktrace to 2026-06-02, replace the custom zstd patch with the upstream fix</title>
<updated>2026-06-10T20:38:09Z</updated>
<author>
<name>pzuev</name>
<email>pzuev@yandex-team.com</email>
</author>
<published>2026-06-10T19:55:27Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=edf148390d234d23f1ba7a111d7ace9867f65844'/>
<id>urn:sha1:edf148390d234d23f1ba7a111d7ace9867f65844</id>
<content type='text'>
commit_hash:85ebfaedd189ecac261deaf9b90c30a3ac515f4c
</content>
</entry>
<entry>
<title>libbacktrace patch: handle FSE_Compressed_Mode blocks with 0 sequences</title>
<updated>2026-05-29T10:02:02Z</updated>
<author>
<name>pzuev</name>
<email>pzuev@yandex-team.com</email>
</author>
<published>2026-05-29T09:33:19Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=5eefcf784f7536223275c17cd26480c981329039'/>
<id>urn:sha1:5eefcf784f7536223275c17cd26480c981329039</id>
<content type='text'>
Upstream issue:

https://github.com/ianlancetaylor/libbacktrace/issues/164

Decompression of valid zstd-compressed .debug_info sections fails
sometimes, leading to unsymbolicated stack traces.
commit_hash:4d8b1f6863e9ed1b43a10c9b98d753ed95efd23d
</content>
</entry>
<entry>
<title>Update contrib/libs/backtrace to 2026-05-04</title>
<updated>2026-05-20T09:01:33Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-05-20T08:21:55Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=2af5053c8445d9ce11acb5e7a4635f4c6bd2fe65'/>
<id>urn:sha1:2af5053c8445d9ce11acb5e7a4635f4c6bd2fe65</id>
<content type='text'>
commit_hash:75812c00534578aff5d0f5016471ddb9ea2d1ff7
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-02-18T12:32:51Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-02-18T12:00:16Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=a7d8c97db40573b941aa2214cc1fb78ef799256d'/>
<id>urn:sha1:a7d8c97db40573b941aa2214cc1fb78ef799256d</id>
<content type='text'>
commit_hash:fe25cf4d059b4ade75caaeb21157b380e597df97
</content>
</entry>
<entry>
<title>Update contrib/libs/backtrace to 2025-11-06</title>
<updated>2025-11-21T21:29:31Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2025-11-21T20:48:22Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=aaa848b3b576f55a1408bad8a3b289dcfdf8af0f'/>
<id>urn:sha1:aaa848b3b576f55a1408bad8a3b289dcfdf8af0f</id>
<content type='text'>
commit_hash:b3a4f07c88738b4746f1388fdabe7dbc0f09acb7
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2025-10-13T14:01:39Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2025-10-13T12:50:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=0fea63e0ab4a9c4757ebc64da21993f0fc2f8eb1'/>
<id>urn:sha1:0fea63e0ab4a9c4757ebc64da21993f0fc2f8eb1</id>
<content type='text'>
commit_hash:c106c0b4122e4493aa70f0007e98dff850405f05
</content>
</entry>
<entry>
<title>fix contribs for arc/local/bin for freebsd</title>
<updated>2025-09-05T19:21:04Z</updated>
<author>
<name>tldr</name>
<email>tldr@yandex-team.com</email>
</author>
<published>2025-09-05T19:02:47Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8ae54b4be7b7cc160ad55dc2150c4cd22c344061'/>
<id>urn:sha1:8ae54b4be7b7cc160ad55dc2150c4cd22c344061</id>
<content type='text'>
commit_hash:9bdc10d7c15c86522dd0b0d73c180197bda0e822
</content>
</entry>
</feed>
