|
Boost Users : |
From: Patel Priyank-PPATEL1 (priyankpatel_at_[hidden])
Date: 2006-05-10 08:57:21
Hi Joaquin,
Thanks for your response. Let me try to answer as much as I can for your questions. Also, I am looking in more detail today. It most probably problem in my side.
1. Does this happen the first time remove_by_id() is called or after some running time?
=> No. I am adding/removing data in multiindex container every 10 millisecond. It runs fine for certain time period without problems.
Core dump happens after some time or execution (it varies though 1 min to 5 min or so.)
2. When the crash happens, do you have some debugging tool which allows you to inspect the contents of the _procedure variable passed to remove_by_id()?
=> I only have gdb. But I am going to put some print out statements in remove_by_id() method and see what it receives.
3. Note that Procedure_Pool holds *pointers* to Procedure. Could it be, when remove_by_id() crashes, that the Procedure object pointed to by _procedure is already deleted? Check the unsubscribe() routines and all the other procedures listed in the stack trace.
=> Sure. Let me do that and will get back to you on this one.
4. Remember we were talking about why you cannot change directly the Procedure internal variables, but instead you have to use the updating mechanisms provided by Boost.MultiIndex, as described at:
http://boost.org/libs/multi_index/doc/tutorial.html#ord_updating
The original discussion was at
http://lists.boost.org/boost-users/2006/04/18814.php
Are you respecting this? Could it be you have inadvertently changed some procedure id by calling some member function of Procedure interface?
=> Yes. At this point I am not changing anything in procedure object that used by multiindex function calls after creating procedure.
Let me verify this one too again.
5. You are using hashed indices, try, just for testing purposes, replacing them with ordered indices (in principle, you will only have to change the Procedure_Hashed_Pool typedef) Rerun: does the crash still persist?
=> Sure let me try this first. I used hashed index to improve performance. But I can change and try it out. Will get back to you
On this one too. First I will try this.
Thanks a lot for your reply on this one. Really appreciate your help.
Thanks
Priyank
-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of JOAQUIN LOPEZ MU?Z
Sent: Tuesday, May 09, 2006 3:35 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [multi_index] Core dump in multi-index library !!
Patel Priyank-PPATEL1 ha escrito:
> Hi all,
>
> I am getting following error in boost multi-index library. I am using
> following code to add and remove procedures by id in multi index
> container. Can somebody please let me know what might be wrong here?
> Really appreciate your quick response on this.
[...]
Hello Priyank,
OK, I've got some questions to ask and some things for you to check. Let's see if we nail the problem down.
1. Does this happen the first time remove_by_id() is called or after some running time?
2. When the crash happens, do you have some debugging tool which allows you to inspect the contents of the _procedure variable passed to remove_by_id()?
If so, does the object look OK, or garbled?
3. Note that Procedure_Pool holds *pointers* to Procedure. Could it be, when remove_by_id() crashes, that the Procedure object pointed to by _procedure is already deleted? Check the unsubscribe() routines and all the other procedures listed in the stack trace.
4. Remember we were talking about why you cannot change directly the Procedure internal variables, but instead you have to use the updating mechanisms provided by Boost.MultiIndex, as described at:
http://boost.org/libs/multi_index/doc/tutorial.html#ord_updating
The original discussion was at
http://lists.boost.org/boost-users/2006/04/18814.php
Are you respecting this? Could it be you have inadvertently changed some procedure id by calling some member function of Procedure interface?
5. You are using hashed indices, try, just for testing purposes, replacing them with ordered indices (in principle, you will only have to change the Procedure_Hashed_Pool typedef) Rerun: does the crash still persist?
Hopefully, some of thes points will shed some more light. Looking fwd to your reporting.
On a side note, your code shows a Procedure_Hashed_Pool with only one index, yet you define two views on it, namely pool_ and procedure_by_id_, which are the same. This is at most superfluous, although maybe what you have sent is some reduced form of the original code.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net