Bug 193981 - panic: vtbuf_fill_locked begin.tp_row 0 must be < screen height 0 on Raspberry PI
Summary: panic: vtbuf_fill_locked begin.tp_row 0 must be < screen height 0 on Raspberr...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 10.0-STABLE
Hardware: arm Any
: --- Affects Only Me
Assignee: Jean-Sébastien Pédron
URL:
Keywords: vt
Depends on:
Blocks:
 
Reported: 2014-09-27 23:44 UTC by Danilo Egea Gondolfo
Modified: 2014-10-14 19:11 UTC (History)
2 users (show)

See Also:


Attachments
vtterm_cnprobe: Only recompute term size if screen size != 0 (568 bytes, patch)
2014-10-04 11:27 UTC, Jean-Sébastien Pédron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-09-27 23:44:32 UTC
I'm getting this panic on Raspberry. I'm running 10-stable r272221.
It's booting fine until I updated. Probably the problem was introduced after r271973.

DRAM: 480MB
Number of U-Boot devices: 1
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=0 slice=<auto> partition=<auto>... good.
Loading /boot/defaults/loader.conf 
/boot/kernel/kernel data=0x4ca5e4+0xada1c syms=[0x4+0x886d0+0x4+0x528af]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
Using DTB provided by U-Boot at address 0x0x100.
Kernel entry at 0x100100...
Kernel args: (null)
panic: vtbuf_fill_locked begin.tp_row 0 must be < screen height 0
Uptime: 1s
Comment 1 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-09-29 16:28:29 UTC
Same problem on HEAD r272282.
Comment 2 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-09-30 01:48:49 UTC
I reverted just r271973 (on 10-stable) and the system boots again.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2014-10-03 15:16:33 UTC
Can you attach the output from a verbose boot?
Comment 4 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-10-03 19:42:49 UTC
The verbose boot don't show any extra information.

loader> show           
LINES=24
boot_multicons=YES
boot_verbose=YES
bootfile=kernel
console=uboot
currdev=disk0s2a:
interpret=OK
kernel=kernel
kernel_options=
kernelname=/boot/kernel/kernel
loaddev=disk0s2a:
loader_conf_files=/boot/device.hints /boot/loader.conf /boot/loader.conf.local
mac_ifoff=NO
module_path=/boot/kernel;/boot/modules
prompt=loader>
loader> boot -v
Booting...
Using DTB provided by U-Boot at address 0x100.
Kernel entry at 0x100100...
Kernel args: -v
panic: vtbuf_fill_locked begin.tp_row 0 must be < screen height 0
Uptime: 1s
Comment 5 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-10-04 11:27:33 UTC
Created attachment 147966 [details]
vtterm_cnprobe: Only recompute term size if screen size != 0

I see that there's no vt(4) driver built into RPI-B kernel configuration, therefore, the screen size is unknown (and set to 0).

Could you please try the attached patch?
Comment 6 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-10-04 16:44:58 UTC
It works! Tested on 10 and head.
Comment 7 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-10-04 17:31:42 UTC
I never used a RaspberryPi, so my question might be stupid: does it have a video output? If yes, do you see a working console if you plug in a monitor?
Comment 8 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2014-10-04 17:42:04 UTC
At this moment I have just a usb/serial cable. I can test with a monitor but just on next Monday. Maybe someone in freebsd-arm@ can do it.
Comment 9 commit-hook freebsd_committer freebsd_triage 2014-10-04 18:41:14 UTC
A commit references this bug:

Author: dumbbell
Date: Sat Oct  4 18:40:40 UTC 2014
New revision: 272537
URL: https://svnweb.freebsd.org/changeset/base/272537

Log:
  vt(4): Don't recalculate buffer size if we don't know screen size

  When the screen size is unknown, it's set to 0x0. We can't use that as
  the buffer size, otherwise, functions such as vtbuf_fill() will fail.

  This fixes a panic on RaspberryPi, where there's no vt(4) backend
  configured early in boot.

  PR:		193981
  Tested by:	danilo@
  MFC after:	3 days

Changes:
  head/sys/dev/vt/vt_core.c
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-10-13 14:40:18 UTC
A commit references this bug:

Author: dumbbell
Date: Mon Oct 13 14:40:01 UTC 2014
New revision: 273037
URL: https://svnweb.freebsd.org/changeset/base/273037

Log:
  vt(4): Don't recalculate buffer size if we don't know screen size

  (MFC of r272537)

  When the screen size is unknown, it's set to 0x0. We can't use that as
  the buffer size, otherwise, functions such as vtbuf_fill() will fail.

  This fixes a panic on RaspberryPi, where there's no vt(4) backend
  configured early in boot.

  PR:		193981
  Tested by:	danilo@

Changes:
_U  stable/10/
  stable/10/sys/dev/vt/vt_core.c
Comment 11 commit-hook freebsd_committer freebsd_triage 2014-10-14 19:10:55 UTC
A commit references this bug:

Author: dumbbell
Date: Tue Oct 14 19:10:00 UTC 2014
New revision: 273104
URL: https://svnweb.freebsd.org/changeset/base/273104

Log:
  vt(4): Don't recalculate buffer size if we don't know screen size

  MF10:	r273037
  MFC:	r272537

  When the screen size is unknown, it's set to 0x0. We can't use that as
  the buffer size, otherwise, functions such as vtbuf_fill() will fail.

  This fixes a panic on RaspberryPi, where there's no vt(4) backend
  configured early in boot.

  PR:		193981
  Tested by:	danilo@
  Approved by:	re (marius)

Changes:
_U  releng/10.1/
  releng/10.1/sys/dev/vt/vt_core.c