[Barrelfish-users] Assertion fired when calling "nameserver_register" function

M Brown M.Brown at huawei.com
Thu Jan 9 18:48:07 CET 2014


Kornilios,

   I believe that I have found a bug in the nameserver. The problem appears to be in the use of the nameserver functions in multiple threads running on a single core. In this case the nameserver functions are non-reentrant. To illustrate this I took your message example (xmpl-msg) and wrapped both the client and server functions in separate threads and ran the application on a single core. The same assertion fired as illustrated below:



[cid:image001.png at 01CF0D2F.B983CB80]



The nameservice blocking lookup is invoked by the client application near the beginning to get the iref. The server then tries to register the iref in the nameserver and gets the assertion.



In general for the nameserver to be useful, it needs to be accessible by any number of threads running on any number of cores in a concurrent manner.



Thanks,



Mark Brown

Huawei Technologies Inc.

5340 Legacy Dr., Suite 175

Plano, TX 75024

Tel: 469-277-5700 x5870

Email: m.brown at huawei.com



-----Original Message-----
From: Kornilios Kourtis [mailto:kornilios.kourtis at inf.ethz.ch]
Sent: Thursday, December 19, 2013 6:33 AM
To: M Brown
Cc: barrelfish-users at lists.inf.ethz.ch
Subject: Re: [Barrelfish-users] Assertion fired when calling "nameserver_register" function



Dear Mark,



On Mon, Dec 16, 2013 at 05:38:37PM +0000, M Brown wrote:

> Guys,

>

>    I’m getting the following assertion fired when calling the

>    nameserver_register function from within an export callback

>    function:

>

> [cid]

>

> The example message test works fine. The structure of the code I have

> is as follows:

>

> main {

>                 thread_create(myTask, NULL);

>                 .

>                 .

>                 .

> }

>

> int myTask(void* arg) {

>                 .

>                 .

>                 .

>                 <iface>_export(NULL,

>                                export_cb, connect_cb,

>                                get_default_waitset(),

>                                IDC_EXPORT_FLAGS_DEFAULT);

>

> }

>

> void export_cb(void *st, errval_t err, iref_t iref) {

>                 .

>                 .

>                 .

>                 // The assertion fires within this invocation

>                 nameserver_register(“iface”, iref); }

>

> Is there something I’m doing wrong here?



[I'm guessing you mean nameservice_register() above]



Judging from the failed assertion (!_rpc->rpc_in_progress), I'm guessing that it might have something to do with using multiple threads. What are the other threads doing? Can you reproduce the problem when using a single thread?



cheers,

Kornilios.



--

Kornilios Kourtis



_______________________________________________

Barrelfish-users mailing list

Barrelfish-users at lists.inf.ethz.ch<mailto:Barrelfish-users at lists.inf.ethz.ch>

https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20140109/a4b08fe0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8724 bytes
Desc: image001.png
Url : https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20140109/a4b08fe0/attachment-0001.png 


More information about the Barrelfish-users mailing list