linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CONFIG_MK6 = lsof hangs unkillable
@ 2006-01-16  4:43 Tony Mantler
  2006-01-16 22:58 ` Tony Mantler
  2006-01-20 12:44 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Tony Mantler @ 2006-01-16  4:43 UTC (permalink / raw)
  To: linux-kernel

I'm having trouble running lsof on 2.6.15.1 when the kernel is  
compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
when run as a user lsof will hang unkillable.

The same kernel, same machine, but compiled with CONFIG_MK7 runs just  
lsof just fine.

some versions:
gcc version 4.0.3 20060104 (prerelease) (Debian 4.0.2-6)
lsof                       4.76.dfsg.1-1              List open files.

diff between broken and working (I can send a full .config if needed):
--- config-lsof-broken 2006-01-15 22:02:48.450750000 -0600
+++ config-lsof-working 2006-01-15 22:04:10.003846750 -0600
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.15.1
-# Sun Jan 15 21:31:32 2006
+# Sun Jan 15 22:04:10 2006
#
CONFIG_X86_32=y
CONFIG_SEMAPHORE_SLEEPERS=y
@@ -106,8 +106,8 @@
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
-CONFIG_MK6=y
-# CONFIG_MK7 is not set
+# CONFIG_MK6 is not set
+CONFIG_MK7=y
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
@@ -120,7 +120,7 @@
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=5
+CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
@@ -128,8 +128,10 @@
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_ALIGNMENT_16=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_USE_3DNOW=y
CONFIG_X86_TSC=y
CONFIG_HPET_TIMER=y
# CONFIG_SMP is not set

--
Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
--  http://nicoya.feline.pp.se/  --  http://www.ubb.ca/  --


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-16  4:43 CONFIG_MK6 = lsof hangs unkillable Tony Mantler
@ 2006-01-16 22:58 ` Tony Mantler
  2006-02-17  1:45   ` Brandon Low
  2006-01-20 12:44 ` Andrew Morton
  1 sibling, 1 reply; 8+ messages in thread
From: Tony Mantler @ 2006-01-16 22:58 UTC (permalink / raw)
  To: linux-kernel


On 15-Jan-06, at 10:43 PM, Tony Mantler wrote:

> I'm having trouble running lsof on 2.6.15.1 when the kernel is  
> compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
> when run as a user lsof will hang unkillable.
>
> The same kernel, same machine, but compiled with CONFIG_MK7 runs  
> just lsof just fine.

To follow up on this, it appears that things are getting stuck while  
reading /proc/*/maps, specifically it hangs in fs/proc/task_mmu.c in  
m_start() at down_read(&mm->mmap_sem). The same thing happens when  
trying to readlink /proc/*/exe.

I'm really not sure why this lock is getting stuck. Can anyone  
reproduce this?

--
Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
--  http://nicoya.feline.pp.se/  --  http://www.ubb.ca/  --


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-16  4:43 CONFIG_MK6 = lsof hangs unkillable Tony Mantler
  2006-01-16 22:58 ` Tony Mantler
@ 2006-01-20 12:44 ` Andrew Morton
  2006-01-20 20:31   ` Adrian Bunk
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-01-20 12:44 UTC (permalink / raw)
  To: Tony Mantler; +Cc: linux-kernel

Tony Mantler <nicoya@ubb.ca> wrote:
>
> I'm having trouble running lsof on 2.6.15.1 when the kernel is  
> compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
> when run as a user lsof will hang unkillable.
> 
> The same kernel, same machine, but compiled with CONFIG_MK7 runs just  
> lsof just fine.

That's creepy.  CONFIG_MK6 hardly does anything.  The main thing it does is
feed `-march=k6' into the compiler.  MK7 uses `-march=athlon'.

Are you able to try a different gcc version?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-20 12:44 ` Andrew Morton
@ 2006-01-20 20:31   ` Adrian Bunk
  2006-01-20 22:41     ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2006-01-20 20:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Tony Mantler, linux-kernel

On Fri, Jan 20, 2006 at 04:44:07AM -0800, Andrew Morton wrote:
> Tony Mantler <nicoya@ubb.ca> wrote:
> >
> > I'm having trouble running lsof on 2.6.15.1 when the kernel is  
> > compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
> > when run as a user lsof will hang unkillable.
> > 
> > The same kernel, same machine, but compiled with CONFIG_MK7 runs just  
> > lsof just fine.
> 
> That's creepy.  CONFIG_MK6 hardly does anything.  The main thing it does is
> feed `-march=k6' into the compiler.  MK7 uses `-march=athlon'.
>...

CONFIG_MK7 results in a bigger L1_CACHE_SHIFT than CONFIG_MK6.

