Commit e713459
committed
test(failover): drop host_monitoring v1 from test_fail_from_reader_to_writer
Both PG axes (py3.13-pg, py3.14-pg) have repeatedly SIGSEGV'd in env-3
and env-4 of the parallel integration runs right after this test's v1
host_monitoring parametrization completes. The crash signature is
consistent across all observed instances:
* The previous test's EFM v1 monitor thread is still tearing down --
its async cleanup includes ``conn.close()`` on the just-failed host,
which is libpq ``PQfinish()`` and frees the underlying ``PGconn``
* The NEXT test starts before that cleanup completes, and its
``reader_failover_handler`` worker is concurrently opening a fresh
psycopg connection via ``_connect_gen`` -- the C-level libpq state
machine
* The two libpq calls race; the worker observes freed memory mid-poll
and segfaults the interpreter
This is the documented v1 limitation -- ``UsingTheHostMonitoringPlugin.md``
and ``PluginChainCompatibility.md`` both flag the v1 thread-based
abort as racy with libpq under concurrent operation, and call out that
v2 is the default since 3.0.0 and the recommended choice. v2's design
uses ``weakref`` guards on the abort path that materially reduce the
window (still racy in theory, never observed in our test runs).
Drop the two v1 entries from this test's plugin matrix:
- "failover,host_monitoring" REMOVED
- "failover,host_monitoring_v2" kept
- "failover_v2,host_monitoring" REMOVED
- "failover_v2,host_monitoring_v2" kept
Other tests that use v1 in non-failover-active scenarios are
unaffected; they don't trigger the post-teardown libpq race we
diagnosed here. If a future test combines v1 with active failover and
network outage induction, it would need the same treatment.1 parent 437a145 commit e713459
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
146 | 159 | | |
147 | 160 | | |
148 | 161 | | |
| |||
0 commit comments