Re: Newbie: ENBD on kernel 2.6 - kernel crash!

Roland Paterson-Jones <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Peter

My gcc is 3.4.3:

[root@rolandpj-box0 ~]# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/u
sr/share/info --enable-shared --enable-threads=posix --disable-checking 
--with-s
ystem-zlib --enable-__cxa_atexit --disable-libunwind-exceptions 
--enable-java-aw
t=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)

The enbd.ko module seems to be crashing in the call to 
blk_queue_max_sectors() which is the first thing that enbd_init_queue 
tries to do (it doesn't reach my debug line immediately after this 
call). Is there maybe some queue stuff different in 2.6.9+ ?

[root@rolandpj-box0 ~]# tail -n 80 /var/log/messages
May 17 17:15:12 localhost rc: Starting xend:  failed
May 17 17:15:13 localhost kernel: ACPI: PCI interrupt 0000:00:02.0[A] -> 
GSI 10
(level, low) -> IRQ 10
May 17 17:15:13 localhost kernel: [drm] Initialized i915 1.1.0 20040405 
on minor
 0:
May 17 17:15:13 localhost kernel: mtrr: base(0xf0020000) is not aligned 
on a siz
e(0x800000) boundary
May 17 17:15:21 localhost gdm(pam_unix)[3318]: session opened for user 
rolandpj
by (uid=0)
May 17 17:15:22 localhost gconfd (rolandpj-3477): starting (version 
2.8.1), pid
3477 user 'rolandpj'
May 17 17:15:22 localhost gconfd (rolandpj-3477): Resolved address 
"xml:readonly
:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at 
position
 0
