Bug 219460 - iwlwifi AX210 ASSERT 87 upon resume from suspend
Summary: iwlwifi AX210 ASSERT 87 upon resume from suspend
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless-intel (show other bugs)
Hardware: Intel Linux
: P3 normal
Assignee: Default virtual assignee for network-wireless-intel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-03 16:52 UTC by Omer Sabic
Modified: 2024-11-18 15:01 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Dump file (2.00 MB, application/octet-stream)
2024-11-03 16:52 UTC, Omer Sabic
Details
prints (1.39 KB, patch)
2024-11-03 17:43 UTC, Emmanuel Grumbach
Details | Diff
backported module dmesg (13.91 KB, text/plain)
2024-11-04 20:11 UTC, Stars
Details
fix for ASSER 87 upon resume (4.13 KB, patch)
2024-11-04 20:30 UTC, Emmanuel Grumbach
Details | Diff
dmesg with patch applied (9.13 KB, text/plain)
2024-11-05 00:01 UTC, Stars
Details
Manually entered patch (3.30 KB, patch)
2024-11-05 00:04 UTC, Stars
Details | Diff
full dmesg out (130.37 KB, text/plain)
2024-11-05 14:21 UTC, Stars
Details

Description Omer Sabic 2024-11-03 16:52:13 UTC
Created attachment 307125 [details]
Dump file

As per instructions here:
https://bugzilla.kernel.org/show_bug.cgi?id=219447#c23 ... I am opening a new bug report with the dump file attached.
Also, here's the dmesg log if you need it: https://pastebin.com/ZeQYQJFQ
I hope it's useful.

Kind regards
Comment 1 Emmanuel Grumbach 2024-11-03 17:43:40 UTC
Created attachment 307126 [details]
prints

Please reproduce with the patch attached.
This will add more prints.

Thanks!
Comment 2 Omer Sabic 2024-11-03 18:57:19 UTC
Sorry, I've never done this, so could please you provide a guide how to go about it?
Comment 3 Emmanuel Grumbach 2024-11-03 19:05:46 UTC
NP

git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git

then you apply my patch

patch -p1 < prints.patch

Then you compile and install the out of tree driver:

make -j8 && sudo make install

Then you reboot and reproduce the scenario.

Note that this driver will be slightly newer than the one you have in 6.11.

Thanks for your cooperation!
Comment 4 Stars 2024-11-04 17:19:45 UTC
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/nl80211.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/ethtool.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/mesh.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/ap.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/trace.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/ocb.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/pmsr.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/debugfs.o
  GEN     /home/stars/Git/backport-iwlwifi/net/wireless/shipped-certs.c
  GEN     /home/stars/Git/backport-iwlwifi/net/wireless/extra-certs.c
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/shipped-certs.o
  CC [M]  /home/stars/Git/backport-iwlwifi/net/wireless/extra-certs.o
