Bug 271604 - ifconfig ix0.<vlan> create leads to crash
Summary: ifconfig ix0.<vlan> create leads to crash
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-24 11:11 UTC by Kurt Jaeger
Modified: 2023-06-13 06:57 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Jaeger freebsd_committer freebsd_triage 2023-05-24 11:11:19 UTC
The last lines in /var/log/kern:

May 24 12:03:52 kernel: ix0: link state changed to DOWN
May 24 12:04:14 kernel: ix0: link state changed to UP

After that, it crashed and generated /var/crash/vmcore.0, but core.txt.0 says:

Unable to find a kernel debugger.
Please install the devel/gdb port or gdb package.

How can I try to generate a core.txt.0, after I install gdb ?

Does this crash relate to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221317

Thanks!
Comment 1 Mina Galić freebsd_triage 2023-05-24 12:29:55 UTC
we've got this document https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/ that should contain some hints
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2023-05-24 13:09:58 UTC
This document suggests to use:

kgdb /boot/kernel/kernel /var/crash/vmcore.0

which leads to this:

Reading symbols from /boot/kernel/kernel...
(No debugging symbols found in /boot/kernel/kernel)
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/thread.c:1337: internal-error: switch_to_thread: Assertion `thr != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x1320d61 ???
0x17c7751 ???
0x17c75b8 ???
0x1c5d723 ???
0x17869ef ???
0x1458ab0 ???
0x17677ff ???
0x1355614 ???
0x1794d75 ???
0x1541ac5 ???
0x15404bb ???
0x153ee9e ???
0x122c35b ???
---------------------
/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/thread.c:1337: internal-error: switch_to_thread: Assertion `thr != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

/wrkdirs/usr/ports/devel/gdb/work-py39/gdb-13.1/gdb/thread.c:1337: internal-error: switch_to_thread: Assertion `thr != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2023-05-30 13:24:36 UTC
Don't want to too far on a tangent, but you can also try opening the core file in lldb

$ lldb /boot/kernel/kernel -c /var/crash/vmcore.0
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2023-05-30 13:31:03 UTC
I upgraded the box from 13.1 to 13.2 in the meantime, but the old kernel
is still around, so:

# lldb /boot/kernel.old/kernel -c /var/crash/vmcore.0

shows this:

(lldb) bt
* thread #1, name = '(pid 66461) ifconfig (crashed)'
  * frame #0: 0xffffffff80c1b91e kernel`doadump + 14
    frame #1: 0xffffffff80c1b75c kernel`kern_reboot + 1084
    frame #2: 0xffffffff80c1bbce kernel`vpanic + 462
    frame #3: 0xffffffff80c1b9d3 kernel`panic + 35
    frame #4: 0xffffffff810afdf5 kernel`trap_fatal + 901
    frame #5: 0xffffffff810afe4f kernel`trap_pfault + 79
    frame #6: 0xffffffff810875b8 kernel`alltraps_pushregs_no_rax + 110
    frame #7: 0xfffff80017617b80
    frame #8: 0xffffffff80d5e7a7 kernel`rib_add_route + 1015
    frame #9: 0xffffffff80d608d7 kernel`rib_handle_ifaddr_info + 183
    frame #10: 0xffffffff80e2c9d3 kernel`nd6_prefix_onlink + 595
    frame #11: 0xffffffff80e2c5e5 kernel`nd6_prelist_add + 661
    frame #12: 0xffffffff80e03db3 kernel`in6_control + 2835
    frame #13: 0xffffffff80d325dd kernel`ifioctl + 925
    frame #14: 0xffffffff80c8980b kernel`kern_ioctl + 571
    frame #15: 0xffffffff80c89511 kernel`sys_ioctl + 209
    frame #16: 0xffffffff810b06ec kernel`amd64_syscall + 268
    frame #17: 0xffffffff81087ecb kernel`fast_syscall_common + 216

I have no idea if this lldb-call works - so it might be a bit fishy.
Comment 5 Alexander V. Chernikov freebsd_committer freebsd_triage 2023-06-13 06:52:49 UTC
Did the ix0.X interface creation always crash the kernel 13.1?
Was it always ix0.X pattern, or the other (ethernet) interfaces were affected as well?
Did the upgrade to 13.2 fix it?
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2023-06-13 06:57:02 UTC
(In reply to Alexander V. Chernikov from comment #5)
I had one case, and as it was a production system, I did not probe
further.

I did not see crashes with 13.2 up to now, but who knows...