Bug 654246 - gmetad segfaults (rrd_close (rrd_file=0x0) at rrd_open.c:470)
Summary: gmetad segfaults (rrd_close (rrd_file=0x0) at rrd_open.c:470)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rrdtool
Version: 14
Hardware: i686
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-17 10:19 UTC by Kostas Georgiou
Modified: 2010-11-17 14:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-17 14:36:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kostas Georgiou 2010-11-17 10:19:59 UTC
# 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 14:36:12 UTC
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.