Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434678 - sys-boot/os-prober 1.53 attempts to mount extended partition as ext3 resulting in a hang
Summary: sys-boot/os-prober 1.53 attempts to mount extended partition as ext3 resultin...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ai Locke Shinseiko (Wizzleby)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 03:29 UTC by Nathan Caldwell
Modified: 2012-10-31 08:25 UTC (History)
1 user (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 Nathan Caldwell 2012-09-11 03:29:35 UTC
I have a drive with the following partition table:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     1044224      522081   83  Linux
/dev/sda2   *     1044225     1445849      200812+   7  HPFS/NTFS/exFAT
/dev/sda3         1445850  1050024464   524289307+  83  Linux
/dev/sda4      1050024465  1953520064   451747800    5  Extended
/dev/sda5      1050024528  1054217429     2096451   82  Linux swap / Solaris
/dev/sda6      1054217493  1953520064   449651286    7  HPFS/NTFS/exFAT

When I run os-prober it hangs in an unkillable state consuming 100% CPU. Looking at ps shows it is attempting to run:

root     18159  0.0  0.0  13704  1872 pts/0    S+   21:15   0:00 /bin/sh /usr/bin/os-prober
root     18369  0.0  0.0  13708  1820 pts/0    S+   21:15   0:00 /bin/sh /usr/libexec/os-probes/50mounted-tests /dev/sda4
root     18378 99.7  0.0  12632   736 pts/0    R+   21:15   6:40 mount -o ro -t ext3 /dev/sda4 /var/lib/os-prober/mount

I have not (yet) had a chance to test earlier versions of os-prober, but it used to work without hanging.

Reproducible: Always

Steps to Reproduce:
1. Run os-prober on a drive with extended partitions (?)
Actual Results:  
os-prober hangs attempting to mount an extended partition as ext3

Expected Results:  
os-prober should complete.

Portage 2.2.0_alpha125 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.15-r2, 3.4.5-bfs424.0 x86_64)
=================================================================
System uname: Linux-3.4.5-bfs424.0-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.2
Timestamp of tree: Mon, 10 Sep 2012 14:30:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.11.6, 1.12.3
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage shellbeach x-bfs-overlay msp430 x-xiph forked-daapd x-dolphin-emu x-hdhomerun sage-on-gentoo sunrise x-hawkthorne
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 skype-4.0.0.7-copyright google-chrome Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.mirrors.tds.net/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/shellbeach /usr/local/overlays/bfs-overlay /usr/local/overlays/msp430-overlay /usr/local/overlays/xiph /usr/local/overlays/forked-daapd /usr/local/overlays/dolphin-emu /usr/local/overlays/hdhomerun /usr/local/overlays/sage-on-gentoo /usr/local/overlays/sunrise-reviewed /usr/local/overlays/hawkthorne"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr amrnb amrwb avahi bash-completion berkdb branding bzip2 cairo cdda cec cli consolekit cracklib crypt cxx dbus declarative dirac dri dts dvb dvd dvdr emboss encode exif fam fbcondecor ffmpeg fftw flac fltk fortran gdbm gif gphoto2 gpm gstreamer gtk htmlhandbook iconv ieee1394 inotify ios ipv6 java jpeg kde kerberos kipi kvm lapack lcms libass libnotify libv4l2 lirc live lm_sensors lzma lzo mad matroska mdadm mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib musicbrainz mythtv ncurses nls nptl ogg openexr opengl openmp openssl pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 qwt rar readline redland rtmp samba schroedinger sdl semantic-desktop session spell sqlite sqlite3 srt sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification subversion svg tcpd theora threads thumbnail tiff truetype udev udisks unicode upower usb v4l2 vaapi vdpau vnc vorbis vpx webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xulrunner xv xvid xvmc zeroconf zip zlib" 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" 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 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" CAMERAS="ptp2" 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" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" LIRC_DEVICES="inputlirc" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600 nouveau nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Nathan Caldwell 2012-09-11 06:19:03 UTC
I tracked this down.

Because vol_id is no longer installed by udev/udisks (whoever used to provide it), os-prober falls back to using blkid to identify the partition's filesystem.

Unlike vol_id, blkid always returns with 0 exit status, even if it doesn't know the partition's filesystem.

Because of this, in 50mounted-tests, $types gets set to an empty string instead of 'NOT-DETECTED', which would result in it being skipped.

Instead, when $types is an empty string, it builds a list of filesystems and attempts to mount the partition with each of them to determine it's type. Mount (ext3 only?) then hangs attempting to mount the extended partition.
Comment 2 Nathan Caldwell 2012-10-31 08:25:09 UTC
1.56 does not seem to have this issue.

I'm marking this as resolved for now.