Date: Wed, 27 Jun 2001 14:32:47 -0700 (PDT) From: Umesh Krishnaswamy <umesh@juniper.net> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/28466: When soft updates is enabled, cpl is not restored during an fsync syscall Message-ID: <200106272132.f5RLWlB79998@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 28466
>Category: kern
>Synopsis: When soft updates is enabled, cpl is not restored during an fsync syscall
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 27 14:40:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Umesh Krishnaswamy
>Release: 4.2-STABLE
>Organization:
Juniper Networks
>Environment:
I also have the fix for 'Free lock before returning from
process_worklist_item' (1.88 ffs_softdep.c). Else it is stock FreeBSD4.2.
>Description:
I have instrumentation in the syscall path to catch cases where the
cpl after the syscall is not 0. I also have soft updates enabled.
When I type reboot at which time a some daemons in my system are doing
a bunch of fsyncs, I get the following error from my instrumentation.
Syscall 95 entered at cpl 0, exited at cpl 3fc0000
(kgdb) bt
#0 dumpsys () at ../../kern/kern_shutdown.c:562
#1 0xc018fbab in boot (howto=256) at ../../kern/kern_shutdown.c:317
#2 0xc01903e6 in panic (
fmt=0xc0379be0 "Syscall %d entered at cpl %x, exited at cpl %x\n")
at ../../kern/kern_shutdown.c:807
#3 0xc032192f in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 528384, tf_esi = 0, tf_ebp = -1077938608, tf_isp = -577204268,
tf_ebx = 7, tf_edx = 1209838208, tf_ecx = 1610641556, tf_eax = 0,
tf_trapno = 12, tf_err = 2, tf_eip = 1209555732, tf_cs = 31,
tf_eflags = 642, tf_esp = -1077949932, tf_ss = 47})
at ../../i386/i386/trap.c:1450
#4 0xc0314685 in Xint0x80_syscall () at ../../i386/i386/elf_machdep.c:120
(kgdb) p lk
$1 = {lkt_spl = 66846720, lkt_held = -1}
I do not have any problems when soft updates is not enabled. I guess
there is some code in the fsync path that is not doing an splx.
I added the fix for 'Free lock before returning from
process_worklist_item' (1.88 ffs_softdep.c), but that did not help.
>How-To-Repeat:
1) Add instrumentation in trap.c to panic if the cpl after a syscall
is not zero.
2) Enable softupdates
3) Touch a lot of files
4) Do fsyncs
Again, I do not hit this all the time. I have seen it twice in 20
attempts.
reboot
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106272132.f5RLWlB79998>
