WiFiドライバをロードすると、システム全体が不安定になる可能性があります。デバッグするには?

WiFiドライバをロードすると、システム全体が不安定になる可能性があります。デバッグするには?

私はLinuxカーネルの専門家ではありませんが、この新しいラップトップを購入しましたが、WiFi(RT3290LE)は機能しません。さまざまなソースから解決策を試しましたが、うまくいきません。だからそれを見つけることは私次第です。私は以前カーネルコードをデバッグしたことがありません。だからそれはすべてです。

私はカーネル4.3.3-2-ARCHを使用してArch Linuxを実行しています。モジュールをロードするとき(次からロードします。)尿素尿の割合またはUbuntuに尋ねる)、以下はdmesgに表示される最初の行です。

[   40.077355] rt3290sta: module license 'unspecified' taints kernel.
[   40.077359] Disabling lock debugging due to kernel taint
[   40.079739] register rt2860

最初の2行は単なる警告ですが、なぜrt2860を「登録」するのかを知りたいのです。次の数行:

[   40.079912] 

               === pAd = ffffc90001c61000, size = 583104 ===

[   40.079922] <-- RTMPAllocTxRxRingMemory, Status=0
[   40.079958] <-- RTMPAllocAdapterBlock, Status=0

RTMPAllocTxRxRingMemoryこのモジュールに対して関数とが定義RTMPAllocAdapterBlockされているため、rt2860モジュールがロードされていることを示します。chipssrcディレクトリに.txtファイルというディレクトリがあるため、このモジュールは私の3290LEチップも処理できると推測されますrt3290.c。そこから次まですべてが大丈夫に見えます。

[   40.079960] pAd->CSRBaseAddress =0xffffc90001400000, csr_addr=0xffffc90001400000!
[   40.079963] device_id =0x3290
[   40.079970] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0x0
[   40.079978] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000522
[   40.079979] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   40.080127] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   40.080138] NVM is EFUSE
[   40.082604] rt2860 0000:09:00.0 enp9s0f0: renamed from ra0
[   40.103558] NetworkManager[332]: segfault at 8 ip 00000000004ca126 sp 00007ffca7ec45c8 error 4 in NetworkManager[400000+1c5000]

NetworkManagerに分割エラーが報告されました。その時点から、すべてが間違っているように見えました。

