Bug 654246 - gmetad segfaults (rrd_close (rrd_file=0x0) at rrd_open.c:470)
gmetad segfaults (rrd_close (rrd_file=0x0) at rrd_open.c:470)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: rrdtool (Show other bugs)
14
i686 Unspecified
high Severity medium
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-17 05:19 EST by Kostas Georgiou
Modified: 2010-11-17 09:36 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-17 09:36:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kostas Georgiou 2010-11-17 05:19:59 EST
# gdb /usr/sbin/gmetad
(gdb) run -d 10
(gdb) bt
#0  rrd_close (rrd_file=0x0) at rrd_open.c:470                                                                 
#1  0x00115577 in rrd_create_fn (file_name=0xb4fce93b ".../tcp_closed.rrd", rrd=0xb4fce584) at rrd_create.c:818
#2  0x00115d2a in rrd_create_r (filename=0xb4fce93b ".../tcp_closed.rrd", pdp_step=15, last_up=1289908522, argc=6, argv=0xb4fce6f8) at rrd_create.c:553
#3  0x00116723 in rrd_create (argc=12, argv=0xb4fce6e0) at rrd_create.c:108
#4  0x0804ec89 in RRD_create (source=0xb3e0f990 "unspecified", host=0xb3e27fd8 "foobar", metric=0xb3e0f528
"tcp_closed", sum=0xb3e0f533 "0", num=0x0, step=15, process_time=1289908523, slope=GANGLIA_SLOPE_BOTH) at rrd_helpers.c:132

/* Open a database file, return its header and an open filehandle,        
 * positioned to the first cdp in the first rra.
 * In the error path of rrd_open, only rrd_free(&rrd) has to be called
 * before returning an error. Do not call rrd_close upon failure of
 * rrd_open.                         
 */                         
....
int rrd_create_fn(....) {
....
    /* flush all we don't need out of the cache */
    rrd_file_dn = rrd_open(file_name, &rrd_dn, RRD_READONLY);
    rrd_dontneed(rrd_file_dn, &rrd_dn);
    rrd_free(&rrd_dn);
    rrd_close(rrd_file_dn);            
    return (0);                   
}

I need to follow the code in rrd_open to understand why it only fails under a 32bit system and works under x86_64 but at this stage I can't see ganglia being at fault here.
Comment 1 Kostas Georgiou 2010-11-17 09:36:12 EST
rrdtool-1.4.4-1.fc14 fixes the problem :)

Note You need to log in before you can comment on or make changes to this bug.