Bug 188174

Summary: grep $$ /proc/*/* 2>/dev/null
Product: [Fedora] Fedora Reporter: Andrew Cagney <cagney>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: jonstanley, mingo, pfrields, roland, wtogami
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: MassClosed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-20 04:40:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 173278    

Description Andrew Cagney 2006-04-06 17:46:37 UTC
Description of problem:

$ grep $$ /proc/*/* 2>/dev/null
hangs the fc5 64-bit kernel

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

x86-64 2.6.16-1.2084_FC5.frysk ; also reproduced on a rawhide kernel.

How reproducible:

Always.

Steps to Reproduce:
1. grep $$ /proc/*/* 2>/dev/null
2.
3.
  
Actual results:

hang

Expected results:

no hang

Additional info:

doesn't occure on i386; more notes to follow.

Comment 1 Andrew Cagney 2006-04-06 18:06:25 UTC
Using the released FC-5 kernel (i.e., the one that can't load the nVidia driver :-):

bug: spinlock wrong CPU on CPU#0, grep/2685 (Not tainted)
lock: ffff8100029b0f50, .magic: dead4ead, .owner: grep/2685, .owner_cpu: 1

call trace:
...80204e14 spin_bug+177
...80204eaf _raw_spin_lock+109
...801759fe check_pte_range+314
...80176a16 show_numa_map+1514
...and so on

kernel panic - not syncing: bad locking

call trace:
... see above

Comment 2 Dave Jones 2006-04-18 22:36:22 UTC
hmm, for me the process just sleeps forever, stuck in 

open("/proc/20355/cwd"

if you ctrl-c it, nothing happens.
If you strace/ltrace it, the ctrl-c gets delivered, and it exits.

Ingo, Roland ?

Comment 3 Roland McGrath 2006-04-20 21:35:23 UTC
I used 2.6.16-1.2080_FC5 on a single-core HT x86_64, and could not reproduce any
such problem.  The report didn't say whether it was done as root or not.
I tried both root and a regular user and it just worked without any crash or
hang of any kind.  It probably depends on what processes are running or what
filesystems they are using or something.

Comment 4 Andrew Cagney 2006-04-20 23:01:26 UTC
$ prompt, so a normal user.
Mine is dual core AMD 4400, but also seen single processor.

Comment 6 Dan Carpenter 2006-04-21 01:22:13 UTC
I tested with 2.6.16-1.2080_FC5.  It was easier to reproduce from a shell in X
instead of from the command line.

Comment 7 Roland McGrath 2006-04-21 01:27:26 UTC
Ok, I reproduced it with a gnome login and several tries of the grep.



BUG: spinlock wrong CPU on CPU#1, grep/31122 (Not tainted)

 lock: ffff8100016c3290, .magic: dead4ead, .owner: grep/31122, .owner_cpu: 0



Call Trace: <ffffffff80204a14>{spin_bug+177}
<ffffffff80204aaf>{_raw_spin_unlock+109}

       <ffffffff8017577e>{check_pte_range+314}
<ffffffff801767ad>{show_numa_map+1514}

       <ffffffff8033ad96>{__down_read+52} <ffffffff801874c1>{cp_new_stat+231}

       <ffffffff80130087>{get_task_mm+56} <ffffffff801b464d>{m_start+119}

       <ffffffff8019cbdd>{seq_read+475} <ffffffff8017ef82>{vfs_read+203}

       <ffffffff8017f358>{sys_read+69} <ffffffff8010a7aa>{system_call+126}

Kernel panic - not syncing: bad locking



Call Trace: <ffffffff80131f8a>{panic+134} <ffffffff8014a8b0>{module_text_address+51}

       <ffffffff80143e25>{kernel_text_address+28} <ffffffff8010bf95>{show_trace+452}

       <ffffffff8010bffe>{dump_stack+14} <ffffffff80204a3d>{spin_bug+218}

       <ffffffff80204aaf>{_raw_spin_unlock+109}
<ffffffff8017577e>{check_pte_range+314}

       <ffffffff801767ad>{show_numa_map+1514} <ffffffff8033ad96>{__down_read+52}

       <ffffffff801874c1>{cp_new_stat+231} <ffffffff80130087>{get_task_mm+56}

       <ffffffff801b464d>{m_start+119} <ffffffff8019cbdd>{seq_read+475}

       <ffffffff8017ef82>{vfs_read+203} <ffffffff8017f358>{sys_read+69}

       <ffffffff8010a7aa>{system_call+126}


Comment 8 Dave Jones 2006-10-16 18:38:26 UTC
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Comment 9 Jon Stanley 2008-01-20 04:40:11 UTC
(this is a mass-close to kernel bugs in NEEDINFO state)

As indicated previously there has been no update on the progress of this bug
therefore I am closing it as INSUFFICIENT_DATA. Please re-open if the issue
still occurs for you and I will try to assist in its resolution. Thank you for
taking the time to report the initial bug.

If you believe that this bug was closed in error, please feel free to reopen
this bug.