[Freeswitch-users] Memory leak in mod_nibblebill or in ODBC core?

Sergey Okhapkin sos at sokhapkin.dyndns.org
Sun May 9 11:11:53 PDT 2010


I run git trunk. I afraid the workaround doesn't work, memory usage still 
grows, but slower than with global_heartbeat set.

On Sunday 09 May 2010, Henry Huang wrote:
> Sergey:
> 
> Which version of nibbliebill are you using. We are having memory leak issue
> as well with freeswitch 1.0.4 , but I haven't try to disable nibblebill in
> our test, I will do that now. But since we are already doing what you say
> about "<param name="global_heartbeat"
> value="off"/> in nibblebill.conf.xml and execute "nibblebill heartbeat 60"
> in
> dialplan."  in our current environment, and still getting memory leak, I am
> wondering if you are using nibblebill that comes with the freeswitch 1.0.6
> version.
> 
> Thanks,
> 
> 
> 
> On Mon, May 10, 2010 at 1:12 AM, Sergey Okhapkin
> 
> <sos at sokhapkin.dyndns.org>wrote:
> > Looks like I found a work around. I set <param name="global_heartbeat"
> > value="off"/> in nibblebill.conf.xml and execute "nibblebill heartbeat
> > 60" in
> > dialplan. No more unbounded memory growth. As soon as I set
> > global_heartbeat,
> > memory starts grow again. Go figure...
> >
> > On Monday 19 April 2010, Sergey Okhapkin wrote:
> > > It would be the problem if custom_sql_* is set in nibblebill
> >
> > configuration,
> >
> > > but it's not my case, I do not use custom sql. I'm looking at the code
> > > more....
> > >
> > > On Monday 19 April 2010, Brian West wrote:
> > > > No this isn't the problem it would show up on valgrind like crazy.
> > > >
> > > > /b
> > > >
> > > > On Apr 19, 2010, at 1:25 PM, Sergey Okhapkin wrote:
> > > > > Yes, I agree that these strdups can be ignored. I believe I found
> >
> > where
> >
> > > > > the memory problem comes from, the beginning of bill_event function
> >
> > in
> >
> > > > > mod_nubblebill has SWITCH_STANDARD_STREAM(sql_stream);
> > > > > But SWITCH_STANDARD_STREAM macro does malloc! I do not see a place
> > > > > in the function where the memory is freed. Am I right? #define
> > > > > SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); s.data =
> > > > > malloc(SWITCH_CMD_CHUNK_LEN); \ switch_assert(s.data);
> >
> > \
> >
> > > > > memset(s.data, 0, SWITCH_CMD_CHUNK_LEN);
> > > > >                       \ s.end = s.data;
> >
> > \
> >
> > > > > s.data_size = SWITCH_CMD_CHUNK_LEN;
> > > > >                               \ s.write_function =
> > > > > switch_console_stream_write;
> >
> > \
> >
> > > > > s.raw_write_function = switch_console_stream_raw_write;
> > > > >       \ s.alloc_len = SWITCH_CMD_CHUNK_LEN;
> > > > >                                       \ s.alloc_chunk =
> > > > > SWITCH_CMD_CHUNK_LEN
> > >
> > > _______________________________________________
> > > FreeSWITCH-users mailing list
> > > FreeSWITCH-users at lists.freeswitch.org
> > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-user
> > >s http://www.freeswitch.org
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> 




More information about the FreeSWITCH-users mailing list