I'm running a Linux red Hat 9.0 with all updates, I have 512 MB ram, ser 0.8.12 . I writes a module and compiles it fine.When ser receive invite request, this module will be executed. Then I gets the following error message.
May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: Error: new_module: memory allocation error May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: Error: new_module: execute failed May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: ERROR: do_action: memory allocation failure May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: rwrite(): Error in do_action May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: lookup(): Unable to rewrite Request-URI May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: ERROR: build_res_buf_from_sip_req: out of memory ; needs 539 May 6 15:13:21 nw127 /usr/local/sbin/ser[3118]: WARNING: unhandled signal 12 May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: build_rr(): No memory left May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: insert_RR(): Error while inserting outbound Record-Route May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: record_route(): Error while inserting Record-Route line May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: ERROR: do_action: memory allocation failure May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: rwrite(): Error in do_action May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: lookup(): Unable to rewrite Request-URI May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: ERROR: build_res_buf_from_sip_req: out of memory ; needs 589 May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: build_rr(): No memory left May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: insert_RR(): Error while inserting outbound Record-Route May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: record_route(): Error while inserting Record-Route line May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: ERROR: mk_proxy: memory allocation failure
I change the value of PKG_MEM_POOL_SIZE by 10240*1024 in config.h and recompile. But I still has the same memory error message.How can get memory statistics when I send kill -SIGUSR1?
Mook.
At 09:47 AM 5/6/2004, Mook wrote:
I'm running a Linux red Hat 9.0 with all updates, I have 512 MB ram, ser 0.8.12 . I writes a module and compiles it fine.When ser receive invite request, this module will be executed. Then I gets the following error message.
May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: Error: new_module: memory allocation error May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: Error: new_module: execute failed May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: ERROR: do_action: memory allocation failure May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: rwrite(): Error in do_action May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: lookup(): Unable to rewrite Request-URI May 6 15:11:58 nw127 /usr/local/sbin/ser[3154]: ERROR: build_res_buf_from_sip_req: out of memory ; needs 539 May 6 15:13:21 nw127 /usr/local/sbin/ser[3118]: WARNING: unhandled signal 12 May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: build_rr(): No memory left May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: insert_RR(): Error while inserting outbound Record-Route May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: record_route(): Error while inserting Record-Route line May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: ERROR: do_action: memory allocation failure May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: rwrite(): Error in do_action May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: lookup(): Unable to rewrite Request-URI May 6 15:15:47 nw127 /usr/local/sbin/ser[3163]: ERROR: build_res_buf_from_sip_req: out of memory ; needs 589 May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: build_rr(): No memory left May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: insert_RR(): Error while inserting outbound Record-Route May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: record_route(): Error while inserting Record-Route line May 6 15:15:47 nw127 /usr/local/sbin/ser[3166]: ERROR: mk_proxy: memory allocation failure I change the value of PKG_MEM_POOL_SIZE by 10240*1024 in config.h and recompile. But I still has the same memory error message.How can get memory statistics when I send kill -SIGUSR1?
This looks like a memory leak in your module (or in SER?) unfortunately.
To get memory dumps printed, recompile SER with memory logging (i.e., replace -DF_MALLOC with -DDBG_QM_MALLOC in Makefile.defs) and set configuration option 'memlog' low (e.g., 'memlog=1'). On restart, SER will dump all unallocated fragments. It will be quite a lot -- each process will have many of them, but eventually we should be able to figure out some fragments which will be reocurring too frequently.
-jiri