Skip to contentSkip to conversation

UML 2.6.17 problems (section mismatch, get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP)

uml-devel Miao Qingjun 4 participants 8 messages Jun 30, 2006 – Jul 9, 2006 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Hi,

Two problems

First one,
when building kernel and LKMs,
WARNING: vmlinux - Section mismatch: reference to .init.text: from .plt after '' (at offset 0x8347e44)
WARNING: vmlinux - Section mismatch: reference to .init: from .plt after '' (at offset 0x8347e64)
WARNING: vmlinux - Section mismatch: reference to .init.setup: from .plt after '' (at offset 0x8347ea4)
WARNING: vmlinux - Section mismatch: reference to .init.text:nosmp from .plt after '' (at offset 0x8347f20)
WARNING: vmlinux - Section mismatch: reference to .init.setup:__setup_nosmp from .plt after '' (at offset 0x8347f28)
WARNING: vmlinux - Section mismatch: reference to .init.text:maxcpus from .plt after '' (at offset 0x8347f2c)
...
...

So when gdb loads LKM symbols, it seems .init.text and .exit.text sections overlapped with .text section.

Second one,

when run uml compiled with "-g" and without "-O2", uml crashed

VFS: Mounted root (ext2 filesystem).
Stub registers -

        0 - 0
        1 - 0
        2 - 0
        3 - 0
        4 - 0
        5 - bffffd1c
        6 - e
        7 - 7b
        8 - 7b
        9 - 0
        10 - 0
        11 - ffffffff
        12 - bfdb8f9a
        13 - 73
        14 - 10282
        15 - bffffd04
        16 - 7b
Kernel panic - not syncing: get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP, pid = 7760, n = 7760, errno = 0, status = 0xb7f

EIP: 0073:[<400007b0>] CPU: 0 Not tainted ESP: 007b:bf9fa530 EFLAGS: 00010246
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 007b ES: 007b

088a7b18:  [<08082abb>] show_regs+0x123/0x125
088a7b34:  [<08066441>] panic_exit+0x3e/0x60
088a7b4c:  [<080a5bed>] notifier_call_chain+0x3c/0x64
088a7b6c:  [<080a5ca9>] atomic_notifier_call_chain+0x1f/0x27
088a7b84:  [<0808cf37>] panic+0x7d/0x126
088a7ba8:  [<0807c293>] wait_stub_done+0x1e4/0x1e6
088a7c28:  [<0807c321>] get_skas_faultinfo+0x8c/0xaa
088a7c44:  [<0807d646>] user_signal+0x57/0x81
088a7c60:  [<0807cae7>] userspace+0x211/0x2c2
088a7cc8:  [<08066deb>] new_thread_handler+0x1aa/0x1b8
088a7d20:  [<006c2a48>] 0x6c2a48

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 1 line · Miao Qingjun

WARNING: vmlinux - Section mismatch: reference to .init.text: from .plt after '' (at offset 0x8347e44)

These are harmless.

Quoted 17 lines

Second one,

when run uml compiled with "-g" and without "-O2", uml crashed

VFS: Mounted root (ext2 filesystem).
Stub registers -

        0 - 0
        1 - 0
        2 - 0
        3 - 0
        4 - 0
        5 - bffffd1c
        6 - e
        7 - 7b
        8 - 7b
        9 - 0
Quoted 8 lines
        10 - 0
        11 - ffffffff
        12 - bfdb8f9a
        13 - 73
        14 - 10282
        15 - bffffd04
        16 - 7b
Kernel panic - not syncing: get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP, pid = 7760, n = 7760, errno = 0, status = 0xb7f

Can you send the disassembly of stub_segv_handler?

Jeff

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw

Hi,
For first one problem, why .exit.text symbol's address seems overlapped with .text section (I use GDB add-symbol-file to load lkm symbols, and section addresses are get from /sys/module/<lkm>/sections)

For the second problem,