May 17 17:15:22 localhost gconfd (rolandpj-3477): Resolved address 
"xml:readwrit
e:/home/rolandpj/.gconf" to a writable configuration source at position 1
May 17 17:15:22 localhost gconfd (rolandpj-3477): Resolved address 
"xml:readonly
:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at 
position
2
May 17 17:15:45 localhost gconfd (rolandpj-3477): Resolved address 
"xml:readwrit
e:/home/rolandpj/.gconf" to a writable configuration source at position 0
May 17 17:16:48 localhost su(pam_unix)[3583]: session opened for user 
root by ro
landpj(uid=503)
May 17 17:16:58 localhost kernel: enbd: no version for "struct_module" 
found: ke
rnel tainted.
May 17 17:16:58 localhost kernel: ENBD #5227[0]: enbd_init Network Block 
Device
originally by [email protected]
May 17 17:16:58 localhost kernel: ENBD #5228[0]: enbd_init Network Block 
Device
port to 2.0 by [email protected]
May 17 17:16:58 localhost kernel: ENBD #5230[0]: enbd_init Network Block 
Device
move networking to user space by [email protected]
May 17 17:16:58 localhost kernel: ENBD #5232[0]: enbd_init Enhanced 
Notwork Bloc
k Device 2.4.32 RPJ $Date: 2002/09/17 16:33:22 $ by [email protected]
May 17 17:16:58 localhost kernel: ENBD #5234[0]: enbd_init
May 17 17:16:58 localhost kernel: ENBD #5235[0]: enbd_init     RPJ: 
setting up 1
6 enbd_devs
May 17 17:16:58 localhost kernel: ENBD #5239[0]: enbd_init
May 17 17:16:58 localhost kernel: ENBD #5240[0]: enbd_init     RPJ: 
setting up e
nbd_devs 0
May 17 17:16:58 localhost kernel: ENBD #5249[0]: enbd_init     RPJ:  lo 
at 823d0
fa0, disk at 8140b600
May 17 17:16:58 localhost kernel: ENBD #5253[0]: enbd_init     RPJ:      
spin_lo
ck_init...
May 17 17:16:58 localhost kernel: ENBD #5255[0]: enbd_init     RPJ:      
blk_ini
t_queue...
May 17 17:16:58 localhost kernel: ENBD #5257[0]: enbd_init     RPJ:      
...blk_
init_queue'ed
May 17 17:16:58 localhost kernel: ENBD #5274[0]: enbd_init     RPJ:      
enbd_in
it_queue...
May 17 17:16:58 localhost kernel: ENBD #5153[0]: enbd_init_queue     
RPJ:      e
nbd_init_queue 1: lo is 823d0fa0, queue is 69a93d18 ...
May 17 17:16:58 localhost kernel: Unable to handle kernel NULL pointer 
dereferen
ce at virtual address 000003fe
May 17 17:16:58 localhost kernel:  printing eip:
May 17 17:16:58 localhost kernel: 0224694b
May 17 17:16:58 localhost kernel: *pde = 00000000
May 17 17:16:58 localhost kernel: Oops: 0002 [#1]
May 17 17:16:58 localhost kernel: Modules linked in: enbd(U) i915 nfs 
nfsd expor
tfs lockd parport_pc lp parport autofs4 i2c_dev i2c_core sunrpc 
ipt_REJECT ipt_s
tate ip_conntrack iptable_filter ip_tables dm_mod button battery ac md5 
ipv6 uhc
i_hcd ehci_hcd hw_random snd_intel8x0 snd_ac97_codec snd_pcm_oss 
snd_mixer_oss s
nd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi 
snd_seq_dev
ice snd soundcore tg3 floppy ext3 jbd
May 17 17:16:58 localhost kernel: CPU:    0
May 17 17:16:58 localhost kernel: EIP:    0060:[<0224694b>]    Tainted: 
GF  VLI
May 17 17:16:58 localhost kernel: EFLAGS: 00210212   (2.6.9-1.667)
May 17 17:16:58 localhost kernel: EIP is at blk_queue_max_sectors+0x2c/0x3d
May 17 17:16:58 localhost kernel: eax: 019df800   ebx: 0000cefc   ecx: 
823cc0b7
  edx: 69c1cefc
May 17 17:16:58 localhost kernel: esi: 00000200   edi: 823d2c70   ebp: 
8140b600
  esp: 69c1cef0
May 17 17:16:58 localhost kernel: ds: 007b   es: 007b   ss: 0068
May 17 17:16:58 localhost kernel: Process insmod (pid: 3618, 
threadinfo=69c1c000
 task=698858b0)
May 17 17:16:58 localhost kernel: Stack: 69a93d18 823d0fa0 8211a3f6 
69a93d18 000
00200 021468f0 00200286 00000090
May 17 17:16:58 localhost kernel:        75536a80 00000001 00200202 
825ecd94 000
00000 00000000 823d0780 0213b7e3
May 17 17:16:58 localhost kernel:        825ecd94 0008f497 00000708 
69f054bc 755
36e00 00000000 00000000 00000013
May 17 17:16:58 localhost kernel: Call Trace:
May 17 17:16:58 localhost kernel:  [<8211a3f6>] init_module+0x3f6/0x10c0 
[enbd]
May 17 17:16:58 localhost kernel:  [<021468f0>] free_hot_cold_page+0x98/0xca
May 17 17:16:58 localhost kernel:  [<0213b7e3>] load_module+0x7d1/0x831
May 17 17:16:58 localhost kernel:  [<0213ba4a>] sys_init_module+0x207/0x2ef
May 17 17:16:58 localhost kernel: Code: <3>Debug: sleeping function 
called from
invalid context at include/linux/rwsem.h:43
May 17 17:16:58 localhost kernel: in_atomic():0[expected: 0], 
irqs_disabled():1
May 17 17:16:58 localhost kernel:  [<0211c8b9>] __might_sleep+0x7d/0x88
May 17 17:16:58 localhost kernel:  [<0215e27e>] rw_vm+0x216/0x482
May 17 17:16:58 localhost kernel:  [<02246920>] 
blk_queue_max_sectors+0x1/0x3d
May 17 17:16:58 localhost kernel:  [<02246920>] 
blk_queue_max_sectors+0x1/0x3d
May 17 17:16:58 localhost kernel:  [<0215e9d0>] get_user_size+0x30/0x57
May 17 17:16:58 localhost kernel:  [<02246920>] 
blk_queue_max_sectors+0x1/0x3d
May 17 17:16:58 localhost kernel:  [<0210682b>] show_registers+0x109/0x15e
May 17 17:16:58 localhost kernel:  [<02106a2f>] die+0x14a/0x241
May 17 17:16:58 localhost kernel:  [<0211937e>] do_page_fault+0x0/0x511
May 17 17:16:58 localhost kernel:  [<0211937e>] do_page_fault+0x0/0x511
May 17 17:16:58 localhost kernel:  [<02119733>] do_page_fault+0x3b5/0x511
May 17 17:16:58 localhost kernel:  [<0224694b>] 
blk_queue_max_sectors+0x2c/0x3d
May 17 17:16:58 localhost kernel:  [<0211aecf>] activate_task+0x53/0x5f
May 17 17:16:58 localhost kernel:  [<0211cf68>] 
autoremove_wake_function+0xd/0x2
d
May 17 17:16:58 localhost kernel:  [<0211b95b>] __wake_up_common+0x36/0x51
May 17 17:16:58 localhost kernel:  [<021dd329>] vsnprintf+0x448/0x488
May 17 17:16:58 localhost kernel:  [<0211937e>] do_page_fault+0x0/0x511
May 17 17:16:58 localhost kernel:  [<0212007b>] 
call_console_drivers+0x98/0xd8
May 17 17:16:58 localhost kernel:  [<0224694b>] 
blk_queue_max_sectors+0x2c/0x3d
May 17 17:16:58 localhost kernel:  [<8211a3f6>] init_module+0x3f6/0x10c0 
[enbd]
May 17 17:16:58 localhost kernel:  [<021468f0>] free_hot_cold_page+0x98/0xca
May 17 17:16:58 localhost kernel:  [<0213b7e3>] load_module+0x7d1/0x831
May 17 17:16:58 localhost kernel:  [<0213ba4a>] sys_init_module+0x207/0x2ef
May 17 17:16:58 localhost kernel:  Bad EIP value.
May 17 17:20:01 localhost crond(pam_unix)[3621]: session opened for user 
root by
 (uid=0)
May 17 17:20:01 localhost crond(pam_unix)[3620]: session opened for user 
root by
 (uid=0)
May 17 17:20:01 localhost crond(pam_unix)[3621]: session closed for user 
root
May 17 17:20:01 localhost crond(pam_unix)[3620]: session closed for user 
root
May 17 17:21:02 localhost sshd(pam_unix)[3720]: session opened for user 
rolandpj
 by (uid=0)
May 17 17:22:16 localhost su(pam_unix)[3747]: session opened for user 
root by ro
landpj(uid=503)
[root@rolandpj-box0 ~]#

Roland

Peter T. Breuer wrote:

>"Also sprach Roland Paterson-Jones:"
>  
>
>>This might be a dumb question, but is the gcc version crucial? Could 
>>that be the problem?
>>    
>>
>
>Sure - a bad gcc can cuase problems. Only certain compilers are
>certified to compile the kernel with. I always use gcc 2.95.4. I
>wouldn't trust anything more recent, though I do have gcc 3.4.0
>installed for comparison purposes.
>
>To me it just looks as though you had random garbage lying around that
>got included in the compile. Make sure you clean out the compile
>directory (rm -fr /tmp/*, by the look of your messages) thoroughly.
>
>Peter
>_______________________________________________
>ENBD mailing list
>[email protected]
>http://lists.community.tummy.com/mailman/listinfo/enbd
>
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.