[OpenSIPS-Users] Latest SVN and Memory issuses

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Sep 22 14:56:48 CEST 2009


Hi Ron,

I was expecting rather something like this:

Memory status (pkg):
qm_status (0x81b9c00):
 heap size= 1048576
 used= 70228, used+overhead=314040, free=734536
 max used (+overhead)= 314040
dumping all alloc'ed. fragments:
      0. N  address=0x81ee00c frag=0x81edff4 size=28 used=1
            alloc'd from timer.c: new_sr_timer(157)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      1. N  address=0x81ee058 frag=0x81ee040 size=56 used=1
            alloc'd from timer.c: new_sr_timer(157)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      2. N  address=0x81ee0c0 frag=0x81ee0a8 size=28 used=1
            alloc'd from timer.c: new_sr_timer(157)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      3. N  address=0x81ee10c frag=0x81ee0f4 size=16 used=1
            alloc'd from script_cb.c: add_callback(60)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      4. N  address=0x81ee14c frag=0x81ee134 size=16 used=1
            alloc'd from script_cb.c: add_callback(60)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      5. N  address=0x81ee18c frag=0x81ee174 size=24 used=1
            alloc'd from pvar.c: new_pv_context(4149)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      6. N  address=0x81ee1d4 frag=0x81ee1bc size=24 used=1
            alloc'd from pvar.c: new_pv_context(4149)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      7. N  address=0x81ee21c frag=0x81ee204 size=28 used=1
            alloc'd from timer.c: new_sr_timer(157)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      8. N  address=0x81ee268 frag=0x81ee250 size=28 used=1
            alloc'd from timer.c: new_sr_timer(157)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
      9. N  address=0x81ee2b4 frag=0x81ee29c size=16 used=1
            alloc'd from script_cb.c: add_callback(60)
        start check=f0f0f0f0, end check= c0c0c0c0, abcdefed


be sure you recompiled/reinstalled the source with the memory debugging 
flag on (see the link I sent you). Also be sure you have the "memdump=0" 
set in the script.

Regards,
bogdan



