linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: Luis Rodriguez <Luis.Rodriguez@atheros.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: memory clobber in rx path, maybe related to ath9k.
Date: Fri, 15 Oct 2010 12:36:31 -0700	[thread overview]
Message-ID: <4CB8AD3F.50201@candelatech.com> (raw)
In-Reply-To: <AANLkTinhFj_iYjVzyfSfpUVdytfk4O9kCBnN8=Bwv0N7@mail.gmail.com>

On 10/15/2010 11:47 AM, Luis R. Rodriguez wrote:
> On Fri, Oct 15, 2010 at 9:51 AM, Ben Greear<greearb@candelatech.com>  wrote:
>> On 10/14/2010 04:48 PM, Luis R. Rodriguez wrote:
>>>
>>> On Thu, Oct 14, 2010 at 04:39:45PM -0700, Luis R. Rodriguez wrote:
>>>>
>>>> On Thu, Oct 14, 2010 at 4:30 PM, Ben Greear<greearb@candelatech.com>
>>>>   wrote:
>>>>>
>>>>> On 10/14/2010 04:19 PM, Luis R. Rodriguez wrote:
>>>>>>
>>>>>> Ok please try this patch, it cures it for me.
>>>>>
>>>>> Well, it got a lot further than normal, but it still
>>>>> hit the poison check after a few minutes.
>>>>>
>>>>> Current test case is my app loading 130 or so stations, each running
>>>>> wpa_supplicant.  All were created, and quite a few had associated
>>>>> when the poison check hit.
>>>>>
>>>>> So, it definitely looks like a step in the right direction, but
>>>>> not fully fixed yet.
>>>>>
>>>>> I'll do some more testing with this patch applied and using just my
>>>>> perl script to make sure the problem is reproducible outside of my
>>>>> application.
>>>>
>>>> Ok, whatever userspace does it should not corrupt to kernel, unless
>>>> its poking /dev/mem
>>>
>>> Can also try this one instead, it will prevent any other instances
>>> we would not have caught on stopping and starting RX here.
>>
>> It ran longer than before any of your locking patches (about 3 minutes), but
>> it did hit the poison check.
>>
>> Before it did, I had a bunch of OOM errors trying to allocate
>> skbs.  I have 2GB of RAM on this system, but maybe it's not tuned
>> properly, and not all of that can be used for networking on 32-bit
>> kernels....
>>
>> I have Felix's 3 ani patches from ~3 days ago applied, running 130 stations
>> in WPA mode.
>>
>> I'm going to try running fewer to dodge the OOM case,
>> but I have a few other things to take care of first.
>
> Thanks for testing. So now I cannot reproduce the poison anymore, any
> other ideas what I can try? Does the perl script still give you poison
> or just with your Über proprietary application?

I was just writing that my script wouldn't reproduce it..but it did before I
was done typing.  Same looking poison exception as ever.

I also notice my Trendnet AP is very un-happy with anything past around 30 STA
devices associated, and according to it's status page..NONE of my STAs are associated,
though things show up in /proc/net/wireless and I see auth/assoc messages in
/var/log/messages on my STA system, so the AP may just be funky.

On my system, most of the STAs are constantly trying to associate and being
rejected by the AP.

Here is updated script, creates 130 STAs and sleeps a bit between starting supplicants.
It assumes you have a single PHY device, and if you do, it will use it's name regardless
of how many times you reload the driver.

Please forgive the lameness in the MAC creation logic..though it does at least appear
to work :)

Thanks,
Ben


#!/usr/bin/perl

use strict;

my $iw = "./local/sbin/iw";
my $ip = "./local/sbin/ip";
my $wpa_s = "./local/bin/wpa_supplicant";
my $ssid = "candela-n";
my $key = "wpadmz123";

my $phy = `cat /sys/class/ieee80211/*/name`;
chomp($phy);
my $max = 130;
my $i;
my $j = 4;
my $k = 1;
my $bmac = "00:01:02:03:";
my $cmd;

# Create stations
for ($i = 0; $i<$max; $i++) {
   runCmd("$iw phy $phy interface add sta$i type station");
   if ($j > 99) {
     $j = 1;
     $k++;
   }
   my $mc5 = "$j";
   if (length($mc5) == 1) {
     $mc5 = "0$mc5"; # pad mac octet
   }
   my $mc4 = "$k";
   if (length($mc4) == 1) {
     $mc4 = "0$mc4"; # pad mac octet
   }
   $j++;

   my $mac = "$bmac$mc4:$mc5";
   runCmd("$ip link set sta$i address $mac");

   runCmd("$iw dev sta$i set power_save off");
}

# Bring them up with WPA
for ($i = 0; $i<$max; $i++) {
   open(FD, ">sta$i" . "_wpa.conf") || die("Couldn't open file: $!\n");
   print FD "
ctrl_interface=/var/run/wpa_supplicant
fast_reauth=1
#can_scan_one=1
network={
     ssid=\"$ssid\"
     proto=WPA
     key_mgmt=WPA-PSK
     psk=\"$key\"
     pairwise=TKIP CCMP
     group=TKIP CCMP
}
";
   runCmd("$wpa_s -B -i sta$i -c sta$i" . "_wpa.conf -P sta$i" . "_wpa.pid -t -f sta$i" . "_wpa.log");
   sleep(2);
}


sub runCmd {
   my $cmd = shift;
   print "$cmd\n";
   `$cmd`;
}