082c90c8 <stub_segv_handler>:

 82c90c8:       55                      push   %ebp
 82c90c9:       89 e5                   mov    %esp,%ebp
 82c90cb:       83 ec 14                sub    $0x14,%esp
 82c90ce:       8d 45 0c                lea    0xc(%ebp),%eax
 82c90d1:       89 45 fc                mov    %eax,0xfffffffc(%ebp)
 82c90d4:       8b 45 fc                mov    0xfffffffc(%ebp),%eax
 82c90d7:       83 c0 54                add    $0x54,%eax
 82c90da:       8b 00                   mov    (%eax),%eax
 82c90dc:       a3 04 f0 ff bf          mov    %eax,0xbffff004
 82c90e1:       8b 45 fc                mov    0xfffffffc(%ebp),%eax
 82c90e4:       83 c0 34                add    $0x34,%eax
 82c90e7:       8b 00                   mov    (%eax),%eax
 82c90e9:       a3 00 f0 ff bf          mov    %eax,0xbffff000
 82c90ee:       8b 45 fc                mov    0xfffffffc(%ebp),%eax
 82c90f1:       83 c0 30                add    $0x30,%eax
 82c90f4:       8b 00                   mov    (%eax),%eax
 82c90f6:       a3 08 f0 ff bf          mov    %eax,0xbffff008
 82c90fb:       c7 04 24 14 00 00 00    movl   $0x14,(%esp)
 82c9102:       e8 93 ae db ff          call   8083f9a <stub_syscall0>
 82c9107:       89 45 f8                mov    %eax,0xfffffff8(%ebp)
 82c910a:       c7 44 24 08 0a 00 00    movl   $0xa,0x8(%esp)
 82c9111:       00 
 82c9112:       8b 45 f8                mov    0xfffffff8(%ebp),%eax
 82c9115:       89 44 24 04             mov    %eax,0x4(%esp)
 82c9119:       c7 04 24 25 00 00 00    movl   $0x25,(%esp)
 82c9120:       e8 57 ae db ff          call   8083f7c <stub_syscall2>
 82c9125:       8b 45 fc                mov    0xfffffffc(%ebp),%eax
 82c9128:       89 c4                   mov    %eax,%esp
 82c912a:       b8 77 00 00 00          mov    $0x77,%eax
 82c912f:       cd 80                   int    $0x80
 82c9131:       c9                      leave  
 82c9132:       c3                      ret    

Thanks!

----- Original Message -----
From: "Jeff Dike" <[email protected]>
To: "Miao Qingjun" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, June 30, 2006 9:45 PM
Subject: Re: [uml-user] UML 2.6.17 problems (section mismatch, get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP)

Quoted 31 lines · Miao Qingjun
Quoted 1 line

WARNING: vmlinux - Section mismatch: reference to .init.text: from .plt after '' (at offset 0x8347e44)

These are harmless.

Quoted 17 lines

Second one,

when run uml compiled with "-g" and without "-O2", uml crashed

VFS: Mounted root (ext2 filesystem).
Stub registers -

        0 - 0
        1 - 0
        2 - 0
        3 - 0
        4 - 0
        5 - bffffd1c
        6 - e
        7 - 7b
        8 - 7b
        9 - 0
Quoted 8 lines
        10 - 0
        11 - ffffffff
        12 - bfdb8f9a
        13 - 73
        14 - 10282
        15 - bffffd04
        16 - 7b
Kernel panic - not syncing: get_skas_faultinfo : failed to wait for SIGUSR1/SIGTRAP, pid = 7760, n = 7760, errno = 0, status = 0xb7f
Quoted 3 lines

Can you send the disassembly of stub_segv_handler?

Jeff

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 1 line · Miao Qingjun

082c90c8 <stub_segv_handler>:

...

Quoted 1 line

82c9102: e8 93 ae db ff call 8083f9a <stub_syscall0>

...

Quoted 1 line

82c9120: e8 57 ae db ff call 8083f7c <stub_syscall2>

I guess we should consider a no-O2 compilation to be a case of "it hurts, so don't do it".

What happened here is that two functions which absolutely have to be inlined (because this code is mapped into UML processes with no other UML code, so it must be self-contained) weren't.

It should be possible to detect O2 or greater optimization and fail the build if it's not there. But that assumes that we know that non-O2 won't inline stuff, which may not always be true. Hmmmm

Jeff

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw
Quoted 10 lines · Jeff Dike
Quoted 1 line · Miao Qingjun

082c90c8 <stub_segv_handler>:

...

Quoted 1 line

82c9102: e8 93 ae db ff call 8083f9a <stub_syscall0>

...

Quoted 1 line

82c9120: e8 57 ae db ff call 8083f7c <stub_syscall2>

