Bug 200460 - sysutils/grub2-bhyve: hangs when using nmdm as console
Summary: sysutils/grub2-bhyve: hangs when using nmdm as console
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kris Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-26 09:51 UTC by Jimmy Olgeni
Modified: 2015-05-26 16:56 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (kmoore)


Attachments
O_NONBLOCK fix (926 bytes, patch)
2015-05-26 10:03 UTC, Jimmy Olgeni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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