Description of problem:
trickle -u 10 -d 20 `which spicec` -h localhost -p 9011
Becomes unresponsive. This doesn't happen if I raise the download limit enough (500+). Attaching with gdb shows being in an infinite loop inside a recv call on bwstat_delay. The attached patch to the package includes a simple patch to fix it. I've tested it with the above command and while it solves it, I get occational crashes so not sure if it is the right approach, but the crashes seem to be unrelated, and only happened when using gnome-shell (not sure how that relates, but possibly gnome-shell is causing a refresh of spice client that is causing it to try a recv - don't know).
Version-Release number of selected component (if applicable):
50% with the command line below (1/2), 100% with a win7 vm running qxl driver.
Steps to Reproduce:
1. start spice server (qemu-kvm -spice disable-ticketing,port=9011)
2. trickle -u 10 -d 20 `which spicec` -h localhost -p 9011
program gets stuck, no keyboard interaction possible. attaching shows stuck in
/usr/src/debug/trickle-1.07/bwstat.c in the loop starting at line 189.
work normally (window appears with bios, can do Ctrl+B, press tab, play with the command line of PXE)
Following patch (to the fedora trickle package, includes the patch to trickle 1.07, tested on Fedora 16) fixes the problem:
Author: Alon Levy <firstname.lastname@example.org>
Date: Thu Sep 15 18:08:55 2011 +0300
1.07-12 fix endless loop (local patch)
diff --git a/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch b/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch
new file mode 100644
@@ -0,0 +1,25 @@
+From 3b22c327ff6ac3ee51332919e91ae63d47225a9b Mon Sep 17 00:00:00 2001
+From: Alon Levy <email@example.com>
+Date: Thu, 15 Sep 2011 18:05:13 +0300
+Subject: [PATCH] bwsta_getdelay: stop if no packets
+ bwstat.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+diff --git a/bwstat.c b/bwstat.c
+index a1c1085..9567275 100644
+@@ -210,7 +210,7 @@ bwstat_getdelay(struct bwstat *bs, size_t *len, uint lim, short which)
+ ent += xent;
+- } while (pool > 0 && ncli > 0);
++ } while (pool > 0 && ncli > 0 && (TAILQ_FIRST(&poolq) != TAILQ_END(&poolq)));
+ * This is the case of a client that is not using its limit.
diff --git a/trickle.spec b/trickle.spec
index 1e883aa..530b9f1 100644
@@ -1,6 +1,6 @@
Summary: Portable lightweight userspace bandwidth shaper
@@ -15,6 +15,7 @@ BuildRequires: libevent-devel
trickle is a portable lightweight userspace bandwidth shaper.
@@ -33,6 +34,7 @@ trickle runs entirely in userspace and does not require root privileges.
%patch0 -p1 -b .include_netdb
%patch1 -p1 -b .libdir
%patch2 -p1 -b .cve
touch -r configure aclocal.m4 Makefile.in stamp-h.in
iconv -f ISO88591 -t UTF8 < README > README.UTF8
@@ -71,6 +73,8 @@ rm -rf $RPM_BUILD_ROOT
+* Thu Sep 15 2011 Alon Levy <firstname.lastname@example.org> 1.07-12
+- Fix endless loop in bwstat_delay (seen with spicec)
* Sun Feb 13 2011 Nicoleau Fabien <email@example.com> 1.07-11
- Revert to the working patch
* Wed Feb 09 2011 Fedora Release Engineering <firstname.lastname@example.org> - 1.07-10
thank you for the report, and the patch.
But I don't really understand how to apply this. I tried to copy in a file, then applied it. But when I build, the patch doesn't work.
Can you simply provide the bwsta_getdelay-stop-if-no-packets.patch ?
Created attachment 523795 [details]
bwstat_getdelay exit while loop if no packets
trickle-1.07-12.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing trickle-1.07-12.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
trickle-1.07-12.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.