<html><head><style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head><body><div>Upon further review, I discovered what happened here. While debugging the data leak issue I was assessing various versions of Python 3.12 and 3.13 against both libdb 5.3 and 6.2, and at some point the `BERKELEYDB_LIBDIR` and `BERKELEYDB_INCDIR` became mismatched such that the former was referring to 6.2 and the latter was referring to 5.3. After correcting the mismatch the reproducer you provided succeeds (does not reproduce the issue) on all combinations of (3.13, 3.12) x (5.3, 6.2), whereas before it was failing when LIBDIR and INCDIR were misaligned.</div><div><br></div><div>Apologies for the noise here. I've confirmed that this instance of operator error did not impact the assessment of the data leak issue, and that the data leak issue is reproducible for all of (3.13, 3.12) x (5.3, 6.2).</div><div><br></div><div>On Wed, 2025-05-14 at 16:59 +0200, Jesus Cea wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>On 14/5/25 4:00, Jacob Henner wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>berkeleydb is segfaulting on Arch Linux amd64, with Python 3.13 and <br></div><div>either libdb 6.2.32 or libdb 5.3.28. Both Python 3.13.0 and 3.13.3 were <br></div><div>confirmed to be affected. 3.12.10 is not affected.<br></div></blockquote><div><br></div><div>I can't reproduce this under Ubuntu, but BerkeleyDB and Python 3.13 are <br></div><div>self-compiled.<br></div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Stack trace:<br></div><div><br></div><div>#0  0x00007a69663ced7a n/a (libc.so.6 + 0xb8d7a)<br></div><div><br></div><div>#1  0x00007a696637b437 n/a (libc.so.6 + 0x65437)<br></div><div><br></div><div>#2  0x00007a696637c1e4 n/a (libc.so.6 + 0x661e4)<br></div><div><br></div><div>#3  0x00007a6965e9e05a __db_errfile (libdb-6.2.so + 0x12005a)<br></div><div><br></div><div>#4  0x00007a6965e9e634 __db_errx (libdb-6.2.so + 0x120634)<br></div><div><br></div><div>#5  0x00007a6965ec98f5 __env_set_create_dir (libdb-6.2.so + 0x14b8f5)<br></div><div><br></div><div>#6  0x00007a6965f8bbc9 DBEnv_set_lk_detect (_berkeleydb.abi3.so + 0x12bc9)<br></div></blockquote><div><br></div><div>This traceback is useful, thanks.<br></div><div><br></div><div>Lets try to do a minimal reproducible case. Try this code:<br></div><div><br></div><div>"""<br></div><div>import berkeleydb<br></div><div><br></div><div>e = berkeleydb.db.DBEnv()<br></div><div>e.set_lk_detect(berkeleydb.db.DB_LOCK_DEFAULT)<br></div><div>"""<br></div><div><br></div><div>-- <br></div><div>Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/<br></div><div><a href="mailto:jcea@jcea.es">jcea@jcea.es</a> - <a href="https://www.jcea.es/">https://www.jcea.es/</a>    _/_/    _/_/  _/_/    _/_/  _/_/<br></div><div>Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/<br></div><div>jabber / xmpp:<a href="mailto:jcea@jabber.org">jcea@jabber.org</a>  _/_/  _/_/    _/_/          _/_/  _/_/<br></div><div>"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/<br></div><div>"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/<br></div><div>"El amor es poner tu felicidad en la felicidad de otro" - Leibniz<br></div></blockquote><div><br></div><div><span><pre>-- <br></pre><pre>Jacob Henner
</pre></span></div></body></html>