[Bug 217319] New: Silent bootsplash drops to 'verbose mode' when freezing processes and console 1 is active
https://bugzilla.novell.com/show_bug.cgi?id=217319 Summary: Silent bootsplash drops to 'verbose mode' when freezing processes and console 1 is active Product: openSUSE 10.2 Version: Beta 1 plus Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Kernel AssignedTo: mls@novell.com ReportedBy: hmacht@novell.com QAContact: qa@suse.de CC: pavel@novell.com On suspend, userland and some parts of the kernel are frozen. When the virtual console 1 is active (where the bootsplash usually resides) is active on that freeze call, the silent image drops to verbose mode. I had a workaround in the suspend tools (suspend.sf.net) to solve this. I switched to console 1 _after_ the call to 'freeze'. But this doesn't work anymore because the console where the suspension is done is locked to prevent dumb users to switch to X after processes are frozen. I'll attach a simple C source file which makes it possible to easyly reproduce the issues. There some different scenarios to test: (1) - Silent splash on console 1 - Active console is 7 (or any other except 1) - Starting the test program (attached) switches to console 1 - When the 'freeze call' happens, the bootsplash drops to 'verbose mode' (2) - Silent splash on console 1 - Active console is 7 (or any other except the first) - When you don't switch to console 1 when the call to freeze happens, the freeze doesn't lead the silent splash on console 1 to disappear (3) - Silent splash on console 1 - Active console is 1 - _Foreground_ process running on console 1 (e.g. 'sleep 1000') - Call to freeze doesn't lead the silent splash on console 1 to disappear (3) is the same as (4) - starting the test program from console 1(which is a foreground process) also doesn't lead to the strange behaviour. That's the reason why I didn't notice this earlier because I always tested suspend from console 1. It's really strange, because at first I thought that if there is no foreground process on console 1, the console is just frozen. But if it is not active, console 1 isn't frozen either. However, best solution would be to be able to show the silent bootsplash image on the console (usually 63) where suspension happens. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #1 from hmacht@novell.com 2006-11-02 04:35 MST ------- Created an attachment (id=103486) --> (https://bugzilla.novell.com/attachment.cgi?id=103486&action=view) Test program which switches consoles and does a freeze-unfreeze -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #2 from hmacht@novell.com 2007-02-05 05:21 MST ------- ping -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 pavel@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Minor ------- Comment #3 from pavel@novell.com 2007-02-05 05:44 MST ------- Holger: I do not think this is _major_ problem. We are talking graphics uglyness here, right? I guess it happens in more than suse10.2beta, right? (Is it even worth fixing? Perhaps we should just fix it for 10.3). Michael, this bug has been "NEW" for 3 months now. You should at least change it to "ASSIGNED" if you are working on it, or explain why you don't (and close it). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 hmacht@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Kernel |Kernel Product|openSUSE 10.2 |openSUSE 10.3 Version|Beta 1 plus |Alpha 0plus ------- Comment #4 from hmacht@novell.com 2007-02-05 05:49 MST ------- (In reply to comment #3)
Holger: I do not think this is _major_ problem. We are talking graphics uglyness here, right? I guess it happens in more than suse10.2beta, right?
It was a feature for 10.2, therefore the major prioritization. And yes, it's just about graphics, right. And yes, still present in newer versions ;-)
(Is it even worth fixing? Perhaps we should just fix it for 10.3).
Yes, 10.3 should be ok.
Michael, this bug has been "NEW" for 3 months now. You should at least change it to "ASSIGNED" if you are working on it, or explain why you don't (and close it).
That's the reason for the 'ping' ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #5 from mls@novell.com 2007-02-05 07:02 MST ------- Well, this bug fell of my bugzilla list, sorry. Anyway, I don't see anything that I can change, what do you expect me to do here? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #6 from hmacht@novell.com 2007-02-05 07:11 MST ------- Well, silent splash should not vanish when freeze processes is called and bootplash is active. That's a bug of bootsplash code in kernel, isn't it? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #7 from mls@novell.com 2007-02-05 07:23 MST ------- It vanishes iff someone reads from the console. This is not a bug in the bootsplash code. The question, of course, is which process is reading in the freeze case. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #8 from pavel@novell.com 2007-02-06 16:29 MST ------- Michael, can you pinpoint the "vanishing" operation, and maybe place a WARN_ON() there, so that we can learn what action actually triggers that? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #9 from mls@novell.com 2007-02-06 16:55 MST ------- Just search for CONFIG_BOOTSPLASH in drivers/char/n_tty.c -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 hmacht@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |249956 nThis| | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #10 from hmacht@novell.com 2007-04-03 11:45 MST ------- The corresponding code is the following: #ifdef CONFIG_BOOTSPLASH if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) || file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) || file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) || file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) { extern int splash_verbose(void); (void)splash_verbose(); } #endif There are two further occurrences of splash_verbose() in the kernel. One in keyboard.c and one in panic.c. Bootplash should vanish on "panic" and on Escape, aka keyboard event, so what does this code actually do? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #11 from mls@novell.com 2007-04-04 05:49 MST ------- See #7. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #12 from hmacht@novell.com 2007-04-04 06:05 MST ------- Why should it vanish in this case? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #13 from mls@novell.com 2007-04-04 08:22 MST ------- Because the user has to enter something. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #14 from hmacht@novell.com 2007-04-04 14:23 MST ------- What I was able to find out, maybe it's helpful. In function try_to_freeze_tasks(...) from kernel/power/process.c, we iterate over all processes and try to freeze them. Inside this loop, also each thread from the process is tried to be frozen. The bootsplash vanishes _after_ the userspace process 'splash' has been frozen and _before_ the next process will be frozen. So why does the silent splash vanish when 'splash' is frozen? And why only if the bootsplash console is active? I added some debugging output: Apr 4 21:56:37 homac kernel: freeze_process: 4308 , splash Apr 4 21:56:37 homac kernel: before freeze(p) Apr 4 21:56:37 homac kernel: after freeze(p) Apr 4 21:56:37 homac kernel: after freeze_process: 4308 Apr 4 21:56:37 homac kernel: do_each_thread iteration: 4309 Apr 4 21:56:37 homac kernel: yield Apr 4 21:56:37 homac kernel: BUG: at drivers/video/bootsplash/bootsplash.c:597 splash_verbose() Apr 4 21:56:37 homac kernel: [<c01e5c75>] splash_verbose+0x2e/0xd6 Apr 4 21:56:37 homac kernel: [<c0214955>] read_chan+0x2ab/0x586 Apr 4 21:56:37 homac kernel: [<c011b936>] __wake_up+0x32/0x43 Apr 4 21:56:37 homac kernel: [<c020fc07>] tty_ldisc_try+0x2e/0x32 Apr 4 21:56:37 homac kernel: [<c011d742>] default_wake_function+0x0/0xc Apr 4 21:56:37 homac kernel: [<c02146aa>] read_chan+0x0/0x586 Apr 4 21:56:37 homac kernel: [<c0211d3f>] tty_read+0x64/0xac Apr 4 21:56:37 homac kernel: [<c0211cdb>] tty_read+0x0/0xac Apr 4 21:56:37 homac kernel: [<c0169eaf>] vfs_read+0xa6/0x12e Apr 4 21:56:37 homac kernel: [<c016a2b3>] sys_read+0x41/0x67 Apr 4 21:56:37 homac kernel: [<c0104d14>] sysenter_past_esp+0x5d/0x89 Apr 4 21:56:37 homac kernel: [<c02b0000>] __down_interruptible+0x86/0x10c Apr 4 21:56:37 homac kernel: ======================= Apr 4 21:56:37 homac kernel: do iteration Apr 4 21:56:37 homac kernel: do_each_thread iteration: 1 Apr 4 21:56:37 homac kernel: do_each_thread iteration: 2 Apr 4 21:56:37 homac kernel: do_each_thread iteration: 3 That's all from me, I ran out of ideas ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #15 from hmacht@novell.com 2007-04-05 03:13 MST ------- Maybe worth to mention: Silent bootsplash doesn't drop _directly_ after process/thread 'splash' is frozen. It freezes after all threads of the process have been frozen, namely at the call to yank() int process.c. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #16 from mls@novell.com 2007-04-05 04:49 MST ------- Ran out of ideas? Just add a little printk that prints the id and name of the process that does the tty read. I think it's: current->pid and current->comm. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #17 from hmacht@novell.com 2007-04-05 07:41 MST ------- What a suprise, it's mingetty. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 hmacht@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nld-maint@forge.provo.novell.com ------- Comment #18 from hmacht@novell.com 2007-04-25 09:21 MST ------- *** Bug 7889 has been marked as a duplicate of this bug. *** -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319 ------- Comment #20 from hmacht@novell.com 2007-06-07 17:51 MST ------- Coming back to comment #17, this doesn't have anything to do with a specific buggy application erroneously reading from /dev/tty1. Killing every process which could be reading from /dev/tty1, including mingetty and zsh/bash, the following code causes the silent bootsplash to drop when processes are frozen. int main(int argc, char *argv[]) { int fd; char c; fd = open ("/dev/tty1", O_RDWR, 0); read (fd, &c, 1) return 0; } Sounds sane considering that bootsplash drops when someone is reading from tty1 ;-) When processes are frozen, the fd somehow becomes 'active' as if it would be newly opened. What does exactly happen in this case? I already checked if a SIGIO is raised, but it is not. The only workaround I would have would be to implement a small "suspend save mode" in which the bootsplash kernel code ignores reads from the tty. We have full control of what's happening at this time in userland. The freeze() call could be wrapped around by this mode. Otherwise we could never be sure to prevent verbose bootsplash mode. Just an idea... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=217319#c22 Holger Macht <hmacht@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #22 from Holger Macht <hmacht@novell.com> 2007-08-04 11:54:04 MST --- Because we're husing splashy for suspend/resume now, I'm closing this as wontfix to be able to close bug 249956. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com