tcprstat hangs with 100% cpu load

Bug #628175 reported by Uli Stärk
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tcprstat
Confirmed
High
Ignacio Nin

Bug Description

# uname -a
Linux hostname 2.6.18.xs4.0.1.900.5799 #2 SMP Mon Aug 13 13:56:47 UTC 2007 i686 GNU/Linux

I start tcprstat with the following command line:
./tcprstat-static -t 1 -n 0 -p 80

As long as no traffic is captured, everything works fine. But when I do a couple of clicks, the program hangs and uses 100% cpu time on one core.

timestamp count max min avg med stddev 95_max 95_avg 95_std 99_max 99_avg 99_std
1283356401 0 0 0 0 0 0 0 0 0 0 0 0
1283356402 0 0 0 0 0 0 0 0 0 0 0 0
1283356403 0 0 0 0 0 0 0 0 0 0 0 0
*hangs*

If you press CTRL+C a final line gets flushed - up to the stddev column (excluded):
1283356404 7 301574 546 44728 672

This is reproducable every time.

Revision history for this message
Uli Stärk (uli-staerk) wrote :
Changed in tcprstat:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Ignacio Nin (ignacio-nin)
Revision history for this message
wesam80 (wesamd) wrote :

Any solution plz?

Revision history for this message
Baron Schwartz (baron-xaprb) wrote : Re: [Bug 628175] Re: tcprstat hangs with 100% cpu load

I can reproduce this. I hope that someone can contribute a patch to
solve it, because it isn't affecting any of my customers so they
aren't interested in paying for a fix.

Revision history for this message
Alex Samorukov (samm-os2) wrote :

I found a bug. it hanging in sqrt function (endless loop), which is tricky and processor depended. I switched to the OS one and it works for me. Please try my patch.

Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

Great, thank you for finding the problem. I think it is a good idea
to use standard math.h functions when we can, so we should use your
patch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.