Bug 19389

Summary: Panic caused by sendfile(2)
Product: Base System Reporter: ras <ras>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   

Description David Greenman 2000-06-20 00:48:20 UTC
>	Deleting a file while doing a sendfile(2) on it results in
>	kernel panic. Non-priv'd users can panic box.

   This is a case that I've specifically tested for in the past, so I'm a bit
surprised to see this bug report. sendfile(2) holds a vnode reference to the
file (via the open file descriptor), which should prevent bad things from
happening when the file is unlinked (the actual deletion is defered until
all internal references have been dropped). Is it possible that there is more
involved than just deleting the file? Can you provide a traceback?

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
Manufacturer of high-performance Internet servers - http://www.terasolutions.com
Pave the road of life with opportunities.
Comment 1 ras 2000-06-20 00:50:01 UTC
	Deleting a file while doing a sendfile(2) on it results in
	kernel panic. Non-priv'd users can panic box.

How-To-Repeat: 
	figure it out :P
Comment 2 ras 2000-06-20 00:59:30 UTC
On Mon, 19 Jun 2000, David Greenman wrote:

> >	Deleting a file while doing a sendfile(2) on it results in
> >	kernel panic. Non-priv'd users can panic box.
> 
>    This is a case that I've specifically tested for in the past, so I'm a bit
> surprised to see this bug report. sendfile(2) holds a vnode reference to the
> file (via the open file descriptor), which should prevent bad things from
> happening when the file is unlinked (the actual deletion is defered until
> all internal references have been dropped). Is it possible that there is more
> involved than just deleting the file? Can you provide a traceback?

I wish I had let the coredump go. Kernel panic from ncftpd sendfile,
immediately after I rm -rf'd the files in another console.

-- 
Richard A Steenbergen <ras@e-gerbil.net>   http://www.e-gerbil.net/humble
PGP Key ID: 0x138EA177  (67 29 D7 BC E8 18 3E DA  B2 46 B3 D8 14 36 FE B6)
Comment 3 jruigrok 2000-06-21 06:36:27 UTC
-On [20000620 02:02], Richard A. Steenbergen (ras@e-gerbil.net) wrote:
> I wish I had let the coredump go. Kernel panic from ncftpd sendfile,
> immediately after I rm -rf'd the files in another console.

But since you can reproduce it reliably, please get another crashdump.
=)

-- 
Jeroen Ruigrok van der Werven          Network- and systemadministrator
<jruigrok@via-net-works.nl>            VIA Net.Works The Netherlands
BSD: Technical excellence at its best  http://www.via-net-works.nl
Knowledge is power...
Comment 4 dd freebsd_committer freebsd_triage 2001-06-10 02:25:09 UTC
State Changed
From-To: open->feedback

Waiting for the kernel core dump.
Comment 5 Mike Barcroft freebsd_committer freebsd_triage 2001-07-22 04:57:06 UTC
State Changed
From-To: feedback->closed


Timeout; no response from originator.