Here goes:
May 16 21:56:39|14629|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14630|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14631|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14632|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14633|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14634|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14635|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14636|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14637|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14638|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14639|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14640|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14641|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14642|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14643|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14644|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c
May 16 21:56:39|14645|poll_loop|DBG|0-ms timeout: 0x805bac1(bridge_wait)
0x8063da9(main) 0xb7470e9c


On Wed, Aug 25, 2010 at 5:03 PM, Ben Pfaff <b...@nicira.com> wrote:

> On Wed, Aug 25, 2010 at 01:03:16PM -0700, Ben Pfaff wrote:
> > On Wed, Aug 25, 2010 at 02:53:05PM -0300, Luiz Henrique Ozaki wrote:
> > > I'm trying to create a bond interface with OpenvSwitch in a XenServer
> 5.6
> > > and I'm getting a high load CPU for the ovs-vswitchd, but It's working
> > > apparently.
> >
> > Hi Luiz.  This shouldn't happen.
> >
> > When the vswitch is in this high-CPU consumption state, please turn on
> > poll_loop debugging with "ovs-appctl vlog/set poll_loop".  This should
> > output a bunch of extra DBG messages for the poll_loop module to the
> > log.  Then please run the log through the ovs-backtrace script that I'm
> > appending, supplying a binary with debug symbols as its argument and the
> > log as the input, and pass along the output.  This will probably help to
> > identify the problem.
>
> Here's the script:
>
> #! /usr/bin/perl -w
>
> use strict;
>
> # Check command line.
> if (grep ($_ eq '-h' || $_ eq '--help', @ARGV)) {
>    print <<'EOF';
> backtrace, for converting raw addresses into symbolic backtraces
> usage: $0 BINARY... < LOG
>       $0 BINARY... ADDRESS...
> where BINARY is the binary file or files from which to obtain symbols
>  and ADDRESS is an address to translate (beginning with "0x")
>   or LOG contains addresses to translate.
>
> At least one BINARY must be specified.
> EOF
>    exit 0;
> }
> die "backtrace: at least one argument required (use --help for help)\n"
>    if @ARGV == 0;
>
> # Find binaries.
> our @binaries;
> my @addresses;
> for my $arg (@ARGV) {
>    if (-e $arg) {
>        push(@binaries, $arg);
>    } elsif ($arg =~ /^(0x)?[0-9a-fA-F]+/) {
>        push(@addresses, $arg);
>    } else {
>        die "backtrace: $arg: not found (use --help for help)\n";
>    }
> }
> if (!...@binaries) {
>    die "backtrace: no binary specified (use --help for help)\n";
> }
>
> # Find addr2line.
> my ($a2l) = search_path ("i386-elf-addr2line") || search_path
> ("addr2line");
> if (!$a2l) {
>    die "backtrace: neither `i386-elf-addr2line' nor `addr2line' in PATH\n";
> }
> sub search_path {
>    my ($target) = @_;
>    for my $dir (split (':', $ENV{PATH})) {
>        my ($file) = "$dir/$target";
>        return $file if -e $file;
>    }
>    return undef;
> }
>
> our %cache;
> sub translate {
>    my ($address) = @_;
>
>    if (defined($cache{$address})) {
>        return %{$cache{$address}};
>    }
>
>    my %translation;
>    for my $bin (@binaries) {
>
>        my ($function, $line);
>        open(A2L, "$a2l -fsie $bin $address|");
>        chomp($function = <A2L>);
>        chomp($line = <A2L>);
>        close(A2L);
>
>        if ($function ne '??' || $line ne '??:0') {
>            $translation{FUNCTION} = $function;
>            $translation{LINE} = $line;
>            $translation{BINARY} = $bin;
>            last;
>        }
>    }
>    $cache{$address} = \%translation;
>
>    return %translation;
> }
>
> if (@addresses) {
>    # Print backtrace.
>    my ($cur_binary);
>    for my $addr (@addresses) {
>        my %loc = translate($addr);
>        if (defined ($loc{BINARY})
>            && @binaries > 1
>            && (!defined ($cur_binary) || $loc{BINARY} ne $cur_binary)) {
>            $cur_binary = $loc{BINARY};
>            print "In $cur_binary:\n";
>        }
>
>        $addr = sprintf ("0x%08x", hex ($addr)) if $addr =~
> /^0x[0-9a-f]+$/i;
>
>        print $addr, ": ";
>        if (defined ($loc{BINARY})) {
>            my ($function) = $loc{FUNCTION};
>            my ($line) = $loc{LINE};
>            $line =~ s/^(\.\.\/)*//;
>            $line = "..." . substr ($line, -25) if length ($line) > 28;
>            print "$function ($line)";
>        } else {
>            print "(unknown)";
>        }
>        print "\n";
>    }
>    exit(0);
> }
>
> sub translate_address {
>    my ($address) = @_;
>    my %loc = translate($address);
>    my ($s) = $address;
>    if (defined($loc{BINARY})) {
>        $s .= "($loc{FUNCTION})" if $loc{FUNCTION} ne '??';
>        $s .= "($loc{LINE})" if $loc{LINE} ne '??:0';
>    }
>    return $s;
> }
>
> while (<STDIN>) {
>    chomp;
>    if (/poll_loop.*0x|backtrace/) {
>        s/(0x[0-9a-fA-F]+)/translate_address($1)/ge;
>    }
>    print "$_\n";
> }
>



-- 
[]'s
Luiz Henrique Ozaki
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

Reply via email to