celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Re: Remote service using shared mem
Date Tue, 17 Sep 2013 17:50:23 GMT
I did some more testing/debugging and have some changes :)

1) In remote_services/CMakeLists.txt you re-enabled the inclusion of the
utils directory.

2) The thread in Discovery and the RSA itself do not have a return value,
also the thread_exit is only called if a precondition is met, otherwise the
method just return without an exit. This can be solved by always calling
apr_thread_exit and returning NULL at the end.

3) As mentioned in the other mail, the RSA needs to be updated for
CELIX-82. Simple fix, take a look at the other RSA for the code :).

4) When creating a thread in the RSA you add a NULL pointer to the hashmap
and only later on create an actual pointer. This results in a NULL pointer
in the hashmap and the pointer to the thread being "lost".  Simply putting
the thread pointer in the hashmap after thread creation is enough to fix
this. This one was also the reason for the segfault when the framework
stops and not the use of shmem etc.

Ps: I can make those changes and add the code, but if you prefer to verify
my remarks and make a new patch I can wait a bit.

Pps: The code looks good! And together with a few simple fixes Pepijn
committed today I think not a lot of extra work is needed before committing
this.





2013/9/17 Alexander Broekhuis <a.broekhuis@gmail.com>

> Hi,
>
> Unrelated to the previous problems, Pepijn today fixed issue CELIX-82 [1].
> This also requires an update in the SHM code. Could you also port that
> change to your code?
>
> 2013/9/17 Björn Petri <bjoern.petri@sundevil.de>
>
>>
>> Hi Alexander,
>>
>> I already updated the issues we spoke about, so stopping the
>> example-service does not segfault any more.
>
>
> I tried a bit with the new patch, and still have a problem. I haven't
> tested it in detail, but during the stop of the RSA something unexpected
> happens.
>
> The problem reported is: celix(82209,0x10ff7a180) malloc: *** error for
> object 0x7f9ff48dda00: pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
>
> A reason for such errors can be the use of pools and still freeing
> pointers. If a pointer which is in a pool is being freed, during the apr
> shutdown it is freed again.
> In this case I suspect it has to do with the use of APR for some shmem
> functions, while other parts are done using standard (low level) api calls.
>
>
> [1]: https://issues.apache.org/jira/browse/CELIX-82
>
>
> --
> Met vriendelijke groet,
>
> Alexander Broekhuis
>



-- 
Met vriendelijke groet,

Alexander Broekhuis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message