As reported in ticket #55 SGSN can crash due to double free-ing. You can replace 'can' by 'will' in that last phrase. I had a sift through the code and tried to solve this by removing the free in gprs_ns.c. Whenever the calling function created the msgb-struct, I have made the function free it after its use. If the function got the msgb from a calling function, there will not be a free (hoping that will be done on the higher level).
HTH/F
On 04/30/2012 05:37 PM, Frank Maas wrote:
Dear Frans,
thanks a lot for your work, I would like to encourage you to revise the patch in several ways. There are some soft factors like using tabs, following the kernel coding style (e.g. not if and msgb_free) on the same line but also some technical issues.
Hello Holgor,
You are probably right, no, you are most certainly right.
However I was facing a rather strict deadline and found that (a) people had reported this and (b) nobody had solved it. Using this patch at least people can go forward in using and trying. When creating this patch I saw that there is no proper line in when "ownership" moves, i.e. who gets responsiblity for free'ing objects. As said: my time was limited and I encountered this project only days before making this patch. So I had no real possibility to really change the core approach.
As I am not sure if we are going to follow through with this path, my thoughts were to share this with you. One can make use of it (at least over days SGSN no longer crashed), or (better) straighten up the code and solve this. I hope it will help someone.
Regards, Frank
On Sun, May 6, 2012 at 7:26 PM, Peter Stuge peter@stuge.se wrote:
VID - Frank Maas wrote:
One can make use of it (at least over days SGSN no longer crashed),
You still saw the issues with the nanoBTS, right?
You are right. The GPRS setup was far from excellent. Not only the nanoBTS had problems (restarting), but also the GPRS connection(s) itself were not stable. However, before patching the issue described in #55, sgsn would crash within 0 - 4 hours after being started. After the patch SGSN never crashed and in a setup with only two GPRS users we have had succes for over a 24 hour period. Which was remarkably good. When using for the real purpose we had more BTS's and more GPRS users and that still... erh... needs some work.
Regards, Frank
,
On 05/06/2012 06:05 PM, VID - Frank Maas wrote:
Hello Holgor,
Hi Frank,
first of all I am happy you patched the software and that you shared it with us. I don't think any of the current developers have the time to properly fix it (I did create the issue to not forget about it). So I wonder and try to encourage you to walk the extra mile(s) with us to fix that issue once and for all.
As I am not sure if we are going to follow through with this path, my thoughts were to share this with you. One can make use of it (at least over days SGSN no longer crashed), or (better) straighten up the code and solve this. I hope it will help someone.
Ideally we would like to help you to create a patch that fixes this issue once and for all.
holger
Hi Holger,
I share your thoughts and I welcome the idea of making a proper patch. However, as said, I am not sure if we are going to follow through on this path.
If we are (and we could because we bought 2 BTS's, where we hired the other 8), this means that I have more time than I had now. So it gives me the possibility to have a proper look at your code and as a consequence get a good understanding of it. Which helps in creating a proper patch...
For the time I had for this project, this was the best I could do. I was 'bailing' the boat, not repairing it. Until we have decided how to go on, I'll be in listening mode to this mailinglist.
Kind regards, Frank