Bug 281452 - Realtek 'if_re' module crashes on module load
Summary: Realtek 'if_re' module crashes on module load
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
: 281451 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-12 08:33 UTC by Mithun
Modified: 2024-09-20 15:21 UTC (History)
4 users (show)

See Also:


Attachments
if_re_module_crash_dump (229.91 KB, text/plain)
2024-09-12 08:37 UTC, Mithun
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mithun 2024-09-12 08:33:38 UTC
Hello all,

I am experiencing a system crash and system reboot itself when attempting to load the 'if_re' module, The issue occurs immediately upon loading the module, the system becomes unresponsive or panics.

Steps to Reproduce:

    * Build the if_re module as a separate module by modifying the GENERIC kernel   configuration file:
    		#device re
    * Build it and install it.
    *  Load the if_re kernel module using 
    		kldload if_re
    The system crashes and reboot immediately or becomes unresponsive.

I've attached a crash dump for further investigation.

Note: When this module is compiled directly into the kernel (i.e., not built as a separate module), there is no issue. The module loads successfully and works fine in this case.

re0@pci0:43:0:0:	class=0x020000 rev=0x15 hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x17aa subdevice=0x38f4
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet

"/etc/rc.conf" 29L, 606B                                                                                                                                                   
	clear_tmp_enable="YES"
	hostname="sysadmin"
	keymap="us.kbd"
	ifconfig_re0="DHCP"
	ifconfig_re0_ipv6="inet6 accept_rtadv"
	sshd_enable="YES"
	moused_enable="YES"
	ntpd_enable="YES"
	ntpd_sync_on_start="YES"
	powerd_enable="YES"
	# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
	dumpdev="AUTO"
	zfs_enable="YES"
	slim_enable="yes"
	dbus_enable="yes"
	hald_enable="yes"
	sound_load="yes"
	snd_hda_load="yes"
	kld_list="i915kms"
	wlans_iwlwifi0="wlan0"
	ifconfig_wlan0="WPA DHCP"
	rtadvd_enable="YES"
	#devmatch_enable="NO"
	moused_enable="YES"
	linux_enable="YES"
	syslogd_flags="-vv"

Thank you,

Mithun
Comment 1 Mithun 2024-09-12 08:37:05 UTC
Created attachment 253511 [details]
if_re_module_crash_dump
Comment 2 Mithun 2024-09-12 08:44:31 UTC
*** Bug 281451 has been marked as a duplicate of this bug. ***
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-09-14 00:48:15 UTC
^Triage: appears to be a problem only on kldload.
Comment 4 Zhenlei Huang freebsd_committer freebsd_triage 2024-09-14 03:56:49 UTC
@Mithun

It seems this has been fixed by Kristof via commit 43387b4e5740 (if: guard against if_ioctl being NULL). The commit has been MFCed to stable/14 with commit 9a8a26aefb36.

May you please have a try with 9a8a26aefb36 ?

See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275920 .
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2024-09-20 15:21:10 UTC
(In reply to Zhenlei Huang from comment #4)
This is in 14.1, which already has the commit in question, and from the line number it looks like the ifm_status function pointer is NULL.

(In reply to Mithun from comment #0)
This is likely a problem with your build.  We'd need to see exactly how you built if_re.ko in order to track it down, together with a copy of the kernel configuration file.