I guess we should consider a no-O2 compilation to be a case of "it hurts, so don't do it".

Quoted 7 lines

What happened here is that two functions which absolutely have to be inlined (because this code is mapped into UML processes with no other UML code, so it must be self-contained) weren't.

It should be possible to detect O2 or greater optimization and fail the build if it's not there. But that assumes that we know that non-O2 won't inline stuff, which may not always be true. Hmmmm

Isn't this what CONFIG_FORCE_INLINING is supposed to do? Granted, it appears to only work for gcc4, but...

Daniel

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#5 lore raw
Quoted 2 lines · Daniel Gryniewicz

Isn't this what CONFIG_FORCE_INLINING is supposed to do? Granted, it appears to only work for gcc4, but...

It's supposed to force inlining for performance, not for correctness.

If a config setting is needed for correctness, it shouldn't be a config setting.

Jeff

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#6 lore raw
In reply to Daniel Gryniewicz
Quoted 19 lines · Daniel Gryniewicz
Quoted 18 lines · Jeff Dike
Quoted 1 line · Miao Qingjun

082c90c8 <stub_segv_handler>:

...

Quoted 1 line

82c9102: e8 93 ae db ff call 8083f9a <stub_syscall0>

...

Quoted 1 line

82c9120: e8 57 ae db ff call 8083f7c <stub_syscall2>

I guess we should consider a no-O2 compilation to be a case of "it hurts, so don't do it".

What happened here is that two functions which absolutely have to be inlined (because this code is mapped into UML processes with no other UML code, so it must be self-contained) weren't.

Quoted 6 lines
Quoted 3 lines

It should be possible to detect O2 or greater optimization and fail the build if it's not there. But that assumes that we know that non-O2 won't inline stuff, which may not always be true. Hmmmm

Isn't this what CONFIG_FORCE_INLINING is supposed to do? Granted, it appears to only work for gcc4, but...

There is a better solution - mark those function with __always_inline.

There are two different issues... we must set the attribute force_inline (i.e. use __always_inline) to make sure that compilation won't break when CONFIG_FORCE_INLINING is used; but with recent enough GCCs, this should also allow building without -O altogether.

Currently, even without source code changes someone reported succesful builds by simply using -finline, and that can be useful to simplify debug.

Note that not only UML code relies on working inlining; see for instance this snippet from include/asm-i386/fixmap.h (where __always_inline is a recent introduction):

static __always_inline unsigned long fix_to_virt(const unsigned int idx) {
/*
* this branch gets completely eliminated after inlining,
* except when someone tries to use fixaddr indices in an
* illegal way. (such as mixing up address types or using
* out-of-range indices).
*
* If it doesn't get removed, the linker will complain
* loudly with a reasonably clear error message..
*/
if (idx >= __end_of_fixed_addresses)
__this_fixmap_does_not_exist();

return __fix_to_virt(idx);
}

Signature · 17 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#7 lore raw
In reply to Miao Qingjun
Quoted 17 lines · Miao Qingjun

Hi,

Two problems

First one,
when building kernel and LKMs,
WARNING: vmlinux - Section mismatch: reference to .init.text: from .plt after '' (at offset 0x8347e44) WARNING: vmlinux - Section mismatch:
reference to .init: from .plt after '' (at offset 0x8347e64) WARNING:
vmlinux - Section mismatch: reference to .init.setup: from .plt after '' (at offset 0x8347ea4) WARNING: vmlinux - Section mismatch: reference to .init.text:nosmp from .plt after '' (at offset 0x8347f20) WARNING: vmlinux
- Section mismatch: reference to .init.setup:__setup_nosmp from .plt after '' (at offset 0x8347f28) WARNING: vmlinux - Section mismatch: reference to .init.text:maxcpus from .plt after '' (at offset 0x8347f2c) ...
...

Quoted 2 lines

So when gdb loads LKM symbols, it seems .init.text and .exit.text sections overlapped with .text section.

It isn't a problem we haven't fully analized but which always seemed harmless - but building with dynamic linking disabled makes it go away.

However, note that it is a kernel build helper (not binutils) which doesn't know that .plt sections, which are needed for dynamic linking are allowed to reference .init* sections (while it knows this for other sections). Its purpose is simply to avoid .text referencing .init, since such a reference will fail when .init code and data get freed (soon after the boot).

Signature · 18 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel