Created attachment 180823 [details] First time Got FreeBSD 11 panic 2 times. In both cases got same stack backtrace. See attachment. +1 attachment in nginx's trac https://trac.nginx.org/nginx/ticket/1217 FreeBSD XXX 11.0-RELEASE-p7 FreeBSD 11.0-RELEASE-p7 #0 r312555: Sat Jan 21 01:54:58 MSK 2017 root@YYYY:/usr/obj/usr/src/sys/IHEAD11 amd64
Created attachment 180824 [details] Second time
Hi! Can you please update to stable/11. There was a bugfix to sendfile, and it might be related to your problem. If problem reproduces on stable/11, I need you to obtain kernel core file.
(In reply to Gleb Smirnoff from comment #2) Could you give patch against 11.0-RELEASE? I will rebuild the kernel.
https://svnweb.freebsd.org/base?view=revision&revision=306685 Should apply cleanly.
Problem repeated.
Created attachment 180862 [details] Third time
(In reply to Gleb Smirnoff from comment #4) Patch not helped. It is production server, i can not expirement with kernel debugging. I disabled sendfile in nginx and enable aio instead.
If you don't want to obtain kernel core, then I can't help. Sorry.
Created attachment 181119 [details] proposed patch Hi! Please try this patch.
A commit references this bug: Author: glebius Date: Fri Mar 24 16:01:20 UTC 2017 New revision: 315910 URL: https://svnweb.freebsd.org/changeset/base/315910 Log: Make sendfile(2) more robust against file change. This fixes a possible crash when the file shrinks. This also fixes sendfile(2) not sending more data in a case when the file grows, and the request is open-ended or specifies a size that is greater than old file size. PR: 217789 Reviewed by: gallatin MFC after: 10 days Changes: head/sys/kern/kern_sendfile.c
(In reply to Gleb Smirnoff from comment #9) It works. Four days, no panic.
A commit references this bug: Author: glebius Date: Mon Apr 3 00:46:32 UTC 2017 New revision: 316431 URL: https://svnweb.freebsd.org/changeset/base/316431 Log: Merge r315910: Make sendfile(2) more robust against file change. This fixes a possible crash when the file shrinks. This also fixes sendfile(2) not sending more data in a case when the file grows, and the request is open-ended or specifies a size that is greater than old file size. PR: 217789 Reviewed by: gallatin Changes: _U stable/11/ stable/11/sys/kern/kern_sendfile.c