IPC problem with dice-3.3.0

Carsten Weinhold weinhold at os.inf.tu-dresden.de
Wed Mar 18 18:19:09 CET 2009


Am 18.03.2009 um 17:10 schrieb Marcel Selhorst:

> Hi l4-hackers,

Hi Marcel.

> I am currently having some issues with dice-3.3:
>
> First of all, the dice-generated code differs in header- and client  
> file,
> meaning that the header defines functions with
>
> int DICE_CV
> somefunction()
>
> while the outcoming c-file is
>
> int
> somefunction()
>
> This leads to compile errors due to conflicting declarations...
>
> But as soon as you remove DICE_CV, everything compiles fine.

It seems that some compilers are indeed not very happy about this. We  
are looking into it. For the time being please use your workaround (or  
maybe modify your compiler flags, if you pass additional warning- 
related flags).

Other comments regarding your IPC problem are below.

> The second problem I have regards IPC-calls:
> [...]
> ==
> static l4_threadid_t threadId;
> static CORBA_Environment env;

This is wrong. Please use the DICE_DECLARE_ENV macro to declare and  
properly initialize the CORBA environment:

DICE_DECLARE_ENV(env);

> [...]
> The native client (started via bmodfs) receives a pagefault, cause  
> it is trying
> to write?! to address 0:
> ==
> dummytest| Dummy found with threadId: 11a0001
> dummytest| L4RM: [PF] write at 0x00000000, ip 02000272, src 11.02
> dummytest| [11.0] l4rm/lib/src/pagefault.c:81:__unknown_pf():
> dummytest|  unhandled page fault
>
>    --PANIC, 'g' for exit------------------------------------IP:  
> 02005755
> [dummy.rm] (11.00) jdb:
> ==
>
> And the L4Linux-client crashes with a segfault:
>
> ==
> dummy_t[42]: segfault at 2 ip 08048312 sp bf4092ec error 6 in
>             dummy_test[8048000+76000]
> ==

The kernel debugger is very useful to find out where exactly the  
program crashes. btt11.2 gives you the backtrace for thread 11.2.

> The strange thing is: If I compile the idl-file with dice-3.2.1, the  
> dummy
> example works, BUT as soon as my interfaces get more complex, e.g.,  
> something
> like this:
>
> int write ([in]  long  start,
>           [in]  long  offset,
>           [in]  long  bytes_to_write,
>           [in,  size_is(write_len), max_is(MAX_PAGE_SIZE)] char   
> *write_buffer,
>           [out] long  *write_len);
>
> IPC crashes with pagefaults / segfaults again even with dice-3.2.1...

Maybe my hint from above fixes this, too. If not, more information is  
required (complete logs, backtraces, ...).

> [...]
> Thanks in advance and best regards,

I hope this helps.

Carsten






More information about the l4-hackers mailing list