Ron McCarthy wrote:
> Hi,
>
> The core dumped but before that happen i see this in messages:
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]: Memory status (pkg):
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]: qm_status (0x67b560):
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:  heap size= 2097152
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:  used= 460784, 
> used+overhead=615648, free=1481504
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:  max used 
> (+overhead)= 615648
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]: dumping all 
> alloc'ed. fragments:
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       0. N  
> address=0x685da0 frag=0x685d90 size=48 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       1. N  
> address=0x685df0 frag=0x685de0 size=48 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       2. N  
> address=0x685e40 frag=0x685e30 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       3. N  
> address=0x685ef0 frag=0x685ee0 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       4. N  
> address=0x685fa0 frag=0x685f90 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       5. N  
> address=0x686050 frag=0x686040 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       6. N  
> address=0x686100 frag=0x6860f0 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       7. N  
> address=0x6861b0 frag=0x6861a0 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       8. N  
> address=0x686260 frag=0x686250 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:       9. N  
> address=0x686310 frag=0x686300 size=144 used=1
> Sep 18 07:12:29 sips /usr/local/sbin/opensips[8221]:      10. N  
> address=0x6863c0 frag=0x6863b0 size=224 used=1
>
>
> Is that what you need to see? I can get the entire file, I have no 
> clue what it's saying really :)
>
> This was with #define PKG_MEM_POOL_SIZE 1024*1024*2
>
> Thanks
>
> On Fri, Sep 18, 2009 at 1:01 AM, Bogdan-Andrei Iancu 
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Ron,
>
>     your mem error are referring to pkg or shm too ?
>
>     If increasing the memory (note that pkg mem is configured at compile
>     time, so after changing the PKG_MEM_POOL_SIZE, you need to
>     recompile the
>     whole stuff) did not hep at all, you should try to enable the memory
>     debugger - http://www.opensips.org/Resources/DocsTsMem. After getting
>     the out of memory error again, do not stop opensips, by send a USR1
>     signal the the proc reporting the mem error (kill -SIGUSR1 pid) -> get
>     the pkg mem dump and send it to me.
>
>     Thanks and regards,
>     Bogdan
>
>     Ron McCarthy wrote:
>     > I upgraded to 6147 and still same issue, I also tried making the
>     > memory bigger, same issue.
>     >
>     > I do get a core dump, can i debug that somehow?
>     >
>     > Thanks
>     >
>     > On Thu, Sep 17, 2009 at 4:16 AM, andrei dragus
>     <andreidragus at yahoo.com <mailto:andreidragus at yahoo.com>
>     > <mailto:andreidragus at yahoo.com <mailto:andreidragus at yahoo.com>>>
>     wrote:
>     >
>     >     There was a memory leak in the dialog module.
>     >
>     >     If you were using this module then this was probably the cause.
>     >     It was fixed starting with revision 6147.
>     >
>     >     Please update and try again, and report if you still have
>     issues.
>     >
>     >     Andrei.
>     >
>     >     --- On Wed, 9/16/09, Brett Nemeroff <brett at nemeroff.com
>     <mailto:brett at nemeroff.com>
>     >     <mailto:brett at nemeroff.com <mailto:brett at nemeroff.com>>> wrote:
>     >
>     >
>     >     > Look in config.h for:#define
>     >     > PKG_MEM_POOL_SIZE 1024*1024
>     >     > and try changing that to:#define
>     >     > PKG_MEM_POOL_SIZE 1024*1024*2
>     >     >
>     >     > On Wed, Sep 16, 2009 at 5:34 PM,
>     >     > Ron McCarthy <ronmccar at gmail.com
>     <mailto:ronmccar at gmail.com> <mailto:ronmccar at gmail.com
>     <mailto:ronmccar at gmail.com>>>
>     >     > wrote:
>     >     >
>     >     >
>     >     > Hi List,
>     >     >
>     >     > I just upgraded to the latest SVN relase and after a few
>     >     > thousand calls I start getting:
>     >     >
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:get_hdr_field: out of pkg memory
>     >     >
>     >     >
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:tm:t_check: reply cannot be parsed
>     >     >
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:parse_from_header: out of pkg_memory
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:dialog:pre_match_parse: failed to get From header
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:parse_from_header: out of pkg_memory
>     >     >
>     >     >
>     >     >
>     >     > Sep 16 15:25:37 sips  /usr/local/sbin/opensips[2271]:
>     >     > ERROR:tm:parse_dlg: From broken
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:tm:matching_3261: dlg parsing failed
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:build_req_buf_from_sip_req: out of pkg memory
>     >     >
>     >     >
>     >     >
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:forward_request: building req buf failed
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:get_hdr_field: out of pkg memory
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:tm:t_check: reply cannot be parsed
>     >     >
>     >     >
>     >     >
>     >     > Sep 16 15:25:37 sips /usr/local/sbin/opensips[2271]:
>     >     > ERROR:core:get_hdr_field: out of pkg memory
>     >     > Sep 16 15:25:37 sips  /usr/local/sbin/opensips[2271]:
>     >     > ERROR:tm:t_check: reply cannot be parsed
>     >     >
>     >     > Ive got it  using -m 2048 at startup, from what I can tell
>     >     > never more then 1 gig of RAM get's used. This is at
>     >     > around 70CPS on a single dual core Xeon, CPU is at 90%+
>     >     > idle. Anything else I can tweek, or this a bug/memory leak
>     >     > perhaps?
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > We are using quit a few memcache_fetch calls for LCR and
>     >     > other purposes, about 12 or so per call.
>     >     >
>     >     > It's also dumping a core, will that help me?
>     >     >
>     >     > Thanks!
>     >     >
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     >
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list