Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255132 - sci-biology/foldingathome-5.0.2-r5: will not start on both processor cores on dual core server
Summary: sci-biology/foldingathome-5.0.2-r5: will not start on both processor cores on...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Biology related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 05:32 UTC by Jim Bair
Modified: 2011-06-19 21:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Bair 2009-01-16 05:32:43 UTC
When attempting to start the foldingathome service after installing and configuring successfully, the init script succeeds in starting the 1st processor, but stops at the second, saying it's already running. It then will not let me stop it, restart it, or otherwise do anything via the init script once running the 1 core. You have to kill the process via kill and zap the script to start over.

Reproducible: Always

Steps to Reproduce:
1. emerge foldingathome
2. configure as directed via emerge (just team and username basically)
3. Start service

Actual Results:  
It starts our first core, but when trying to start the second, it fails:

localhost ~ # /etc/init.d/foldingathome start
 * Caching service dependencies ...                                       [ ok ]
 * Starting Folding@Home on CPU 2 ...                                     [ ok ]
 * Starting Folding@Home on CPU 1 ...
./foldingathome already running.                                          [ !! ]
localhost ~ #

When I check, one instance is running, but that's it. If I try to stop it, it fails saying it's not running:

]
localhost ~ # /etc/init.d/foldingathome stop
 * WARNING:  foldingathome has not yet been started.
localhost ~ #

And trying start again fails for both attempts:

localhost ~ # /etc/init.d/foldingathome start
 * Starting Folding@Home on CPU 2 ...
./foldingathome already running.                                          [ !! ]
 * Starting Folding@Home on CPU 1 ...
./foldingathome already running.                                          [ !! ]
localhost ~ #

You have to kill the ./foldingathome pid, wait for the *.exe process to die, then zap it to try again.

Expected Results:  
For both cores to start normally. My quad core Intel Xeon system has no issue starting all four cores, both were configured identically.

This is done on a basically barebones install (sshd and a few other things). Not sure what the deal is, but I'm guessing it's something in the init script itself.

Also, completely unrelated, but the following line in the init script:

CPU=`grep "^processor[[:space:]]*:" /proc/cpuinfo | wc -l`

Could be changed to this:

CPU=`grep -c "^processor[[:space:]]*:" /proc/cpuinfo`

Just thought the wc was a bit unneeded since grep has a flag for just such purposes. =)

Thanks!

localhost ~ # emerge --info
Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-glibc2.0
Timestamp of tree: Mon, 12 Jan 2009 23:00:04 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg 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 mmap_emul 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="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

localhost ~ #
Comment 1 Jeffrey Gardner (RETIRED) gentoo-dev 2009-01-17 00:42:20 UTC
what have you set in /etc/conf.d/foldingathome
?
Comment 2 Jim Bair 2009-01-17 01:24:27 UTC
It's the default config file, not edited at all.

I tried setting CPU=2, but no dice, didn't help. 
Comment 3 Jim Bair 2009-03-07 05:12:01 UTC
Any updates on this by chance?
Comment 4 Daniel Santos 2010-02-05 20:11:29 UTC
Ahh, well I'm playing with fah and I ran across your old and un-responded to bug report.  :(

I'm presuming that you've long since uninstalled and given up on it, but if you can re-install it (presuming my guess was correct) please edit the file /etc/init.d/foldingathome and add the following line at the beginning of the do_config function:

set -x

attempt to start it again and please post the output (of which, there will be plenty).  If you aren't familiar with bash, it should look something like this when you're done:

(begin snippet)

do_config() {
    set -x
    if [ -z "${CPU}" ] || [ "${CPU}" == "0" ]; then
        if [ -r /proc/cpuinfo ]; then

(end snippet)

of course, please first try to run it unmodified and verify that you're still receiving the same error.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2010-06-17 09:19:51 UTC
Does this work with version 6.29 or is this still a valid bug?
Comment 6 Jeffrey Gardner (RETIRED) gentoo-dev 2011-06-19 17:14:10 UTC
Fixed in new release. Thanks!