bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cflow] [cflow 1.4] Infinite loop when profiling glibc


From: Nuthan Munaiah
Subject: [bug-cflow] [cflow 1.4] Infinite loop when profiling glibc
Date: Mon, 20 Jul 2015 19:21:38 +0000
User-agent: eM_Client/6.0.22344.0

Hello,
 
My name is Nuthan Munaiah and I am a first year PhD student at the Rochester Institute of Technology, Rochester, New York, USA. We extensively use GNU cflow to generate static call graph of the subjects of study in our research. Our most recent subject of study is the GNU C Library (glibc). When we attempt to generate a call graph for the most most recent development version of glibc off of the git repository (git://sourceware.org/git/glibc.git), cflow appears to enter an infinite loop. We have redirected the standard error of cflow to a file (stderr) and this file grows close to 700 M in under 30 seconds. Upon looking at the tail of the stderr file it appears that line 776 of file inet/rcmd.c is the offending line that is printing over and over again. When this line is removed from the file, cflow runs to completion within a few seconds.
 
We are using cflow version 1.4 on Ubuntu. Here are the specifics:
$ uname -a
Linux hostname 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ cflow --version
cflow (GNU cflow) 1.4
Copyright (C) 2005, 2006, 2009, 2010, 2011 2009 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Written by Sergey Poznyakoff.
The steps to recreate the bug are detailed below. Please let us know if you need any more information that could help you triage the bug.
$ git clone git://sourceware.org/git/glibc.git
$ cd glibc
glibc (master)$ cflow -b -r `find -name "*.c" -or -name "*.h"` 2> stderr 1> cflow.txt
^C
glibc (master)$ ls -lh stderr
-rw-rw-r-- 1 user user 658M Jul 20 14:59 stderr
glibc (master)$ wc -l stderr
12877169 stderr
glibc (master)$ wc -l cflow.txt
0 cflow.txt
glibc (master)$ tail stderr
cflow:./inet/rcmd.c:776: luser redefined
cflow:./inet/rcmd.c:776: this is the place of previous definition
cflow:./inet/rcmd.c:776: luser redefined
cflow:./inet/rcmd.c:776: this is the place of previous definition
cflow:./inet/rcmd.c:776: luser redefined
cflow:./inet/rcmd.c:776: this is the place of previous definition
cflow:./inet/rcmd.c:776: luser redefined
cflow:./inet/rcmd.c:776: this is the place of previous definition
cflow:./inet/rcmd.c:776: luser redefined
cflow:./inet/rcmd.c:776: this is the place of previous definition
glibc (master)$ vi inet/rcmd.c ##### Remove line 776
glibc (master)$ git diff
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 035cb0d..48d32ad 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -773,7 +773,6 @@ __validuser2_sa(hostf, ra, ralen, luser, ruser, rhost)
        FILE *hostf;
        struct sockaddr *ra;
        size_t ralen;
-       const char *luser, *ruser, *rhost;
 {
     const char *user;
     char *p;
glibc (master)$ cflow -b -r `find -name "*.c" -or -name "*.h"` 2> stderr 1> cflow.txt
glibc (master)$ ls -lh stderr
-rw-rw-r-- 1 user user 2.7M Jul 20 15:02 stderr
glibc (master)$ wc -l stderr
27234 stderr
glibc (master)$ wc -l cflow.txt
48333 cflow.txt
Thank you,
Nuthan Munaiah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]