| Summary: | FreeBSD 11 panic nginx, probably sendfile problem | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Alexey Koscheev <freebsd> | ||||||||||
| Component: | kern | Assignee: | Gleb Smirnoff <glebius> | ||||||||||
| Status: | Closed FIXED | ||||||||||||
| Severity: | Affects Only Me | CC: | chris, glebius | ||||||||||
| Priority: | --- | ||||||||||||
| Version: | 11.0-RELEASE | ||||||||||||
| Hardware: | amd64 | ||||||||||||
| OS: | Any | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Alexey Koscheev
2017-03-14 18:27:43 UTC
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 |