AFAIR it wouldn't be the first time that changing L1_CACHE_SHIFT would 
hide a real bug visible with a different L1_CACHE_SHIFT.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-20 20:31   ` Adrian Bunk
@ 2006-01-20 22:41     ` Andrew Morton
  2006-01-20 22:47       ` Tony Mantler
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-01-20 22:41 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: nicoya, linux-kernel

Adrian Bunk <bunk@stusta.de> wrote:
>
> On Fri, Jan 20, 2006 at 04:44:07AM -0800, Andrew Morton wrote:
> > Tony Mantler <nicoya@ubb.ca> wrote:
> > >
> > > I'm having trouble running lsof on 2.6.15.1 when the kernel is  
> > > compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
> > > when run as a user lsof will hang unkillable.
> > > 
> > > The same kernel, same machine, but compiled with CONFIG_MK7 runs just  
> > > lsof just fine.
> > 
> > That's creepy.  CONFIG_MK6 hardly does anything.  The main thing it does is
> > feed `-march=k6' into the compiler.  MK7 uses `-march=athlon'.
> >...
> 
> CONFIG_MK7 results in a bigger L1_CACHE_SHIFT than CONFIG_MK6.
> 
> AFAIR it wouldn't be the first time that changing L1_CACHE_SHIFT would 
> hide a real bug visible with a different L1_CACHE_SHIFT.
> 

hm, OK.  Well that's something we can ask Tony to eliminate, by patching
his Kconfig.cpu to make CONFIG_MK6 have the larger L1_CACHE_SHIFT (and/or
vice versa).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-20 22:41     ` Andrew Morton
@ 2006-01-20 22:47       ` Tony Mantler
  2006-01-20 23:39         ` Tony Mantler
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Mantler @ 2006-01-20 22:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, linux-kernel


On 20-Jan-06, at 4:41 PM, Andrew Morton wrote:

> Adrian Bunk <bunk@stusta.de> wrote:
>>
>> On Fri, Jan 20, 2006 at 04:44:07AM -0800, Andrew Morton wrote:
>>> Tony Mantler <nicoya@ubb.ca> wrote:
>>>>
>>>> I'm having trouble running lsof on 2.6.15.1 when the kernel is
>>>> compiled with CONFIG_MK6. When run as root, lsof will segfault, and
>>>> when run as a user lsof will hang unkillable.
>>>>
>>>> The same kernel, same machine, but compiled with CONFIG_MK7 runs  
>>>> just
>>>> lsof just fine.
>>>
>>> That's creepy.  CONFIG_MK6 hardly does anything.  The main thing  
>>> it does is
>>> feed `-march=k6' into the compiler.  MK7 uses `-march=athlon'.
>>> ...
>>
>> CONFIG_MK7 results in a bigger L1_CACHE_SHIFT than CONFIG_MK6.
>>
>> AFAIR it wouldn't be the first time that changing L1_CACHE_SHIFT  
>> would
>> hide a real bug visible with a different L1_CACHE_SHIFT.
>>
>
> hm, OK.  Well that's something we can ask Tony to eliminate, by  
> patching
> his Kconfig.cpu to make CONFIG_MK6 have the larger L1_CACHE_SHIFT  
> (and/or
> vice versa).

Just tested that a few seconds ago, actually.

CONFIG_MK6 with CONFIG_L1_CACHE_SHIFT=6 results in the same crash.

I'm going to twiddle the configs again and see if I can make a  
CONFIG_MK7 kernel with -march=k6


Cheers - Tony 'Nicoya' Mantler :)

--
Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
--  http://nicoya.feline.pp.se/  --  http://www.ubb.ca/  --


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-20 22:47       ` Tony Mantler
@ 2006-01-20 23:39         ` Tony Mantler
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Mantler @ 2006-01-20 23:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, linux-kernel


On 20-Jan-06, at 4:47 PM, Tony Mantler wrote:

> I'm going to twiddle the configs again and see if I can make a  
> CONFIG_MK7 kernel with -march=k6

And to follow up on this, the bug is present in a kernel built with  
CONFIG_MK7 and with the compiler flags switched to "-march=k6".

I suppose that means the bug is at least compiler related. Some  
assistance/guidance here would be helpful.

To reiterate what I posted before, the compiler I'm using is straight  
out of Debian-unstable, version as follows:
$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c+ 
+,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with- 
system-zlib --libexecdir=/usr/lib --without-included-gettext --enable- 
threads=posix --enable-nls --program-suffix=-4.0 --enable- 
__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable- 
java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/ 
java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with- 
tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20060104 (prerelease) (Debian 4.0.2-6)

I also get some oopsing on reboot, which mostly points back to the  
functions in procfs that I pointed out in a previous message. I don't  
suspect the oops report will be remarkably useful, but I'll paste it  
below for the sake of completeness.