>
>    Luis
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2010-10-15 19:36 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 17:00 memory clobber in rx path, maybe related to ath9k Ben Greear
2010-10-05 17:16 ` Luis R. Rodriguez
2010-10-05 17:24   ` Ben Greear
2010-10-05 17:36     ` Luis R. Rodriguez
2010-10-05 17:38       ` Ben Greear
2010-10-05 17:43         ` Luis R. Rodriguez
2010-10-05 17:47           ` Ben Greear
2010-10-05 17:55             ` Luis R. Rodriguez
2010-10-05 18:14               ` Ben Greear
2010-10-05 21:12                 ` Ben Greear
2010-10-07 17:33                 ` Ben Greear
2010-10-07 18:14                   ` Johannes Berg
2010-10-07 18:29                     ` Luis R. Rodriguez
2010-10-07 18:39                       ` Ben Greear
2010-10-07 18:42                         ` Luis R. Rodriguez
2010-10-07 18:45                           ` Ben Greear
2010-10-07 19:14                             ` Ben Greear
2010-10-07 19:17                               ` Johannes Berg
2010-10-07 19:22                           ` Ben Greear
2010-10-07 19:27                             ` Johannes Berg
2010-10-07 21:31                               ` Luis R. Rodriguez
2010-10-07 21:36                                 ` Luis R. Rodriguez
2010-10-07 21:59                                   ` Luis R. Rodriguez
2010-10-11 20:51                                     ` Ben Greear
2010-10-12  1:03                                       ` Luis R. Rodriguez
2010-10-12  3:27                                         ` Ben Greear
2010-10-12  6:10                                           ` Luis R. Rodriguez
2010-10-12 18:35                                             ` Ben Greear
2010-10-12 18:40                                               ` Luis R. Rodriguez
2010-10-12 18:43                                                 ` Ben Greear
2010-10-12 19:51                                                   ` Ben Greear
2010-10-13 17:12                                                 ` Ben Greear
2010-10-13 17:29                                                   ` Luis R. Rodriguez
2010-10-13 17:48                                                     ` Ben Greear
2010-10-14 21:25                                                       ` Luis R. Rodriguez
2010-10-14 21:31                                                         ` Ben Greear
2010-10-14 21:32                                                           ` Luis R. Rodriguez
2010-10-14 21:39                                                             ` Ben Greear
2010-10-14 21:45                                                       ` Johannes Berg
2010-10-14 21:47                                                         ` Ben Greear
2010-10-13  5:31                                               ` Vasanthakumar Thiagarajan
2010-10-13 16:39                                                 ` Ben Greear
2010-10-13 19:56                                                   ` Björn Smedman
2010-10-13 20:03                                                     ` Luis R. Rodriguez
2010-10-14 19:15                                                       ` Ben Greear
2010-10-14 19:17                                                         ` Luis R. Rodriguez
2010-10-14 21:52                                                     ` Björn Smedman
2010-10-14 22:05                                                       ` Ben Greear
2010-10-14 22:16                                                         ` Luis R. Rodriguez
2010-10-14 22:29                                                           ` Luis R. Rodriguez
2010-10-14 22:35                                                             ` Luis R. Rodriguez
2010-10-14 22:44                                                               ` Ben Greear
2010-10-14 22:54                                                                 ` Luis R. Rodriguez
2010-10-14 22:51                                                               ` Luis R. Rodriguez
2010-10-14 23:19                                                                 ` Luis R. Rodriguez
2010-10-14 23:30                                                                   ` Ben Greear
2010-10-14 23:39                                                                     ` Luis R. Rodriguez
2010-10-14 23:48                                                                       ` Luis R. Rodriguez
2010-10-15 16:51                                                                         ` Ben Greear
2010-10-15 18:47                                                                           ` Luis R. Rodriguez
2010-10-15 19:36                                                                             ` Ben Greear [this message]
2010-10-15 21:07                                                                               ` Luis R. Rodriguez
2010-10-15 23:21                                                                                 ` Luis R. Rodriguez
2010-10-15 23:33                                                                                   ` Ben Greear
2010-10-15 23:38                                                                                     ` Luis R. Rodriguez
2010-10-15 23:41                                                                                       ` Luis R. Rodriguez
2010-10-16  0:07                                                                                         ` Ben Greear
2010-10-15 23:42                                                                                       ` Ben Greear
2010-10-15 23:57                                                                                         ` Luis R. Rodriguez
2010-10-17 19:44                                                                                           ` Ben Greear
2010-10-18 22:46                                                                                             ` Luis R. Rodriguez
2010-10-15 23:39                                                                                     ` Ben Greear
2010-10-14 23:51                                                                       ` Ben Greear
2010-10-14 22:47                                                       ` Ben Greear
2010-10-14 23:46                                                         ` Björn Smedman
2010-10-18 13:48                                                           ` Björn Smedman
2010-10-18 17:24                                                             ` Luis R. Rodriguez
2010-10-18 22:34                                                               ` Björn Smedman
2010-10-18 22:41                                                                 ` Luis R. Rodriguez
2010-10-14  5:37                                                   ` Vasanthakumar Thiagarajan
2010-10-07 21:52                                 ` Ben Greear
2010-10-08  0:42                               ` Bruno Randolf
2010-10-08  2:30                                 ` Ben Greear
2010-10-05 17:22 ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB8AD3F.50201@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=Luis.Rodriguez@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).