Bug 220141 - sysutils/pefs-kmod: panic: stack overflow detected
Summary: sysutils/pefs-kmod: panic: stack overflow detected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Gleb Kurtsou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-19 19:39 UTC by Mikael Urankar
Modified: 2017-07-14 12:38 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gleb)


Attachments
Update sysutils/pefs-kmod to 2017-06-20 (863 bytes, patch)
2017-06-21 05:05 UTC, Gleb Kurtsou
gleb: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2017-06-19 19:39:11 UTC
Hi,

I got a kernel panic on head r320060 doing pefs mount /home/mik /home/mik


FreeBSD cocyte 12.0-CURRENT FreeBSD 12.0-CURRENT #3 r320060: Sun Jun 18 05:51:19 CEST 2017     root@xxx:/usr/obj/usr/src/sys/GENERIC-NODEBUG  amd64

pefs: AESNI hardware acceleration enabled
panic: stack overflow detected; backtrace may be corrupted
cpuid = 2
time = 1497900539
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe02362fc3f0
vpanic() at vpanic+0x19c/frame 0xfffffe02362fc470
panic() at panic+0x43/frame 0xfffffe02362fc4d0
__stack_chk_fail() at __stack_chk_fail+0x12/frame 0xfffffe02362fc4e0
pefs_statfs() at pefs_statfs+0x122/frame 0xfffffe02362fc6f0
KDB: enter: panic
<snip>
__curthread () at ./machine/pcpu.h:232
warning: Source file is more recent than executable.
232             __asm("movq %%gs:%1,%0" : "=r" (td)
(kgdb) #0  __curthread () at ./machine/pcpu.h:232
#1  doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:318
#2  0xffffffff803a33cb in db_dump (dummy=<optimized out>, 
    dummy2=<error reading variable: access outside bounds of object referenced via synthetic pointer>, dummy3=<unavailable>, dummy4=<unavailable>)
    at /usr/src/sys/ddb/db_command.c:546
#3  0xffffffff803a31bf in db_command (last_cmdp=<optimized out>, 
    cmd_table=<optimized out>, dopager=<optimized out>)
    at /usr/src/sys/ddb/db_command.c:453
#4  0xffffffff803a2ef4 in db_command_loop ()
    at /usr/src/sys/ddb/db_command.c:506
#5  0xffffffff803a602f in db_trap (type=<optimized out>, code=<optimized out>)
    at /usr/src/sys/ddb/db_main.c:248
#6  0xffffffff80ac2cb3 in kdb_trap (type=3, code=-61456, tf=<optimized out>)
    at /usr/src/sys/kern/subr_kdb.c:654
#7  0xffffffff80f0c6ee in trap (frame=0xfffffe02362fc320)
    at /usr/src/sys/amd64/amd64/trap.c:537
#8  <signal handler called>
#9  kdb_enter (why=0xffffffff814669f0 "panic", msg=<optimized out>)
    at /usr/src/sys/kern/subr_kdb.c:444
#10 0xffffffff80a7f679 in vpanic (fmt=<optimized out>, ap=0xfffffe02362fc4b0)
    at /usr/src/sys/kern/kern_shutdown.c:772
#11 0xffffffff80a7f4b3 in panic (fmt=0x0)
    at /usr/src/sys/kern/kern_shutdown.c:710
#12 0xffffffff80aaf432 in __stack_chk_fail ()
    at /usr/src/sys/kern/stack_protector.c:17
#13 0xffffffff82839932 in pefs_statfs () from /boot/modules/pefs.ko

kernel, userland and pefs-kmod are in sync.
I can build a debug kernel and provide additional info if needed.



Thanks in advance
Comment 1 Gleb Kurtsou freebsd_committer freebsd_triage 2017-06-21 05:05:19 UTC
Created attachment 183664 [details]
Update sysutils/pefs-kmod to 2017-06-20

Could you please try pefs-kmod port patch attached or latest revision in github:
https://github.com/glk/pefs/commit/51772339c0d0768326c883b76922b032b4e86e04

Can you think of anything unusual about your configuration? I couldn't reproduce it locally.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2017-06-21 07:31:46 UTC
The patch fixes the issue, no more panic :)

I'm using uefi + zfs on my laptop, FreeBSD-base [1] to upgrade the base system + kernel (generic-nodebug). I made no modifications on /usr/src or sysutils/pefs-kmod.

Big thanks for the quick fix.

[1] https://wiki.freebsd.org/PkgBase
Comment 3 Kris Moore freebsd_committer freebsd_triage 2017-07-12 00:18:54 UTC
Should be updated now

https://svnweb.freebsd.org/ports?view=revision&revision=445555
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2017-07-14 12:38:49 UTC
yes it's fixed, thanks.