[LARTC] [HTB] htb_dequeue_tree assertion (kernel 2.4.21-ac4)
devik
devik@cdi.cz
Sun, 20 Jul 2003 09:28:08 +0200 (CEST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--8323328-358986553-1058686088=:18108
Content-Type: TEXT/PLAIN; charset=US-ASCII
> > If you read comment above htb_dequeue_tree, it should be called
> > only when it is sure that there are packets inside of the level/prio.
> > It is known by other HTB mechanism (per-level activity lists).
> >
> > Thus the bugtrap is to catch case where class was inserted
> > into activity list because it had packets in its sub-qdisc
> > but when we actually decide to dequeue - it has no packet.
> > It is weird - can qdisc lose packets even when dequeue was
> > not called ??
>
> If you change the depth of the leave queue then it is possible to drop
> packets or if you completely exchange the queue. Which would also
> explain why the assertion only occurs when the configuration is altered.
Well, I agree that there is something wrong. Now it is neccessary to
find scenario where it does happen so that it is fixed in right way.
I have not much time these days to test these cases but your informations
would lead to following hypothesis:
Classe's child qdisc is replaced while old one still has nonzero queue.
New empty qdisc is grafted under class instead. What about attached
patch (it is against my latest version so you can see offset warnings) ?
devik
--8323328-358986553-1058686088=:18108
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="xhtb.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0307200928080.18108@devix>
Content-Description:
Content-Disposition: attachment; filename="xhtb.diff"
LS0tIHNjaF9odGIuYwkyMDAzLzA3LzA1IDEwOjM3OjExCTEuMjENCisrKyBz
Y2hfaHRiLmMJMjAwMy8wNy8yMCAwNzoyNDo1OQ0KQEAgLTEyODYsNiArMTI4
NiwxMCBAQCBzdGF0aWMgaW50IGh0Yl9ncmFmdChzdHJ1Y3QgUWRpc2MgKnNj
aCwgDQogCQkJCQlyZXR1cm4gLUVOT0JVRlM7DQogCQlzY2hfdHJlZV9sb2Nr
KHNjaCk7DQogCQlpZiAoKCpvbGQgPSB4Y2hnKCZjbC0+dW4ubGVhZi5xLCBu
ZXcpKSAhPSBOVUxMKSB7DQorCQkJLyogVE9ETzogdGVzdCBpdCAqLw0KKwkJ
CWlmIChjbC0+cHJpb19hY3Rpdml0eSkNCisJCQkJaHRiX2RlYWN0aXZhdGUg
KChzdHJ1Y3QgaHRiX3NjaGVkKilzY2gtPmRhdGEsY2wpOw0KKw0KIAkJCS8q
IFRPRE86IGlzIGl0IGNvcnJlY3QgPyBXaHkgQ0JRIGRvZXNuJ3QgZG8gaXQg
PyAqLw0KIAkJCXNjaC0+cS5xbGVuIC09ICgqb2xkKS0+cS5xbGVuOwkNCiAJ
CQlxZGlzY19yZXNldCgqb2xkKTsNCg==
--8323328-358986553-1058686088=:18108--