Bug 128928 - process hung by open+read of file on reiserfs
process hung by open+read of file on reiserfs
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-31 14:52 EDT by John Reiser
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-06 17:46:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2004-07-31 14:52:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040625

Description of problem:
Although a reiserfs filesystem can be mounted and unmounted
successfully, attempts to access a file on the mounted resiserfs often
result in a hung process: no progress, no CPU time accumulating,
cannot be killed.


Version-Release number of selected component (if applicable):
kernel-2.6.7-1.499

How reproducible:
Always

Steps to Reproduce:
1. Instsall SuSE Personal 9.1 on a multi-booting system.  SuSE
Personal Linux 9.1 uses reiserfs (version 3.6 [?]) for its root.
2. Boot Fedora Core 3 test 1; create a directory /suse, and mount the
SuSE root on it.
3. vi /suse/etc/init.d/coldplug
    

Actual Results:  The gnometerminal screen gets cleared, and then the
vim process waits forever and cannot be killed.  "ps axl" shows
-----
1     0  2848     3   5 -10     0    0 -      S<   ?          0:00
[reiserfs/0]
4     0  2855  2821  17   0  9936 2800 -      D+   pts/0      0:00 vim
coldplug
-----


Expected Results:  The usual vim display and editing, with the vim
process being killable.


Additional info:
Comment 1 John Reiser 2004-08-01 22:26:48 EDT
Above actions were done as root.  Root was required to do the mount,
the file etc/init.d/coldplug has protection 0755 and is owned by root.
 The last lines of an strace on the vi process show
-----
uname({sys="Linux", node="fc3test1", ...}) = 0
getpid()                                = 2944
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
access("/mnt/hda13/etc/init.d/coldplug", W_OK) = 0
open("/mnt/hda13/etc/init.d/coldplug", O_RDONLY|O_LARGEFILE) = 3
open("/mnt/hda13/etc/init.d/.coldplug.swp", O_RDONLY|O_LARGEFILE) = 4
open("/mnt/hda13/etc/init.d/.coldplug.swpx", O_RDONLY|O_LARGEFILE
<unfinished ...>
-----
and after that all further access attempts on the reiserfs "hang" [no
response, no progress, no CPU time accumulating, cannot be killed.]

Comment 2 John Reiser 2004-08-01 23:53:46 EDT
After reboot (had to be forced by hardware reset) and re-mount, then a
non-root user can vi the file OK.  A similar strace shows
-----
uname({sys="Linux", node="fc3test1", ...}) = 0
getpid()                                = 2674
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
access("/mnt/hda13/etc/init.d/coldplug", W_OK) = -1 EACCES (Permission
denied)
open("/mnt/hda13/etc/init.d/coldplug", O_RDONLY|O_LARGEFILE) = 3
write(1, "\33[1;24r\33[m\33[H\33[2J\33[24;1H\"/mnt/hd"..., 56) = 56
-----

The root user still sees a hang when trying to do the same thing:
-----
uname({sys="Linux", node="fc3test1", ...}) = 0
getpid()                                = 2725
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
stat64("/mnt/hda13/etc/init.d/coldplug", {st_mode=S_IFREG|0755,
st_size=3013, ...}) = 0
access("/mnt/hda13/etc/init.d/coldplug", W_OK) = 0
open("/mnt/hda13/etc/init.d/coldplug", O_RDONLY|O_LARGEFILE) = 3
open("/mnt/hda13/etc/init.d/.coldplug.swp", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/mnt/hda13/etc/init.d/.coldplug.swp",
O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600
-----
and note that there is no EOL on the output from strace; the line ends
with ", 0600".

Comment 3 John Reiser 2004-08-05 17:29:30 EDT
More generally, any attempt to create or open a file for Write on a
reiserfs filesystem will fail when selinux is active.  Booting with
"selinux=0" on the kernel command line removes the hang and proceeds
normally.  The hang is observed with selinux in targeted permissive mode.

The underlying reason is "no extended attributes in reiserfs version
3."  See http://www.crypt.gen.nz/selinux/faq.html#I.4 .  This will not
be fixed officially until reiserfs version 4.

It is somewhat irksome that the hang with selinux and reiserfs3 is not
obviously diagnosable by the WCHAN in ps, a line in /var/log/messages,
etc.  Either the reiserfs module, or the VFS itself, should complain
instead of just sitting there when an attempt is made to use extended
attributes that are not implemented.



Note You need to log in before you can comment on or make changes to this bug.