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

Sergey Okhapkin sos at sokhapkin.dyndns.org
Sun May 9 10:12:42 PDT 2010


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-users
> http://www.freeswitch.org
> 




More information about the FreeSWITCH-users mailing list