Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485120 - >=sys-kernel/hardened-sources-3.10 hangs after suspend to RAM when using sys-power/pm-utils-1.4.1-r2
Summary: >=sys-kernel/hardened-sources-3.10 hangs after suspend to RAM when using sys-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 18:52 UTC by Nikoli
Modified: 2013-10-30 20:45 UTC (History)
5 users (show)

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


Attachments
dmesg (dmesg_3.11.1-hardened,6.23 KB, text/plain)
2013-09-16 18:52 UTC, Nikoli
Details
kernel config (config-k,71.30 KB, text/plain)
2013-09-16 18:53 UTC, Nikoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2013-09-16 18:52:48 UTC
Created attachment 358812 [details]
dmesg

/usr/sbin/pm-suspend worked fine until update to kernel 3.10, now it is broken with 3.10.11 and 3.11.1 hardened kernels, with kernel 3.9.9 it works fine.
'echo mem > /sys/power/state' works fine for 3.11.1-hardened kernel.

When using pm-utils for suspend to RAM with latest hardened kernel system goes to sleep fine as usual, but after wakeup it works fine only several seconds, then cursor in KDE-4.10.5 session stops moving and no reaction to input devices or network happens.

Attached kernel messages before hang. Not sure if it is kernel or pm-utils bug.

Portage 2.2.1 (hardened/linux/amd64/no-multilib, gcc-4.6.3, glibc-2.15-r3, 3.11.1-hardened x86_64)
=================================================================
KiB Mem:     1792856 total,    960904 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 16 Sep 2013 13:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          3.2.5-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=atom -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=atom -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi alsa amd64 audiofile bash-completion bzip2 cairo caps cdda cdr celt cli consolekit cracklib crypt css cxx dbus djvu dri dts dv dvd dvdr egl exif fat ffmpeg flac fluidsynth fontconfig fortran gd geoip gif gmp gnutls gphoto2 gpm hardened iconv id3tag idn ilbc imap imlib ipv6 jbig jpeg jpeg2k justify kde lcms libass libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext modplug modules mp3 mp4 mpeg mtp mudflap musepack musicbrainz ncurses nls nptl nptlonly ntfs nvidia ogg openexr opengl openmp opus pam pango pax_kernel pcre pdf pg-intdatetime pm-utils png policykit postscript qt3support qt4 quicktime raw readline reiserfs replaygain sasl session smp socks5 sqlite sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev udisks unicode upnp upower usb vcd vorbis wavpack webkit webp wma wmf xattr xcb xcomposite xface xinerama xml xmp xpm xscreensaver xv xvid xz zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer report-builder" LINGUAS="ru ru_RU en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_2" PYTHON_TARGETS="python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Nikoli 2013-09-16 18:53:20 UTC
Created attachment 358814 [details]
kernel config
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-16 18:59:42 UTC
I've been running for at least a week (I think more like a month) with no issues with suspend.

doesn't pm-suspend just call some kernel thing, not do anything itself?

Does it work with 3.10.10?  (since you said it failed with 3.10.11)
Comment 3 Nikoli 2013-09-16 19:06:18 UTC
No, it did not. I also tried .3, .4, .7, as i remember non of them worked, but i am not entirely sure.
Comment 4 Nikoli 2013-09-16 19:08:40 UTC
pm-suspend does a lot things:
# ls /usr/lib64/pm-utils/sleep.d/
00logging  00powersave  01grub  49bluetooth  75modules  90clock  94cpufreq  95led  98video-quirk-db-handler  99video
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-16 19:24:10 UTC
Ok, just making sure.  Can you try with a vanilla kernel?
Comment 6 Nikoli 2013-09-16 20:53:35 UTC
sys-kernel/vanilla-sources-3.11.1 works fine, does not hang when pm-suspend is used.
Comment 7 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-16 21:41:15 UTC
Ok, hardened kernel with grsec/pax disabled?
Comment 8 Nikoli 2013-09-17 19:08:47 UTC
With 'CONFIG_GRKERNSEC is not set' 3.11.1-hardened works fine.
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-17 19:19:07 UTC
So no you know what to do :P

