Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log: include a call to action with fatal errors #30898

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Bug report
about: Create a report to help us improve
name: Bug or crash report
about: Report unexpected behavior to help us improve

---

**Describe the bug**
**Describe the problem**

Please describe the issue you observed, and any steps we can take to reproduce it:

Expand All @@ -19,14 +19,21 @@ If possible, provide steps to reproduce the behavior:
3. Look at UI / log file / client app ...
4. See error


**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional data / screenshots**
If applicable, add screenshots / log files to help explain your problem.
If the problem is SQL-related, include a copy of the SQL query and the schema
of the supporting tables.

If a node in your cluster encountered a fatal error, supply the contents of the
log directories (at minimum of the affected node(s), but preferably all nodes).

Note that log files can contain confidential information. Please continue
creating this issue, but contact [email protected] to submit the log
files in private.

If the problem is SQL-related, include a copy of the SQL query and the schema of the supporting tables.
If applicable, add screenshots to help explain your problem.

**Environment:**
- CockroachDB version [e.g. 2.0.x]
Expand Down
26 changes: 26 additions & 0 deletions pkg/util/log/clog.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,30 @@ import (
"github.com/petermattis/goid"
)

const fatalErrorPostamble = `

****************************************************************************

This node experienced a fatal error (printed above this message) as a result
of which the process is terminating.

Fatal errors can occur due to faulty hardware (disks, memory, clocks) or a
problem in CockroachDB. With your help, the support team at Cockroach Labs
can help you determine the root cause, recommend next steps, and will improve
CockroachDB based on your report.

Please consider submitting a report about this crash according to the
instructions at

https://github.com/cockroachdb/cockroach/issues/new/choose

If you would rather not post on a public forum, instead please contact

[email protected]

The Cockroach Labs team appreciates your feedback.
`

// FatalChan is closed when Fatal is called. This can be used to make
// the process stop handling requests while the final log messages and
// crash report are being written.
Expand Down Expand Up @@ -842,6 +866,8 @@ func (l *loggingT) outputLogEntry(s Severity, file string, line int, msg string)
case tracebackAll:
stacks = getStacks(true)
}
stacks = append(stacks, []byte(fatalErrorPostamble)...)

logExitFunc = func(error) {} // If we get a write error, we'll still exit.

// We don't want to hang forever writing our final log message. If
Expand Down