Bug 233837

Summary: gcore on stopped process causes reboot...
Product: Base System Reporter: Peter Eriksson <peter.x.eriksson>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: kib, vangyzen
Priority: ---    
Version: 11.2-RELEASE   
Hardware: amd64   
OS: Any   

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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2018-12-07 15:32:26 UTC
This was fixed in stable/11 by r340290.