From: Helge H. <hel...@ai...> - 2004-05-28 07:14:47
|
Aivils wrote: >On Thursday 27 May 2004 15:40, Helge Hafting wrote: > > >>Aivils wrote: >> >> >> >>>Hi All! >>> >>> CVS now contains linux-ruby against 2.6.6. >>> >>>FBIOGET_CON2FBMAP, FBIOSET_CON2FBMAP ioctl() uses >>>dummy call. >>> >>> >>> >>> >>Thanks for the good work - ruby-2.6.6 works for me. >>There is a small problem where I get 998 messages in >>/var/log/messages during startup. >>This slows startup down with abouit half a minute, >>but doesn't seem to have other problems: >>One run: >> >>May 26 22:57:27 monster kernel: Badness in vc_resize at >>drivers/char/vt.c:1095 >>May 26 22:57:27 monster kernel: Call Trace: >>May 26 22:57:27 monster kernel: [<c0208ad4>] vc_resize+0x3b4/0x3c0 >>May 26 22:57:27 monster kernel: [<c0128678>] notifier_call_chain+0x18/0x40 >>May 26 22:57:27 monster kernel: [<c0283999>] fb_resize_vt+0x59/0x70 >>May 26 22:57:27 monster kernel: [<c0283b17>] fb_ioctl+0x167/0x340 >>May 26 22:57:27 monster kernel: [<c0134391>] unlock_page+0x11/0x60 >>May 26 22:57:27 monster kernel: [<c014aaa9>] exclusive_swap_page+0x39/0x90 >>May 26 22:57:27 monster kernel: [<c0134391>] unlock_page+0x11/0x60 >>May 26 22:57:27 monster kernel: [<c014109d>] do_wp_page+0x7d/0x2f0 >>May 26 22:57:27 monster kernel: [<c014613d>] __pte_chain_free+0x4d/0x50 >>May 26 22:57:27 monster kernel: [<c015f5dc>] sys_ioctl+0xec/0x25a >>May 26 22:57:27 monster kernel: [<c0106cff>] syscall_call+0x7/0xb >>May 26 22:57:28 monster kernel: >> >> > > > >>Then the machine was reset, probably by me. >> >>The log then contains a restart followed by about 900 of these >>vc_restart messages. >> >>Could this be a ruby problem, or some sort of framebuffer problem? >> >> > >ruby needs for tousends of acquire_console_sem();release_console_sem(); >pairs. > >Please try this patch, on succes i upload subject on CVS. > > I tested it. It doesn't compile as-is. That seemed to be a trivial missing pair of curly braces, so I added them. (See below) Then it compiled, with the following warnings: drivers/video/fbmem.c: In function `fb_resize_vt': drivers/video/fbmem.c:1014: warning: implicit declaration of function `acquire_console_sem' drivers/video/fbmem.c:1016: warning: implicit declaration of function `release_console_sem' Probably a missing header - it linked and gave me a kernel. It hung, though. Could this be the problem, or is it a more difficult deadlock issue with the semaphore? The kernel hung after initializing the framebuffers, before setting up fbcon. So all I got was a screenful of pre-fbcon garbage. It is interesting to note that the first keyboard was dead, it did not react to "numlock" or sysrq sequences. The second keyboard was fine, it reacted to numloc/capslock by turning the LEDs on/off as usual, and I could sync & reboot using sysrq sequences there. My guess is that this looks like some sort of deadlock. Perhaps the console semaphore isn't free, or something else needs it? Do the "printk" that tells us about "160x64 color fbcon takeover" need the semaphore? Only one console locked up. >diff -Nurp ruby-CVS-20040525/drivers/video/console/fbcon.c ruby-CVS-20040527/drivers/video/console/fbcon.c >--- ruby-CVS-20040525/drivers/video/console/fbcon.c 2004-05-24 21:26:48.000000000 +0300 >+++ ruby-CVS-20040527/drivers/video/console/fbcon.c 2004-05-27 18:06:46.000000000 +0300 >@@ -761,7 +761,9 @@ static void fbcon_set_display(struct vc_ > if (!init) { > > if (vc->vc_cols != nr_cols || vc->vc_rows != nr_rows) > > Added a { here >+ acquire_console_sem(); > vc_resize(vc, nr_cols, nr_rows); >+ release_console_sem(); > > Added a } here. Without these braces I got a syntax error on the "else" on the next line. > else if (IS_VISIBLE && > vc->vc_mode == KD_TEXT) { > accel_clear_margins(vc, info, 0); >@@ -1842,7 +1844,9 @@ static int fbcon_do_set_font(struct vc_d > && (info->var.yres_virtual % h < info->var.yres % h)) > p->vrows--; > updatescrollmode(p, vc); >+ acquire_console_sem(); > vc_resize(vc, info->var.xres / w, info->var.yres / h); >+ release_console_sem(); > if (IS_VISIBLE && softback_buf) { > int l = fbcon_softback_size / vc->vc_size_row; > if (l > 5) >diff -Nurp ruby-CVS-20040525/drivers/video/fbmem.c ruby-CVS-20040527/drivers/video/fbmem.c >--- ruby-CVS-20040525/drivers/video/fbmem.c 2004-05-24 21:26:48.000000000 +0300 >+++ ruby-CVS-20040527/drivers/video/fbmem.c 2004-05-27 18:07:10.000000000 +0300 >@@ -1010,8 +1010,11 @@ fb_resize_vt(struct fb_info *info) > vc = vt->default_mode; > vc->vc_cols = info->var.xres/vc->vc_font.width; > vc->vc_rows = info->var.yres/vc->vc_font.height; >- for(i = 0; i < vt->vc_count; i++) >+ for(i = 0; i < vt->vc_count; i++) { >+ acquire_console_sem(); > vc_resize(vt->vc_cons[i], vc->vc_cols, vc->vc_rows); >+ release_console_sem(); >+ } > return 0; > } > > > I hope this bug report can be of help, Helge Hafting |