<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/125477>125477</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Infinite loop at `dlopen` (shared-library-event breakpoint)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
georglauterbach
</td>
</tr>
</table>
<pre>
In LLDB, When using `dlopen(...)`, I am seeing infite hits on `shared-library-event` breakpoint:
```txt
Process 14278 stopped
* thread #43, name = 'libref_adv_ld_d', stop reason = shared-library-event
frame #0: 0x00007ffff7fc9110 ld-linux-x86-64.so.2`__GI__dl_debug_state at dl-debug.c:116:1
(lldb) br list -i
Current breakpoints:
Kind: shared-library-event
-1: names = {'_dl_debug_state', 'rtld_db_dlactivity', '__dl_rtld_db_dlactivity', 'r_debug_state', '_r_debug_state', '_rtld_debug_state'}, language = c, module = ld-linux-x86-64.so.2, locations = 1, resolved = 1, hit count = 3096
-1.1: where = ld-linux-x86-64.so.2`__GI__dl_debug_state at dl-debug.c:116:1, address = 0x00007ffff7fc9110, resolved, hit count = 3096
```
The program is unable to continue this way, and I am stuck.
ref: #114701
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVEtvpDgQ_jXmUgL5QfM4cOik1ato57CHlfaIDC7AO24b2aYn-fcrQ0bJ7iaRRrJArudXn6tKhqBni9iR0wM5XTK5xcX5bkbnZyO3iH6Q45INTr10Txa-fbs8EP4Ify1oYQvazkAqqoxb0RLeFEVBeEsqmmyeQN4gICYjbScdERYdAzibfMIiParc6MFL_5LjHW0kFYXBo_y-Om0jEWdC91PR48TnSOj5D-9GDAFYyesGQnTriiqZ8TPExaNUQLgoRcJg5Q2BiAsQXqdUOPVS3XujekV4nSySP3iUIcESF_gQFz0DAEx-j8YFJeIM9JlSSutpmqZ6GlvGKJjkZ7fn_Lmp8qosgis4qWjf__bU98r0Codt7kOUEUFGUCbfJcVIxJmxKn33Ohpj1EB4C4MHo0OEXBN6fty8RxvfMRQOin7XViVEn0DPWVImJsJBRf1AeP0fPK9sEF77mNgZemXkGPVdx5c33V7FVwb-45j9p_I91r9V9SVpjbTzJufj9cYkuTm1meP-IdHJyY0yamePQlkSeQzO3FG9SRYdYXSbjbtI0LY62gwgZ8XO1Y8F_ReJfvFF-SNIpXxq2RTy_33zHubnAH8OwQH2zwVh9W728gY6wGblYBCig9HZqO2GEBcd4Id82fNb9TqOcRu_F0cIj1MqlnDBWFlTlqlOqFa0MsOO1aI5NfRUltnSVbJV5TTItuHVwBocRFueGoF1xVlTl02mO075iXIqGKOci6LhSrWlOlVUqIrVFSkp3qQ2hTH3W-H8nOkQNuwYP5V1nRk5oAk_V5DvklU-bHMgJU39H978oo4Guyc7aZsWinFuTcS_LaGKAuHNR6PwfrXwNtu86ZYY132I-JXw66zjsg3F6G6EX1PG11--evc3jpHw6w47EH59RX7v-D8BAAD__9Jbn8Q">