On 2015-04-19 02:43, Víctor Cana Benítez wrote: > Dear maintainers, >
Hi, Thanks for following up. It is indeed an interesting find. > Finally I have found the problem to package hdparm in debian jessie. > > Resume: *the problem is the way that the package hdparm in debian jessie's > repository is compiled*. > As Ondrej mentioned it mind be something different that just how it compiled. Nevertheless, it certainly confirms that the problem is entirely on the Debian side. I got two possible leads, Víctor do you have: * a RAID setup? * a block device named something like /dev/sdaa or /dev/hdaa? - Minimum 4 /letters/ and starting with either "sd" or "hd". All other letters can vary in the a-z range. If you have a RAID: * Please provide the output of: egrep -iq "resync|repair|recover|check" /proc/mdstat cat /proc/rd/status * Combined they should just say "OK" (or complain about missing files). If not, your system is triggering the "RAID" resync code. If this happens on every reboot, the issue is probably that it takes your system is about a minute to resync them and Debians init scripts forces you to wait for it to happen. > Well, to get to that conclusion, first I compared the sources of hdparm from > debian jessie and from ubuntu vivid. Unlike our colleague Niels, I didn't > find > differences between both. Then, I downloaded the sources of hdparm from > debian > jessie's repository, descompressed them, and typed in the terminal "make" and > finally "checkinstall". > [...] This /sounds/ like you just downloaded the "hdparm_9.43.orig.tar.gz" file and only used that. If so, a very likely alternative to your conclusion would be a Debian specific change causes this issue (as Ondrej suggested). The debian source also includes (in this case) a "hdparm_9.43-2.diff.gz", which contains the debian packaging and possibly some changes to the source. * Debian has *no* direct changes to the upstream code * Ubuntu /has/ direct changes to the upstream source. However, these are not applied upstream last I checked. Given a "vanilla" upstream release "just works(tm)", lets whitelist all of these changes as "safe" for now. This leaves an interdiff between Ubuntu (as "orig") and Debian (as "new") of [excluding the changelog]: """ 95hdparm-apm | 5 ++--- control | 5 ++--- hdparm.init | 5 +++++ hdparm.udev | 4 ++-- rules | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) """ (attached as hdparm-ubuntu-debian.interdiff) Lets spread these changes into distinct changesets: * debian/hdparm.init => Debian has a *lock* in place for a RAID "workaround". * debian/hdparm.udev => Change a rule to only match /dev/[sh]d[a-z] instead of /dev/[sh]d[a-z]* * debian/95hdparm-apm => comments only / noise * debian/control => Add dependency on lsb-base (and some noise) - Unlikely to be the problem as I doubt you uninstalled lsb-base just to test this. * debian/rules => Change to if/how the service should be started. - My take here is that this is Ubuntu specific due to their (previous?) use of upstart Thanks, ~Niels
reverted: reverted: reverted: diff -u hdparm-9.43/debian/hdparm.init hdparm-9.43/debian/hdparm.init --- hdparm-9.43/debian/hdparm.init +++ hdparm-9.43/debian/hdparm.init @@ -94,6 +94,8 @@ if [ -f /proc/sys/dev/raid/speed_limit_max ] && [ "x$raid_speed_limit_max" != "x" ]; then echo $raid_speed_limit_max >/proc/sys/dev/raid/speed_limit_max fi + + rm -f /var/lock/hdparm-resync.lock } isOnBattery() { @@ -146,6 +148,9 @@ # Turn off RAID synchronisation if needed and asked for. if [ "$raidstat" != 'OK' ] && [ "$RAID_WORKAROUND" = "yes" ]; then + exec 200>/var/lock/hdparm-resync.lock + # Block until lock can be acquired + flock 200 slow_down_raid_sync fi diff -u hdparm-9.43/debian/changelog hdparm-9.43/debian/changelog diff -u hdparm-9.43/debian/hdparm.udev hdparm-9.43/debian/hdparm.udev --- hdparm-9.43/debian/hdparm.udev +++ hdparm-9.43/debian/hdparm.udev @@ -1,2 +1,2 @@ -ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", \ - RUN+="/lib/udev/hdparm" +ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]*", RUN+="/lib/udev/hdparm" + diff -u hdparm-9.43/debian/95hdparm-apm hdparm-9.43/debian/95hdparm-apm --- hdparm-9.43/debian/95hdparm-apm +++ hdparm-9.43/debian/95hdparm-apm @@ -3,9 +3,8 @@ # This script adjusts hard drive APM settings using hdparm. The hardware # defaults (usually hdparm -B 127) cause excessive head load/unload cycles # on many modern hard drives. We therefore set hdparm -B 254 while on AC -# power. On battery we set hdparm -B 128; this still does not guarantee -# disk parking, but is safer than causing lots of mechanical wear on disks -# as we seem to get currently with 127. +# power. On battery we set hdparm -B 127, because the head parking is +# very useful for shock protection. # # Refactored from acpi-support's 90-hdparm.sh for pm-utils diff -u hdparm-9.43/debian/control hdparm-9.43/debian/control --- hdparm-9.43/debian/control +++ hdparm-9.43/debian/control @@ -1,8 +1,7 @@ Source: hdparm Section: admin Priority: optional -Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> -XSBC-Original-Maintainer: Stephen Gran <sg...@debian.org> +Maintainer: Stephen Gran <sg...@debian.org> Uploaders: Michael Meskes <mes...@debian.org> Build-Depends: cdbs (>> 0.4.37), debhelper (>= 7.3.15), dpkg-dev (>= 1.13.19) Standards-Version: 3.9.3 @@ -10,7 +9,7 @@ Package: hdparm Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base Suggests: apmd Replaces: apmd (<= 3.0.2-1.15) Recommends: powermgmt-base diff -u hdparm-9.43/debian/rules hdparm-9.43/debian/rules --- hdparm-9.43/debian/rules +++ hdparm-9.43/debian/rules @@ -17,8 +17,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. -DEB_DH_INSTALLINIT_ARGS := --no-start --noscripts --onlyscripts +DEB_DH_INSTALLINIT_ARGS := '--no-start' #DEB_DH_LINK_ARGS := ../init.d/hdparm /etc/rcS.d/S07hdparm.first +DEB_UPDATE_RCD_PARAMS := 'start 07 S . ' DEB_FIXPERMS_EXCLUDE := 20hdparm DEB_DH_INSTALLUDEV_ARGS := --priority=85