Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 206288

Summary: net-analyzer/ntop-3.2-r2 freezing (race condition?)
Product: Gentoo Linux Reporter: Ben Anderson <roothorick>
Component: Current packagesAssignee: Alin Năstac (RETIRED) <mrness>
Status: RESOLVED TEST-REQUEST    
Severity: major CC: jakub, netmon, stian
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ben Anderson 2008-01-17 05:50:50 UTC
ntop randomly freezes (apparently when opening and closing threads) with no messages pointing to a possible related problem. strace shows that ntop is waiting on a SIGRTMIN that never comes. (I'm running it on an SMP system; that may be related.)

Portage 2.1.3.19 (default-linux/x86/no-nptl, gcc-4.1.2, glibc-2.5-r4, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: 2.6.23-gentoo-r3 i686 Pentium III (Katmai)
Timestamp of tree: Thu, 17 Jan 2008 05:30:03 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="candy distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts bitmap-fonts bzip2 cli cracklib crypt eds emboss encode foomaticdb fortran gstreamer gtk gtk2 iconv imlib isdnlog kde libwww mad midi mikmod mmx mpeg mudflap ncurses nethack nls ogg openmp oss pam pcre perl pppd python qt3 qt4 quicktime readline reflection session spell spl sse ssl truetype truetype-fonts type1-fonts unicode vorbis x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="mach64"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-17 08:34:03 UTC
Tried w/ 3.3? Also might want to try to compile this w/ -O0 instead of -Os.
Comment 2 Stian Skjelstad 2008-01-17 10:01:03 UTC
Tested with valgrind?
Comment 3 Ben Anderson 2008-01-17 22:00:37 UTC
3.3 has the same problem. Compiling with -O0 reduced it slightly, but it still freezes.

What exactly can valgrind do that might help?
Comment 4 Stian Skjelstad 2008-01-17 22:26:00 UTC
It can catch one kind of race, a thread starting to use a variable before it is initialized by another one (caught some thread bugs before with it).

If you compile it with debuging, and without -O, you can attach gdb to each of the threads when it has frozen and make backtraces   /proc/<PID>/task/ shows you all the threads.
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2008-07-04 23:46:09 UTC
I've became the maintainer of ntop. Reassigned its bugs to me.
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2008-07-04 23:49:02 UTC
Please test ntop-3.3.6.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2008-10-05 10:49:36 UTC
Closed as TEST-REQUEST.