Differential analysis (enable some stuff and see what happens).
Comment 10 Anthony Basile gentoo-dev 2013-09-17 19:41:42 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #9)
> So no you know what to do :P
> 
> Differential analysis (enable some stuff and see what happens).

I'ver removed 3.10.10 and 3.10.11 from the tree.
Comment 11 Alexander Tsoy 2013-09-19 06:43:05 UTC
(In reply to Nikoli from comment #3)
> No, it did not. I also tried .3, .4, .7, as i remember non of them worked,
> but i am not entirely sure.

(In reply to Anthony Basile from comment #10)
> (In reply to Matthew Thode ( prometheanfire ) from comment #9)
> > So no you know what to do :P
> > 
> > Differential analysis (enable some stuff and see what happens).
> 
> I'ver removed 3.10.10 and 3.10.11 from the tree.

Why? I see no info that this is a regression over 3.10.1-r1.
Comment 12 boris64 2013-09-19 18:09:56 UTC
Hm, i don't see the reason to remove those versions.
I for myself run hardened kernels on my servers (most people do?), where
nobody cares about suspending and actually i didn't want to
move to 3.11 until it becomes a bit more mature.
Comment 13 Bruno Medeiros 2013-09-20 15:36:02 UTC
Since the 3.10 is a LTS, is it possible to reintroduce the 3.10.x in the tree?
Comment 14 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-20 15:41:48 UTC
I don't think that grsecurity (our upstream) will support 3.10 as an LTS.
Comment 15 Anthony Basile gentoo-dev 2013-09-20 21:47:09 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #14)
> I don't think that grsecurity (our upstream) will support 3.10 as an LTS.

actually you don't need to think, they won't.  they've already moved on to 3.11.
Comment 16 Anthony Basile gentoo-dev 2013-09-27 10:56:11 UTC
Can the reporter test against 3.11.1-r2.
Comment 17 Nikoli 2013-09-28 21:53:57 UTC
3.11.1-r2 still hangs.
Comment 18 PaX Team 2013-09-30 13:50:00 UTC
(In reply to Nikoli from comment #17)
> 3.11.1-r2 still hangs.

can you reproduce it when X is not running?
Comment 19 Nikoli 2013-10-01 10:01:10 UTC
Tried doing '/etc/init.d/xdm stop' before pm-suspend, nothing changed, still hangs. Kernel was 3.11.1-hardened-r2.
Comment 20 PaX Team 2013-10-01 10:25:39 UTC
(In reply to Nikoli from comment #19)
> Tried doing '/etc/init.d/xdm stop' before pm-suspend, nothing changed, still
> hangs. Kernel was 3.11.1-hardened-r2.

that is, you issued suspend from a normal text console? weird, 'cos that works for me here. now the question is whether you could do what Matthew said in comment 9: a binary search for the config option that triggers the problem then we have something to go on and figure out what the cause is. you can take your time 'cos i won't have net access for a while anyway.
Comment 21 Jaak Ristioja 2013-10-01 19:45:40 UTC
(In reply to Anthony Basile from comment #15)
> (In reply to Matthew Thode ( prometheanfire ) from comment #14)
> > I don't think that grsecurity (our upstream) will support 3.10 as an LTS.
> 
> actually you don't need to think, they won't.  they've already moved on to
> 3.11.

Well, for the test version at least. According to https://grsecurity.net/ their stable patches still address the 2.6.32.* and 3.2.* longterm versions of the Linux Kernel, so maybe there is hope? Of course it were a bit sad if they decided not to support 3.10. It would keep many wondering about what will be the next longterm supported by grsecurity, especially since longterm releases appear to be becoming rare.
Comment 22 Nikoli 2013-10-30 18:09:54 UTC
3.11.6-hardened-r1 seems to work fine :)
Comment 23 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-10-30 20:45:31 UTC
ok, marking fixed then, if not fixed, bug us :D