Bug 200460

Summary: sysutils/grub2-bhyve: hangs when using nmdm as console
Product: Ports & Packages Reporter: Jimmy Olgeni <olgeni>
Component: Individual Port(s)Assignee: Kris Moore <kmoore>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (kmoore)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
O_NONBLOCK fix none

Description Jimmy Olgeni freebsd_committer freebsd_triage 2015-05-26 09:51:01 UTC
When using nmdm(4) as the console (like nmdm0A), grub-bhyve 0.30 will hang until the corresponding "B" device is open by another process.

For example:

# grub-bhyve -c /dev/nmdm0A -d /boot/grub -r hd0,msdos1 -m debian-7.8.0.map -M 1024 debian-7.8.0

will hang until any command accesses /dev/nmdm0B:

# kermit -l /dev/nmdm0B
Comment 1 Jimmy Olgeni freebsd_committer freebsd_triage 2015-05-26 10:03:30 UTC
Created attachment 157153 [details]
O_NONBLOCK fix

Opening the console device with O_NONBLOCK seems to fix the issue.
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-05-26 16:56:23 UTC
A commit references this bug:

Author: kmoore
Date: Tue May 26 16:55:41 UTC 2015
New revision: 387492
URL: https://svnweb.freebsd.org/changeset/ports/387492

Log:
  - Add patch to fix bug with hanging when using nmdm as console
  - Bump PORTREV

  PR: 200460
  Submitted by: olgeni@

Changes:
  head/sysutils/grub2-bhyve/Makefile
  head/sysutils/grub2-bhyve/files/
  head/sysutils/grub2-bhyve/files/patch-grub-core_term_emu_console.c