Problem with hybrid L4Linux task

Frank Mehnert fm3 at os.inf.tu-dresden.de
Mon Sep 19 17:58:56 CEST 2005


Hi Mathias,

On Monday 19 September 2005 17:45, Mathias Krause wrote:
> I've got a problem with a hybrid Linux Task. I want to create a little
> tool to tranfser data between two L4Linuxes easily. A tool similar to
> the famous netcat but using IPC instead of UDP/TCP. So far so good.
> Server is listen for client and client is sending data to the server
> (using long IPC transfering data as dwords). The problem is that the
> data doesn't arrive at the server task. There only an empty IPC message
> gets received (no IPC error).

Try to debug this issue using the kernel debugger. What does the IPC log
say (options I* and IR+, what msgdope is displayed)?

> After I've played around a while with debug messages I got strange
> results. Using debug messages (simple printf()) inbetween and the
> transfer succedes!
>
> Digging a little deeper got me to the point that it must be a problem
> with the compiler. Using 'gcc -O0' generates working code too - 'gcc -O2'
> doesn't. Trying another compiler (gcc version 4.0.1 (Debian 4.0.1-2))
> with -O2 got me also working code.

Maybe the compiler optimizes some code away. I assume that you tried the
last version of L4Linux 2.6 -- Adam changed many things to get hybrid
tasks working.

> So my question is if really my gcc (version 3.3.5 (Debian 1:3.3.5-13))
> is broken or the includes under l4/l4sys/.../ipc.h. Maybe the inline
> assembly isn't that clean? But just a guess. My GNU assembly knowlegde
> isn't that good.

We cannot guarantee that the bindings are bug-free but they have been
tested for a long time. Do you use any special compiler switches besides
-O2? Do you use -fomit-frame-pointer? Try without. Do you use -fstrict-
aliasing? Try with -fno-strict-aliasing as defined in l4/mk/binary.inc.

> PS: I'm runing Debian sarge over here.

Should be fine. Actually I use gcc-3.4 but have used gcc-3.3 for a long
time. gcc-4 is still not supported for the L4env tree.

If nothing helps you could send me the source/binary so I'm able to
investigate a little bit more.

Frank
-- 
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3                                     ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20050919/57b9346c/attachment-0001.sig>


More information about the l4-hackers mailing list