Last Comment Bug 737376 - Wifi: Shut down the wifi workers cleanly
: Wifi: Shut down the wifi workers cleanly
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla14
Assigned To: Blake Kaplan (:mrbkap) (please use needinfo!)
:
Mentors:
Depends on:
Blocks: b2g-wifi 737368
  Show dependency treegraph
 
Reported: 2012-03-20 03:57 PDT by Blake Kaplan (:mrbkap) (please use needinfo!)
Modified: 2012-03-21 10:24 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Possible fix (1.17 KB, patch)
2012-03-20 06:58 PDT, Blake Kaplan (:mrbkap) (please use needinfo!)
cjones.bugs: review+
Details | Diff | Review

Description Blake Kaplan (:mrbkap) (please use needinfo!) 2012-03-20 03:57:52 PDT
cjones found me on IRC today and mentioned that currently B2G doesn't shut down cleanly because during shutdown, workers try to join all of the threads, but wifi has a thread stuck waiting for messages from wpa_supplicant.
Comment 1 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-03-20 06:58:09 PDT
Created attachment 607531 [details] [diff] [review]
Possible fix

Chris, I haven't been able to reproduce the shutdown hang, but this *should* fix it. Can you let me know if this helps?
Comment 2 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-20 10:49:55 PDT
Comment on attachment 607531 [details] [diff] [review]
Possible fix

I'll give this a shot, but not confident it'll solve the problem in general.
Comment 3 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-03-20 11:11:53 PDT
Oh, I should have mentioned. The shutdown method added to nsIWifi and called here (but seemingly not added in the patch) already existed in WifiWorker.js and it calls WifiManager.setEnabled(false). This has the effect of telling the wpa_supplicant to shut down, unblocking the shutdown process.
Comment 4 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-20 11:26:13 PDT
Comment on attachment 607531 [details] [diff] [review]
Possible fix

WFM!
Comment 5 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-03-21 10:24:45 PDT
https://hg.mozilla.org/mozilla-central/rev/6e9a8454ccae

Note You need to log in before you can comment on or make changes to this bug.