Connecting to hddtemp-daemon for multiple disks with netcat randomly gives only partial results

Bug #775025 reported by Christoph von Stuckrad
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hddtemp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: hddtemp

Having five disks (boot plus raid) and running hddtemp in daemon mode (default except explicitely given disks)
by 'netcat localhost 7543' I get shortened result strings. I assume this to be a classcal problem of the following structure:
hddtemp (tested with strace in no-fork mode) produces strings for each disk
with an extra 'write(send, whaever)';
these 'are sent' to the network one after the opther,
but hddtemp closes the connection too fast, so the 'out of band close (FIN?)'
overruns from all to none parts/packets/pipe-writes
and the receivers randomly sees shortened answers.

This may be fixed by collecting all parts of the answer in one string first to send at once
and by waiting a time before closing.

seen in: (ubuntu 10.10; hddtemp 0.3-beta15-46)

Stucki

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: hddtemp 0.3-beta15-46
ProcVersionSignature: Ubuntu 2.6.35-28.50-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic i686
NonfreeKernelModules: fglrx
Architecture: i386
Date: Sun May 1 19:26:15 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/zsh
SourcePackage: hddtemp

Revision history for this message
Christoph von Stuckrad (stucki-mi) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hddtemp (Ubuntu):
status: New → Confirmed
Revision history for this message
arclance (arclancesu) wrote :

I have a ssd with no temperature sensor and a normal hardrive with a temperature sensor and I noticed that this bug also affects those only having one drive with a temperature sensor. Sometimes 'netcat localhost 7634' returns and empty string with this setup. I have another computer with more than 10 drives and that computer returns a random sample of the drives temperatures (never all of them) and sometimes returns an empty string. Both computers are running Ubuntu 11.04 using hddtemp 0.3-beta15-46.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.