watcher silently fails when receiving huge data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
etcd3gw |
Fix Released
|
Medium
|
Gregory Thiemonge | ||
python-etcd3gw (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Deferred
|
Medium
|
Unassigned | ||
Noble |
Deferred
|
Medium
|
Unassigned | ||
Oracular |
Deferred
|
Medium
|
Unassigned |
Bug Description
Bug detected while testing octavia/taskflow with etcd3gw.
When using a watcher, if a huge payload is inserted in etcd, the watcher reads it and then fails silently, it no longer receives any data after that.
Reproducer:
======
from concurrent.futures import ThreadPoolExecutor
import time
from etcd3gw.client import Etcd3Client
def watcher_
watcher, watcher_cancel = client.
for event in watcher:
with ThreadPoolExecu
client = Etcd3Client(
future = executor.
client.
time.sleep(1)
client.
time.sleep(1)
client.
======
when executing the reproducer print(event) displays only the 2 first events.
The issue is in the _watch function (https:/
then json.loads("\n") triggers an exception
When adding a try/except block:
Traceback (most recent call last):
File "/home/
payload = json.loads(
File "/usr/lib64/
return _default_
File "/usr/lib64/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/
raise JSONDecodeError
json.decoder.
Changed in python-etcd3gw: | |
importance: | Undecided → High |
assignee: | nobody → Gregory Thiemonge (gthiemonge) |
importance: | High → Medium |
Changed in python-etcd3gw (Ubuntu): | |
status: | New → Fix Released |
Changed in python-etcd3gw (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in python-etcd3gw (Ubuntu Oracular): | |
importance: | Undecided → Medium |
Changed in python-etcd3gw (Ubuntu Jammy): | |
assignee: | nobody → Wesley Hershberger (whershberger) |
Changed in python-etcd3gw (Ubuntu Noble): | |
importance: | Undecided → Medium |
assignee: | nobody → Wesley Hershberger (whershberger) |
Changed in python-etcd3gw (Ubuntu Oracular): | |
assignee: | nobody → Wesley Hershberger (whershberger) |
Changed in python-etcd3gw (Ubuntu Noble): | |
status: | New → In Progress |
Changed in python-etcd3gw (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in python-etcd3gw (Ubuntu Oracular): | |
status: | New → In Progress |
Changed in python-etcd3gw (Ubuntu Jammy): | |
assignee: | Wesley Hershberger (whershberger) → nobody |
Changed in python-etcd3gw (Ubuntu Oracular): | |
assignee: | Wesley Hershberger (whershberger) → nobody |
status: | In Progress → Deferred |
Changed in python-etcd3gw (Ubuntu Noble): | |
status: | In Progress → Deferred |
Changed in python-etcd3gw (Ubuntu Jammy): | |
status: | In Progress → Deferred |
Changed in python-etcd3gw (Ubuntu Noble): | |
assignee: | Wesley Hershberger (whershberger) → nobody |
$ /opt/stack/bin/etcd --version com/golang/ protobuf/ protoc- gen-go/ generator" is deprecated.
WARNING: Package "github.
A future release of golang/protobuf will delete this package,
which has long been excluded from the compatibility promise.
etcd Version: 3.4.27
Git SHA: c92fb80f3
Go Version: go1.19.10
Go OS/Arch: linux/amd64