Bug 233837 - gcore on stopped process causes reboot...
Summary: gcore on stopped process causes reboot...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-06 21:53 UTC by Peter Eriksson
Modified: 2018-12-07 15:32 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2018-12-06 21:53:15 UTC
While trying to debug a Samba problem I wanted to grab core-dumps of running winbindd processes, I then noticed that (as root) giving these commands:

# kill -STOP 49049
# gcore -c /var/cores/winbindd.49049 49049

causes FreeBSD 11.2-RELEASE-p5 to reboot immediately. Tried it on two different systems (one old HP D380 G5 and a new Dell PowerEdge R730xd).

I think the "-s" flag to gcore also causes this effect.
Comment 1 Eric van Gyzen freebsd_committer 2018-12-07 15:18:39 UTC
I could not reproduce this on 11.2-STABLE amd64 at r340464 (Nov 15).  I did:

$ sleep 9999 &
$ jobs -l
[1] + 698 Running             sleep 9999
$ kill -STOP 698
[1] + Suspended (signal)      sleep 9999
$ gcore -c sleep.core 698
$ 

Peter, can you try that, using "sleep" specifically?  If that still reboots your system, this is probably fixed in 11-STABLE.
Comment 2 Eric van Gyzen freebsd_committer 2018-12-07 15:20:31 UTC
By the way, did you get a vmcore dump in /var/crash?
Comment 3 Konstantin Belousov freebsd_committer 2018-12-07 15:32:26 UTC
This was fixed in stable/11 by r340290.