[   62.254256] IPv6: ADDRCONF(NETDEV_UP): enp9s0f0: link is not ready
[   62.254302] MACVersion=0x32900015
[   62.254304] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.254306] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000523
[   62.254307] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.254315] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.254322] PllCtrl:0x26c5555
[   62.255651] RX DESC ffff880085128000  size = 2048
[   62.255818] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.255819] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.255820] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.255821] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.255822] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.255823] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.255824] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.255825] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.255826] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.255827] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.255828] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.255829] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.255830] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.257657] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.260034] no file read method
[   62.260037] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.260039] 1. Phy Mode = 0
[   62.260040] 2. Phy Mode = 0
[   62.260044] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.261283] 3. Phy Mode = 0
[   62.261484] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.300528] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.300529] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.303602] RTMPSetPhyMode: channel is out of range, use first channel=1 
[   62.303604] MCS Set = 00 00 00 00 00
[   62.303608] <==== rt28xx_init, Status=0
[   62.303663] 0x1300 = 00073200
[   62.303664] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.348650] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000533
[   62.348653] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000523
[   62.348654] Set INT_MASK_CSR = 0
[   62.348658] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.348661] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.355767] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000520
[   62.355775] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000520
[   62.355775] Set INT_MASK_CSR = 0
[   62.355804] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.355806] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.358438] MACVersion=0x32900015
[   62.358441] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000520
[   62.358447] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000520
[   62.358448] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.358585] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.358592] PllCtrl:0x2695555
[   62.359939] RX DESC ffff880085128000  size = 2048
[   62.360119] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.360120] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.360121] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.360122] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.360123] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.360124] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.360125] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.360126] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.360126] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.360127] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.360128] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.360129] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.360131] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.361957] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.362678] no file read method
[   62.362679] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.362680] 1. Phy Mode = 0
[   62.362680] 2. Phy Mode = 0
[   62.362684] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.363940] 3. Phy Mode = 0
[   62.364137] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.382877] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.382878] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.385928] MCS Set = 00 00 00 00 00
[   62.385932] <==== rt28xx_init, Status=0
[   62.385987] 0x1300 = 00073200
[   62.385988] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.430888] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000533
[   62.430891] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000523
[   62.430892] Set INT_MASK_CSR = 0
[   62.430896] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.430899] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.437938] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000520
[   62.437944] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000520
[   62.437945] Set INT_MASK_CSR = 0
[   62.437972] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.437975] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.440460] MACVersion=0x32900015
[   62.440463] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000520
[   62.440470] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000520
[   62.440471] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.440606] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.440614] PllCtrl:0x2695555
[   62.441942] RX DESC ffff880085128000  size = 2048
[   62.442166] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.442168] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.442169] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.442170] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.442171] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.442172] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.442173] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.442174] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.442175] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.442176] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.442177] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.442178] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.442179] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.444027] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.444745] no file read method
[   62.444746] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.444747] 1. Phy Mode = 0
[   62.444748] 2. Phy Mode = 0
[   62.444752] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.445990] 3. Phy Mode = 0
[   62.446190] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.464934] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.464935] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.467992] MCS Set = 00 00 00 00 00
[   62.467996] <==== rt28xx_init, Status=0
[   62.468051] 0x1300 = 00073200
[   62.468052] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.514023] IPv6: ADDRCONF(NETDEV_UP): enp8s0: link is not ready
[   62.524133] BUG: unable to handle kernel paging request at 00007ffcc2728510
[   62.524182] IP: [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.524236] PGD 95a1a067 PUD 959a5067 PMD 95a20067 PTE 800000008e8c3067
[   62.524282] Oops: 0001 [#1] PREEMPT SMP 
[   62.524311] Modules linked in: cfg80211 rt3290sta(PO) fuse snd_hda_codec_hdmi joydev mousedev intel_rapl iosf_mbi x86_pkg_temp_thermal nls_iso8859_1 intel_powerclamp nls_cp437 coretemp hp_wmi sparse_keymap uvcvideo rfkill videobuf2_vmalloc vfat videobuf2_memops fat videobuf2_core iTCO_wdt iTCO_vendor_support kvm v4l2_common evdev input_leds videodev psmouse mac_hid media serio_raw pcspkr i915 rtsx_pci_ms r8169 memstick mii drm_kms_helper snd_hda_codec_realtek snd_soc_rt286 fan thermal wmi snd_soc_rl6347a i2c_hid drm snd_hda_codec_generic snd_soc_core snd_compress snd_pcm_dmaengine battery ac dw_dmac snd_soc_sst_acpi snd_hda_intel hid dw_dmac_core ac97_bus video gpio_lynxpoint intel_gtt snd_hda_codec i2c_designware_platform 8250_dw spi_pxa2xx_platform syscopyarea mei_me sysfillrect i2c_designware_core
[   62.524820]  snd_hda_core sysimgblt hp_wireless snd_hwdep fjes acpi_pad snd_pcm fb_sys_fops snd_timer button i2c_algo_bit snd lpc_ich mei soundcore i2c_i801 shpchp intel_pch_thermal processor sch_fq_codel ip_tables x_tables ext4 crc16 mbcache jbd2 jitterentropy_rng sha256_ssse3 sha256_generic hmac drbg ansi_cprng algif_skcipher af_alg dm_crypt dm_mod sd_mod rtsx_pci_sdmmc atkbd libps2 crct10dif_pclmul crc32_pclmul crc32c_intel ahci libahci aesni_intel rtsx_pci aes_x86_64 lrw gf128mul glue_helper libata ablk_helper cryptd xhci_pci ehci_pci ehci_hcd xhci_hcd usbcore scsi_mod usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core
[   62.525219] CPU: 0 PID: 807 Comm: wpa_supplicant Tainted: P           O    4.3.3-2-ARCH #1
[   62.525267] Hardware name: Hewlett-Packard HP 240 G3 Notebook PC/2334, BIOS F.36 12/18/2014
[   62.525315] task: ffff8801ca4ca940 ti: ffff8800959fc000 task.ti: ffff8800959fc000
[   62.525353] RIP: 0010:[<ffffffffa07dd1d0>]  [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.525416] RSP: 0018:ffff8800959ffc58  EFLAGS: 00010297
[   62.525447] RAX: 0000000000000000 RBX: 00007ffcc2728510 RCX: 0000000000000000
[   62.525488] RDX: 0000000000005009 RSI: 0000000000000000 RDI: ffffc90001131000
[   62.525528] RBP: ffff8800959ffca0 R08: ffff8801d51e6600 R09: 0000000000000000
[   62.525568] R10: 0000000000000036 R11: ffffffffa07dd140 R12: 0000000000000000
[   62.527329] R13: ffffc90001131000 R14: ffff8801bad07000 R15: ffffffffa07dd140
[   62.528767] FS:  00007f1a34ef57c0(0000) GS:ffff8801dec00000(0000) knlGS:0000000000000000
[   62.530182] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   62.531316] CR2: 00007ffcc2728510 CR3: 0000000098bdc000 CR4: 00000000003406f0
[   62.532354] Stack:
[   62.533356]  ffff8801d809bb80 ffffffff811ba7a2 ffff880095b1be00 ffffffff8156de65
[   62.534585]  00000000226f393b ffff8801bd92d480 0000000000000000 ffffffff81676e48
[   62.535754]  ffff8800959ffe20 ffff8800959ffd28 ffffffff8156de93 0000000000000000
[   62.536924] Call Trace:
[   62.537973]  [<ffffffff811ba7a2>] ? __kmalloc+0x212/0x270
[   62.539176]  [<ffffffff8156de65>] ? ioctl_standard_iw_point+0x105/0x340
[   62.540337]  [<ffffffff8156de93>] ioctl_standard_iw_point+0x133/0x340
[   62.541475]  [<ffffffff811f8304>] ? mntput+0x24/0x40
[   62.542573]  [<ffffffff8156e2eb>] ioctl_standard_call+0x8b/0xe0
[   62.543565]  [<ffffffff8127a0c8>] ? security_capable+0x48/0x60
[   62.544666]  [<ffffffff8156ef60>] ? iw_handler_get_private+0x60/0x60
[   62.545775]  [<ffffffff8156e260>] ? call_commit_handler.part.3+0x30/0x30
[   62.546818]  [<ffffffff8156e1f4>] wireless_process_ioctl+0x154/0x190
[   62.547797]  [<ffffffff8156e548>] wext_handle_ioctl+0x78/0xd0
[   62.548858]  [<ffffffff8149a4d9>] dev_ioctl+0x2a9/0x590
[   62.550045]  [<ffffffff81463906>] sock_ioctl+0x126/0x290
[   62.551139]  [<ffffffff8127b3fe>] ? security_file_permission+0xae/0xc0
[   62.552223]  [<ffffffff811eb5f5>] do_vfs_ioctl+0x295/0x480
[   62.553516]  [<ffffffff811d98f3>] ? vfs_read+0x83/0x120
[   62.554877]  [<ffffffff811eb859>] SyS_ioctl+0x79/0x90
[   62.556196]  [<ffffffff81583d2e>] entry_SYSCALL_64_fastpath+0x12/0x71
[   62.557486] Code: bc 9c ff ff ff eb 75 48 85 db 0f 84 9d 00 00 00 48 83 3d 33 e0 06 00 02 41 89 c4 76 0e 48 83 3d 26 f9 06 00 00 0f 84 a3 00 00 00 <8b> 03 83 f8 03 74 69 83 f8 02 74 6d 83 f8 01 0f 94 c0 0f b6 c0 
[   62.560455] RIP  [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.562150]  RSP <ffff8800959ffc58>
[   62.563890] CR2: 00007ffcc2728510
[   62.572067] ---[ end trace 174c5d19ef38ee89 ]---
[   70.478202] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   74.482274] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   78.486201] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   82.491242] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI

