Summary: | hung process using ktrace with cloudabi | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Michael Plass <mfp49_freebsd> | ||||
Component: | kern | Assignee: | Ed Schouten <ed> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | amd64, ed | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Michael Plass
2016-07-03 23:05:49 UTC
Created attachment 172143 [details]
Properly set sa->narg
Hi Michael,
Thanks for reporting this bug. Can you let me know whether the attached patch fixes the problem for you? If so, I'll make sure to commit it before 11.0.
Thanks,
Ed
Ed, With your patch, all seems well. No hangs in 1000 tries, kdump output looks reasonable, and the size of ktrace.out is consistent from run to run. Thanks, - Michael Perfect! Thanks for testing! As we've already entered the freeze for 11.0, I've sent out a commit approval request to re@. Will commit the patch as soon as I get the approval. A commit references this bug: Author: ed Date: Fri Jul 8 20:09:22 UTC 2016 New revision: 302448 URL: https://svnweb.freebsd.org/changeset/base/302448 Log: Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using tracing tools like ktrace. If we forget to set this value, it is set to random garbage. This may cause ktrace to hang indefinitely, making it impossible to kill. Reported by: Michael Plass PR: 210800 MFC before: 11.0-RELEASE Changes: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/arm64/cloudabi64/cloudabi64_sysvec.c A commit references this bug: Author: ed Date: Tue Jul 12 06:25:28 UTC 2016 New revision: 302627 URL: https://svnweb.freebsd.org/changeset/base/302627 Log: MFC r302448: Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using tracing tools like ktrace. If we forget to set this value, it is set to random garbage. This may cause ktrace to hang indefinitely, making it impossible to kill. Approved by: re@ Reported by: Michael Plass PR: 210800 Changes: _U stable/11/ stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c stable/11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Looks like this is fully fixed now. 11.0-BETA2 should be first version to include this fix. Thanks again for reporting this issue and enjoy using CloudABI! |