Re: [HelenOS-devel] GUI problems

2012-08-31 Thread Vojtech Horky
Hi.

2012/8/31 Jiri Svoboda jirik.svob...@seznam.cz:
 HI,

 Jakub wrote:
 Not
 sure if log_msg() is suitable for logging from the async framework.
 Perhaps klog_printf() could do.
 Several points here:
 nbsp;- log_msg() called from async framework introduces a dangerous 
 layer-reversal - lower layer - async - calls to higher level - log_msg() 
 (which depends on VFS), leading to the possibility of deadlocks
 nbsp;- I don't think libraries should log anything to system logs, in 
 general, unless the logging is explicitly enabled for debugging purposes - I 
 have this from hands-on experience in Solaris
 nbsp;- in case of libraries errors should be propagated to the caller, not 
 logged out of band and out of control of the caller
 nbsp;- log_msg cannot be currently used in libraries because it does not 
 support contexts yet. It would clash with application using the same facility
In my logging branch [1] I did some improvements to the logging that
covers the problems mentioned above. It needs some cleaning but I am
planning to merge it some time next week.

I plan to document the features in the wiki in more detail, but
briefly it allows following:
- specify different logs - e.g. it is possible that each device in a
driver would have its own log (that could be, for example, printed to
a separate file)
- the different logs allows for logging for libraries as each library
could (on initialization) create its own log and use that instead of
the default one
- create hierarchy of these logs (e.g. have separate log for each USB
pipe of a USB device)
- specify reported level for each log at runtime - e.g. print all
devman messages but only fatal errors of certain driver etc.
- specify reported level for each log at boot time via GRUB parameters

Currently, everything is logged into a file but it shall not be that
difficult to add sending the messages to a different target, such as
socket, for example.

- Vojta

[1] https://code.launchpad.net/~vojtech-horky/helenos/logging

 Cheers
 Jiri

 ___
 HelenOS-devel mailing list
 HelenOS-devel@lists.modry.cz
 http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


Re: [HelenOS-devel] GUI problems

2012-08-30 Thread Jiri Svoboda
HI,

Jakub wrote:
 Not
 sure if log_msg() is suitable for logging from the async framework.
 Perhaps klog_printf() could do.
Several points here:
nbsp;- log_msg() called from async framework introduces a dangerous 
layer-reversal - lower layer - async - calls to higher level - log_msg() (which 
depends on VFS), leading to the possibility of deadlocks
nbsp;- I don't think libraries should log anything to system logs, in general, 
unless the logging is explicitly enabled for debugging purposes - I have this 
from hands-on experience in Solaris
nbsp;- in case of libraries errors should be propagated to the caller, not 
logged out of band and out of control of the caller
nbsp;- log_msg cannot be currently used in libraries because it does not 
support contexts yet. It would clash with application using the same facility

Cheers
Jiri

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


Re: [HelenOS-devel] GUI problems

2012-08-29 Thread Martin Sucha
 Let me check if I can reproduce the problem on ia32 and whether this change 
 fixes it.
Although an overflow may be occurring, I wasn't able to reproduce on ia32 using 
latest mainline.

Jiri, could you please try to reproduce the problem with an older revision, 
such as mainline,1615?

Thanks.

Martin Sucha

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


[HelenOS-devel] GUI problems

2012-08-28 Thread Jiří Zárevúcky
I've finally got to update to the latest revision to check out the GUI.
My first impression was awesome... but then it just freezes.

I'm compiling latest upstream code with default i386 configuration,
launching with qemu-system-i386 -cdrom image.iso on an up-to-date
ArchLinux 64b desktop. It freezes every time I try to move the
terminal window that launches on startup, completely ignoring all
input from that point onwards - even mouse freezes and it's impossible
to switch to kernel console.

Any idea what might be wrong, or how to figure out the cause?

-- Jiří Zárevúcky

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


Re: [HelenOS-devel] GUI problems

2012-08-28 Thread Martin Decky

Any idea what might be wrong, or how to figure out the cause?


My initial idea would be that the GUI is simply too slow (if not running 
in KVM), maybe a lot of patience might help. But I am unable to 
reproduce the behaviour you report in my older QEMU 0.15.1, so the 
possibility that it is a hard bug is still open.


I would suggest to temporarily change the kernel variable 
console_override (in kernel/generic/src/console/console.c) to true, so 
that you can see all debugging messages, including any possible task 
crashes.



M.D.

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


Re: [HelenOS-devel] GUI problems

2012-08-28 Thread Jiří Zárevúcky
On 28 August 2012 21:27, Martin Decky mar...@decky.cz wrote:
 Any idea what might be wrong, or how to figure out the cause?


 My initial idea would be that the GUI is simply too slow (if not running in
 KVM), maybe a lot of patience might help. But I am unable to reproduce the
 behaviour you report in my older QEMU 0.15.1, so the possibility that it is
 a hard bug is still open.

Not likely, I've left it running for 10 minutes and nothing changed.


 I would suggest to temporarily change the kernel variable console_override
 (in kernel/generic/src/console/console.c) to true, so that you can see all
 debugging messages, including any possible task crashes.


It's possible to trigger the freeze while in the kernel console, and
fortunately it reacts after the GUI has frozen, but there is no crash
that would seem relevant (although i8042 crashed a few seconds after
the freeze, which I took a screenshot of and opened a ticket for).

___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel


Re: [HelenOS-devel] GUI problems

2012-08-28 Thread Petr Koupý
 It freezes every time I try to move the
 terminal window that launches on startup, completely ignoring all
 input from that point onwards - even mouse freezes and it's impossible
 to switch to kernel console.

Does it freeze even when you move the window by keyboard (Alt+WSAD)?
Not that it would mean anything particular, but there is much more
code involved when moving window by mouse, so it is valuable
information for tracking down the potential bug.

 Any idea what might be wrong, or how to figure out the cause?

When I hit those kind of problems during GUI implementation, the best
approach for me was to add debug printouts into the code, boot, switch
to kernel console before doing anything else and finally reproduce
the problematic situation by blindly clicking to where the window
is supposed to be.

 It's possible to trigger the freeze while in the kernel console, and
 fortunately it reacts after the GUI has frozen, but there is no crash
 that would seem relevant

If there is no crash, then something is probably (infinitely) looping.
While it could be anything, I would like to mention one particular
case which I encountered and debugged few times during the development.
Since coordinates are represented as unsigned integer, there could be
underflow error causing some for loop to traverse whole integer range.
However, when such thing happened, GUI did not freeze completely, it
was just extremely slow but still alive (e.g. cursor movement was
sluggish but visible).

 My initial idea would be that the GUI is simply too slow

Regarding all the already mentioned bugs and overall slowness, I am 
sorry I currently cannot devote any time to look into these matters 
and implement suggested optimizations (http://trac.helenos.org/ticket/485). 
My plan is to resume work on GUI in the beginning of November. Till then,
I am able to just observe any actions related to GUI and perhaps involve
in mailing list discussions.

PK  


___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel