Hi Adam,
I got another trace:
Chen: caps_alloc for virt addr 0xf081f010 (index 0x1f01), new cap location 0xfec93000, [virt 0xf081f000-> mem 0xfec93000] in space 0xfedd7f08, s = 0x0
Chen: caps_alloc for virt addr 0xf081f000 (index 0x1f00), new cap location 0xfec92000, [virt 0xf081f000-> mem 0xfec92000] in space 0xfedd7f08, s = 0x0
thread 0xfed4c000: v_fabricate is false: (Obj_space) from [0xfedd7ef4/12], s_phys 0x0: 00001f01 size: 00000001 to [0xfedd7e9c/18] recv addr 0x1e8f
KERNEL: Warning: nothing mapped: (Obj_space) from [0xfedd7ef4/12]: 00001f02 size: 00000001 to [0xfedd7e9c/18] recv addr 0x1e90
Chen: v_delete on cap 0xfecf33b4 for virt addr 0x1ef8 (entry addr 0xfec90f80) in space 0xfedd7f08
As you can see, the status variable "s" is Insert_OK for two invocations of caps_alloc. That means mem_space()->v_insert function is not safe either? Why two insertions are successful at the same time on the same virtual address?
I have put a lock to protect l4_factory_create_xxx in my application and that seems to work.
Best,
Chen
Send l4-hackers mailing list submissions to
l4-hackers@os.inf.tu-dresden.de
To subscribe or unsubscribe via the World Wide Web, visit
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
or, via email, send a message with subject or body 'help' to
l4-hackers-request@os.inf.tu-dresden.de
You can reach the person managing the list at
l4-hackers-owner@os.inf.tu-dresden.de
When replying, please edit your Subject line so it is more specific
than "Re: Contents of l4-hackers digest..."
Today's Topics:
1. Re: race condition in obj_space-virt.cpp ? (Adam Lackorzynski)
----------------------------------------------------------------------
Message: 1
Date: Mon, 16 Jan 2012 23:54:07 +0100
From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: l4-hackers@os.inf.tu-dresden.de
Subject: Re: race condition in obj_space-virt.cpp ?
Message-ID: <20120116225406.GA6550@os.inf.tu-dresden.de>
Content-Type: text/plain; charset=iso-8859-1
On Fri Jan 13, 2012 at 16:37:06 -0800, Chen Tian wrote:
> Hello,
>
> I observed a race condition in Fiasco.OC. My environment is very
> complicated, but basically I have multiple threads, and each thread keep
> creating kernel object via l4_factory_create_xxxx and map the object to a
> new task.
>
> Here is the trace I got:
Thanks, we're looking into this.
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
------------------------------
_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
End of l4-hackers Digest, Vol 105, Issue 5
******************************************