トレースが呼び出される前に、これらの2行が3回表示されることを確認しました。

[   62.260034] no file read method
[   62.260037] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!

これは、RTMPReadParametersHook()(src / os / linux / rt_profile.cの96行目)の次のコードによって印刷されます。

retval =RtmpOSFileRead(srcf, buffer, MAX_INI_BUFFER_SIZE);
if (retval > 0)
{
    RTMPSetProfileParameters(pAd, buffer);
    retval = NDIS_STATUS_SUCCESS;
}
else
    DBGPRINT(RT_DEBUG_ERROR, ("Read file \"%s\" failed(errCode=%d)!\n", src, retval));

以下の関数は-1を返すからです。

1049int RtmpOSFileRead(RTMP_OS_sFD osfd, char *pDataPtr, int readLen)
1050{
1051        // The object must have a read method
1052        if (osfd->f_op && osfd->f_op->read)
1053        {
1054                return osfd->f_op->read(osfd,  pDataPtr, readLen, &osfd->f_pos);
1055        }
1056        else
1057        {
1058                DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
1059                return -1;
1060        }
1061}

モジュールローディングの最終結果は、システム全体が不安定になることです。オンラインにアクセスできず、sudo操作に関連するコマンドもなく、Ctrl-C / Zを介して停止できず、DEクラッシュが発生します。システムのシャットダウンにも時間がかかります。

この問題を解決してWiFiを操作するにはどうすればよいですか?

質問が長すぎてすみません。どんな助けでもいただきありがとうございます。 Wi-Fiなしでは生きていません! :-(

修正する:通話追跡を詳しく見てみると、次の2行があります。

[   40.905333] BUG: unable to handle kernel paging request at 00007ffe7426fb20
[   40.905385] IP: [<ffffffffa09ac1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]

Googleの終わりに出てきたこれ古いエラー報告をオフにします。

アップデート2:NetworkManagerの競合に関するバグレポートを送信しました。ここ。そこで提案されているように、デバッグシンボルを使用してNetworkManagerを再インストールして追跡しようとしました。それでNMのバグを修正しましたが、これまで開発者たちと話を交わしました。これにより、ralinkベンダードライバはnl80211を正しくサポートしておらず、WEXT範囲もサポートしていないため、NMがクラッシュする可能性があります。彼らによると、彼らはドライバーコードを確認し、ドライバーが助けにならず、コードが悪く見えると言いました。彼はまた、nmにドライバを無視し、iwまたはiwconfigを使用して静的に設定するように指示できると付け加えました。

最終結果:バグが修正された後、NMはドライバを無視してドライバをロードするとすぐにクラッシュしませんでした。ただし、実行するとwifi-menu同じ競合が発生します。

答え1

spは意味のない値です。

[   40.103558] NetworkManager[332]: segfault at 8 ip 00000000004ca126 sp 00007ffca7ec45c8 error 4 in NetworkManager[400000+1c5000]

したがって、愚かなアプローチはNetworkManagerをobjdumpし、そのソースコードを読んで[ip = 00000000004ca126]がsegfaultをトリガーする理由を見つけることです。

関連情報