Unable to handle kernel NULL pointer dereference at virtual address  
0000002a
printing eip:
c018ce48
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
Modules linked in: radeon drm thermal fan button processor ac battery  
ipv6 nfs lockd sunrpc af_packet dm_mod w83627hf hwmon_vid eeprom  
i2c_isa rtc joydev evdev parport_pc i2c_viapro via_agp parport 3c59x  
mii snd_via82xx snd_ac97_codec snd_ac97_bus agpgart i2c_core snd_pcm  
snd_timer snd_page_alloc snd_mpu401_uart floppy snd_rawmidi  
snd_seq_device snd soundcore uhci_hcd usbcore ide_cd cdrom unix
CPU:    0
EIP:    0060:[proc_exe_link+40/160]    Not tainted VLI
EFLAGS: 00010202   (2.6.15.1mapstest)
EIP is at proc_exe_link+0x28/0xa0
eax: df41fa70   ebx: df41fa40   ecx: df41fa70   edx: 00000015
esi: d6dd5f18   edi: deca3824   ebp: 00000000   esp: d6dd5e18
ds: 007b   es: 007b   ss: 0068
Process start-stop-daem (pid: 2189, threadinfo=d6dd4000 task=dd419030)
Stack: deca6c08 d6dd5f18 c018edef deca6c08 d6dd5f18 d6dd5f1c d6dd4000  
c018eda0
        c016b040 d9729c40 d6dd5f18 d6dd4000 d6dd4000 d6dd4000  
d6dd4000 d6dd4000
        d6dd5f18 00000001 d6dd4000 df4b2000 c155b1a0 c155b1a0  
d9729c40 0024c5a3
Call Trace:
[proc_pid_follow_link+79/128] proc_pid_follow_link+0x4f/0x80
[proc_pid_follow_link+0/128] proc_pid_follow_link+0x0/0x80
[__link_path_walk+3136/3872] __link_path_walk+0xc40/0xf20
[link_path_walk+69/224] link_path_walk+0x45/0xe0
[path_lookup+145/384] path_lookup+0x91/0x180
[__user_walk+32/64] __user_walk+0x20/0x40
[vfs_stat+23/96] vfs_stat+0x17/0x60
[sys_stat64+16/64] sys_stat64+0x10/0x40
[syscall_call+7/11] syscall_call+0x7/0xb
Code: 90 90 90 56 53 8b 44 24 0c ff 70 f0 e8 92 c2 f8 ff 85 c0 89 c3  
5a 74 77 8d 48 30 89 c8 ff 00 0f 88 72 07 00 00 8b 13 85 d2 74 14  
<f6> 42 15 10 74 07 8b 42 4c 85 c0 75 28 8b 52 0c 85 d2 75 ec be




--
Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
--  http://nicoya.feline.pp.se/  --  http://www.ubb.ca/  --


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: CONFIG_MK6 = lsof hangs unkillable
  2006-01-16 22:58 ` Tony Mantler
@ 2006-02-17  1:45   ` Brandon Low
  0 siblings, 0 replies; 8+ messages in thread
From: Brandon Low @ 2006-02-17  1:45 UTC (permalink / raw)
  To: Tony Mantler; +Cc: linux-kernel

I had this happen earlier today, but at the moment I can't reproduce it.

The offending kernel was 2.6.16-rc3 with CONFIG_MK7=y

I'll post an oops and config if it happens again.

Brandon

On Mon, 01/16/06 at 16:58:55 -0600, Tony Mantler wrote:
> 
> On 15-Jan-06, at 10:43 PM, Tony Mantler wrote:
> 
> >I'm having trouble running lsof on 2.6.15.1 when the kernel is  
> >compiled with CONFIG_MK6. When run as root, lsof will segfault, and  
> >when run as a user lsof will hang unkillable.
> >
> >The same kernel, same machine, but compiled with CONFIG_MK7 runs  
> >just lsof just fine.
> 
> To follow up on this, it appears that things are getting stuck while  
> reading /proc/*/maps, specifically it hangs in fs/proc/task_mmu.c in  
> m_start() at down_read(&mm->mmap_sem). The same thing happens when  
> trying to readlink /proc/*/exe.
> 
> I'm really not sure why this lock is getting stuck. Can anyone  
> reproduce this?
> 
> --
> Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
> --  http://nicoya.feline.pp.se/  --  http://www.ubb.ca/  --
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-02-17  1:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-16  4:43 CONFIG_MK6 = lsof hangs unkillable Tony Mantler
2006-01-16 22:58 ` Tony Mantler
2006-02-17  1:45   ` Brandon Low
2006-01-20 12:44 ` Andrew Morton
2006-01-20 20:31   ` Adrian Bunk
2006-01-20 22:41     ` Andrew Morton
2006-01-20 22:47       ` Tony Mantler
2006-01-20 23:39         ` Tony Mantler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).