/home/stars/Git/backport-iwlwifi/net/wireless/nl80211.c: In function ‘nl80211_common_reg_change_event’:
/home/stars/Git/backport-iwlwifi/net/wireless/nl80211.c:18053:9: error: too many arguments to function ‘genlmsg_multicast_allns’
18053 |         genlmsg_multicast_allns(&nl80211_fam, msg, 0,
      |         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/stars/Git/backport-iwlwifi/backport-include/net/genetlink.h:3,
                 from /home/stars/Git/backport-iwlwifi/net/wireless/nl80211.c:25:
./include/net/genetlink.h:537:5: note: declared here
  537 | int genlmsg_multicast_allns(const struct genl_family *family,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
/home/stars/Git/backport-iwlwifi/net/wireless/nl80211.c: In function ‘nl80211_send_beacon_hint_event’:
/home/stars/Git/backport-iwlwifi/net/wireless/nl80211.c:18789:9: error: too many arguments to function ‘genlmsg_multicast_allns’
18789 |         genlmsg_multicast_allns(&nl80211_fam, msg, 0,
      |         ^~~~~~~~~~~~~~~~~~~~~~~
./include/net/genetlink.h:537:5: note: declared here
  537 | int genlmsg_multicast_allns(const struct genl_family *family,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
make[6]: *** [scripts/Makefile.build:244: /home/stars/Git/backport-iwlwifi/net/wireless/nl80211.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [scripts/Makefile.build:485: /home/stars/Git/backport-iwlwifi/net/wireless] Error 2
make[4]: *** [Makefile:1926: /home/stars/Git/backport-iwlwifi] Error 2
make[3]: *** [Makefile.build:13: modules] Error 2
make[2]: *** [Makefile.real:101: modules] Error 2
make[1]: *** [Makefile:43: modules] Error 2
make: *** [Makefile:30: default] Error 2

This is the result upon compiling the module, is this an error on my part?
Comment 5 Emmanuel Grumbach 2024-11-04 19:28:53 UTC
What is the version of your kernel?
Comment 6 Stars 2024-11-04 20:11:48 UTC
Created attachment 307134 [details]
backported module dmesg
Comment 7 Stars 2024-11-04 20:15:10 UTC
(In reply to Emmanuel Grumbach from comment #5)
> What is the version of your kernel?

Thanks for pointing that out...

Anyway I attached the dmesg out for iwlwifi, although now when I wake from suspend wireless reconnects and there is no "Not associated and the session protection is over already" messages anymore.
Comment 8 Emmanuel Grumbach 2024-11-04 20:30:06 UTC
Created attachment 307135 [details]
fix for ASSER 87 upon resume

Can you please apply this patch on top of the backport tree and let me know how it works?
Comment 9 Stars 2024-11-04 23:16:03 UTC
(In reply to Emmanuel Grumbach from comment #8)
> Created attachment 307135 [details]
> fix for ASSER 87 upon resume
> 
> Can you please apply this patch on top of the backport tree and let me know
> how it works?

patch -p1 < 0001-BUGFIX-wifi-iwlwifi-mvm-don-t-dump-the-firmware-stat.patch 
patching file drivers/net/wireless/intel/iwlwifi/mvm/d3.c
Hunk #1 FAILED at 3044.
Hunk #2 succeeded at 3141 with fuzz 1 (offset 69 lines).
Hunk #3 succeeded at 3512 (offset 75 lines).
Hunk #4 FAILED at 3460.
Hunk #5 succeeded at 3699 (offset 74 lines).
Hunk #6 FAILED at 3635.
3 out of 6 hunks FAILED -- saving rejects to file drivers/net/wireless/intel/iwlwifi/mvm/d3.c.rej

Patch failed to apply, unless I'm doing something wrong.
Comment 10 Stars 2024-11-05 00:01:07 UTC
Created attachment 307138 [details]
dmesg with patch applied
Comment 11 Stars 2024-11-05 00:04:30 UTC
Created attachment 307139 [details]
Manually entered patch

As the patch failed to apply I ended up patching it manually, this is the patch that I was able to come up with. Not sure what happened but as far as I know it worked. Please review the dmesg and let me know if this is satisfactory.
Comment 12 Emmanuel Grumbach 2024-11-05 06:22:22 UTC
I am a bit confused...

I can compile the master branch of the backport tree on kernel v6.11.5.
Then I sent to you a patch based on that backport tree.
Please clarify what code base you're working with.

I can't see the stack traces in your log from comment#10 because you filtered only the iwlwifi lines.
Comment 13 Stars 2024-11-05 14:08:00 UTC
(In reply to Emmanuel Grumbach from comment #12)
> I am a bit confused...
> 
> I can compile the master branch of the backport tree on kernel v6.11.5.
> Then I sent to you a patch based on that backport tree.
> Please clarify what code base you're working with.
> 
> I can't see the stack traces in your log from comment#10 because you
> filtered only the iwlwifi lines.

I compiled and applied the patch based on instructions from comment#3
My kernel is 6.11.5.

Anyway regardless I will attach the full dmesg.
Comment 14 Stars 2024-11-05 14:21:46 UTC
Created attachment 307143 [details]
full dmesg out
Comment 15 Emmanuel Grumbach 2024-11-05 14:29:47 UTC
Ok, logs look sane.
Bug fixed it seems?
Comment 16 Stars 2024-11-05 15:11:52 UTC
(In reply to Emmanuel Grumbach from comment #15)
> Ok, logs look sane.
> Bug fixed it seems?

Yes the bug looks fixed! Not too sure how this stuff works. Will you commit the patches and they will be applied in the next kernel release? 

Thank you by the way!
Comment 17 Emmanuel Grumbach 2024-11-05 15:15:41 UTC
The fix is under review, once it'll be merged, it'll make its way to the kernel.

Thank you for your cooperation!
Comment 18 Omer Sabic 2024-11-09 08:31:42 UTC
I apologize that I was unable to work with you on this in the recent days. I was swamped with urgent work tasks and could not afford the time needed for this.
In the mean time, Fedora upgraded the kernel to 6.11.6, but the issue persists.
Also I see you managed to sort it out with Stars' assistance. I presume the fix will make it to the next bugfix release.
Should you need anything from me, please let me know and I'll do my best.
Comment 19 Emmanuel Grumbach 2024-11-09 16:18:56 UTC
@Omer, we should be good.

I can't tell exactly when the fix will be released.
Comment 20 Omer Sabic 2024-11-10 19:21:54 UTC
Ok, until then the UEFI setting can hold :)
Comment 21 Omer Sabic 2024-11-16 07:40:38 UTC
@Emmanuel, I upgraded to kernel 6.11.7 and the problem is fixed.
Thank you!
Comment 22 Emmanuel Grumbach 2024-11-16 15:38:25 UTC
That's strange...
No fix was merged between 6.11.6 and 6.11.7
Comment 23 Omer Sabic 2024-11-17 08:00:21 UTC
I just rechecked everything. Power setting in UEFI is set to Linux S3, kernel is 6.11.7, WiFi is connected after waking up the system from sleep 🤷
Comment 24 Stars 2024-11-18 15:01:08 UTC
(In reply to Emmanuel Grumbach from comment #22)
> That's strange...
> No fix was merged between 6.11.6 and 6.11.7

I upgraded to the latest kernel and wifi will reconnect now like Omer described although I am getting the same dmesg logs as before. So for whatever reason the network will come back up but will still dump the firmware.

Now it's saying something about dumping registers as well. This is kernel 6.11.8

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