[oi-dev] Fmd out of memory crash

Steve Gonczi gonczi at comcast.net
Thu Sep 22 20:57:32 UTC 2011


Greetings folks, 

I have recently seen some fmd crashes, basically fmd running out of memory 
and shutting down. 

Prompted me to look at the fmd code, and I am wondering if this notification 
is the way the designer intended it: 

2 void 633 fmd_module_gc ( fmd_module_t * mp ) 634 { 635 fmd_hdl_info_t * info ; 636 fmd_event_t *e; 637 638 if ( mp -> mod_error != 0 ) 639 return ; /* do not do anything if the module has failed */ 640 641 fmd_module_lock ( mp ); 642 643 if (( info = mp -> mod_info ) != NULL ) { 644 fmd_serd_hash_apply (& mp -> mod_serds , 645 ( fmd_serd_eng_f *) fmd_serd_eng_gc , NULL ); 646 } 647 648 fmd_module_unlock ( mp ); 649 

!!!!!! The question is: what this FMD_EVT_GC supposed to signify? 
My sense is that this is just to record the fact that the 
garbage collection was kicked off. 
If that is the case, it clearly gets called too many times, 
since fmd_module_gc is a callback function, and 
it repeatedly gets called from fmd_modhash_apply() in a double 
loop. 
!!!!!! 

650 if ( info != NULL ) { 651 e = fmd_event_create ( FMD_EVT_GC , FMD_HRT_NOW , NULL , NULL ); 652 fmd_eventq_insert_at_head ( mp -> mod_queue , e); 653 } 654 } 655 

The stack looks like: 

debugging core file of fmd (32-bit) from nrchbs-s1194 
file: /usr/lib/fm/ fmd / fmd 
initial argv: /usr/lib/fm/ fmd / fmd 
.. 
status: process terminated by SIGABRT (Abort), pid=533 uid=0 code=-1 
> ::stack 
... 
fmd_vpanic+0x125(8086f5c, fdb4ee44, fdb4ee48, c) 
fmd_panic+0x12(8086f5c, c, 3e8, 8070c8c) 
fmd_alloc+0xc7(c) 
fmd_eventq_insert_at_head+ 
0x2c(8413d88, 907df18, 0, feeb9c76) 
fmd_module_gc+0x6b(86eb440, 0, 1284885e, feec2c1f) 
fmd_modhash_apply+0x3c( 83f6428, 8075fe4, fdb4ef48, 85fa248) 
fmd_gc+0x27(809d840) 
fmd_timerq_exec+0x109(85fa240, 0, 8, fef62440) ... 

TIA for any comments, should someone have any. 

Steve 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20110922/2c109891/attachment-0005.html>


More information about the oi-dev mailing list