From: Daniel Blueman <hidden> Date: 2003-10-30 16:10:41
With the LARTC 'wondershaper' HTB script [1] for good latency over ADSL, I
get an oops [3] when sending traffic via ppp0 (and when bringing the interface
down).
Kernel is 2.6.0-test9 and 'debug 3333333' appended to the 'tc' command, to
show HTB debug information [2] (not shown in [1]).
Please CC me when replying, and I can provide further details, debugging,
testing etc...this problem has been around for a while it seems.
--- [1] (relevant lines from http://lartc.org/wondershaper/)
tc qdisc add dev ppp0 root handle 1: htb default 20
tc class add dev ppp0 parent 1: classid 1:1 htb rate 210kbit burst 6k
tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 210kbit burst 6k prio
1
tc class add dev ppp0 parent 1:1 classid 1:20 htb rate 189kbit burst 6k prio
2
tc class add dev ppp0 parent 1:1 classid 1:30 htb rate 168kbit burst 6k prio
2
Hi,
thanks for the report. I know that there is an issue regarding
HTB in 2.6.x. Please send me net/sched/sch_htb.o,
net/sched/sch_htb.c (just to be sure) and be sure that you
build the kernel with debugging symbols (see debugging section
of menuconfig/xconfig).
thanks,
-------------------------------
Martin Devera aka devik
Linux kernel QoS/HTB maintainer
http://luxik.cdi.cz/~devik/
On Thu, 30 Oct 2003, Daniel Blueman wrote:
quoted hunk
With the LARTC 'wondershaper' HTB script [1] for good latency over ADSL, I
get an oops [3] when sending traffic via ppp0 (and when bringing the interface
down).
Kernel is 2.6.0-test9 and 'debug 3333333' appended to the 'tc' command, to
show HTB debug information [2] (not shown in [1]).
Please CC me when replying, and I can provide further details, debugging,
testing etc...this problem has been around for a while it seems.
--- [1] (relevant lines from http://lartc.org/wondershaper/)
tc qdisc add dev ppp0 root handle 1: htb default 20
tc class add dev ppp0 parent 1: classid 1:1 htb rate 210kbit burst 6k
tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 210kbit burst 6k prio
1
tc class add dev ppp0 parent 1:1 classid 1:20 htb rate 189kbit burst 6k prio
2
tc class add dev ppp0 parent 1:1 classid 1:30 htb rate 168kbit burst 6k prio
2
From: David S. Miller <hidden> Date: 2003-10-30 21:16:15
On Thu, 30 Oct 2003 20:50:16 +0100 (CET)
devik [off-list ref] wrote:
thanks for the report. I know that there is an issue regarding
HTB in 2.6.x. Please send me net/sched/sch_htb.o,
net/sched/sch_htb.c (just to be sure) and be sure that you
build the kernel with debugging symbols (see debugging section
of menuconfig/xconfig).
I think the problem is the changes that were made
in 2.5.x to htb_next_rb_node(). It used to be:
static void htb_next_rb_node(rb_node_t **n)
{
rb_node_t *p;
if ((*n)->rb_right) {
/* child at right. use it or its leftmost ancestor */
*n = (*n)->rb_right;
while ((*n)->rb_left)
*n = (*n)->rb_left;
return;
}
while ((p = (*n)->rb_parent) != NULL) {
/* if we've arrived from left child then we have next node */
if (p->rb_left == *n) break;
*n = p;
}
*n = p;
}
But it was changed into:
static void htb_next_rb_node(struct rb_node **n)
{
*n = rb_next(*n);
}
This is wrong, the new code has much different side effects
than the original code.
This looks like the problem, devik what do you think?
Hmm - I have to look at 2.6's definition of rb_next. It
might be the case ! I'll check it.
Thanks, devik
On Thu, 30 Oct 2003, David S. Miller wrote:
On Thu, 30 Oct 2003 20:50:16 +0100 (CET)
devik [off-list ref] wrote:
quoted
thanks for the report. I know that there is an issue regarding
HTB in 2.6.x. Please send me net/sched/sch_htb.o,
net/sched/sch_htb.c (just to be sure) and be sure that you
build the kernel with debugging symbols (see debugging section
of menuconfig/xconfig).
I think the problem is the changes that were made
in 2.5.x to htb_next_rb_node(). It used to be:
static void htb_next_rb_node(rb_node_t **n)
{
rb_node_t *p;
if ((*n)->rb_right) {
/* child at right. use it or its leftmost ancestor */
*n = (*n)->rb_right;
while ((*n)->rb_left)
*n = (*n)->rb_left;
return;
}
while ((p = (*n)->rb_parent) != NULL) {
/* if we've arrived from left child then we have next node */
if (p->rb_left == *n) break;
*n = p;
}
*n = p;
}
But it was changed into:
static void htb_next_rb_node(struct rb_node **n)
{
*n = rb_next(*n);
}
This is wrong, the new code has much different side effects
than the original code.
This looks like the problem, devik what do you think?
On Thu, 30 Oct 2003 20:50:16 +0100 (CET)
devik [off-list ref] wrote:
quoted
thanks for the report. I know that there is an issue regarding
HTB in 2.6.x. Please send me net/sched/sch_htb.o,
net/sched/sch_htb.c (just to be sure) and be sure that you
build the kernel with debugging symbols (see debugging section
of menuconfig/xconfig).
I think the problem is the changes that were made
in 2.5.x to htb_next_rb_node(). It used to be:
static void htb_next_rb_node(rb_node_t **n)
{
rb_node_t *p;
if ((*n)->rb_right) {
/* child at right. use it or its leftmost ancestor */
*n = (*n)->rb_right;
while ((*n)->rb_left)
*n = (*n)->rb_left;
return;
}
while ((p = (*n)->rb_parent) != NULL) {
/* if we've arrived from left child then we have next node
*/
if (p->rb_left == *n) break;
*n = p;
}
*n = p;
}
But it was changed into:
static void htb_next_rb_node(struct rb_node **n)
{
*n = rb_next(*n);
}
This is wrong, the new code has much different side effects
than the original code.
This looks like the problem, devik what do you think?
--
Daniel J Blueman
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++
Hello Dave,
I discovered reason of the first Daniel's OOPS. It is change
which was not forward-ported to 2.6.
It is attached. However other Daniel's oops (pppd detach
related) is of unknown reason yet. I tried to duplicate all
conditions but pppoe (have no pppoe device here) and I was able
to kill pppd with htb under full load with no problem.
I'll look into it again today.
-------------------------------
Martin Devera aka devik
Linux kernel QoS/HTB maintainer
http://luxik.cdi.cz/~devik/
Hello Dave,
I just spotted the second bug too. (For those interested it is described
in the patch).
Please revert the small patch I sent you yesterday before applying the
new one. It contains yesterday's one too (it is because it is for 2.4 too).
Please apply it against both 2.4.23 and 2.6.0-test10. It should apply
cleanly in 2.4.23 case and with some offsets to 2.6.0-test10.
Patch comments:
- Fixed oops in debugging of enqueue/requeue.
- Fixed oops in htb_destroy.
Note that I tested 2.6 only because I'm still downloading 2.4.22 patch
on my slow line. I just wanted to sent the patch ASAP. I'll inform you
about result later but I expect no problems.
-------------------------------
Martin Devera aka devik
Linux kernel QoS/HTB maintainer
http://luxik.cdi.cz/~devik/
On Sat, 6 Dec 2003, David S. Miller wrote:
On Sat, 6 Dec 2003 15:18:37 +0100 (CET)
devik [off-list ref] wrote:
quoted
I discovered reason of the first Daniel's OOPS. It is change
which was not forward-ported to 2.6.
It is attached.
Thanks a lot for tracking this problem down Devik.
Patch applied, thanks again.
From: David S. Miller <hidden> Date: 2003-12-07 23:29:31
On Sun, 7 Dec 2003 12:30:20 +0100 (CET)
devik [off-list ref] wrote:
I just spotted the second bug too. (For those interested it is described
in the patch).
Please revert the small patch I sent you yesterday before applying the
new one. It contains yesterday's one too (it is because it is for 2.4 too).
Please apply it against both 2.4.23 and 2.6.0-test10. It should apply
cleanly in 2.4.23 case and with some offsets to 2.6.0-test10.