kern/127397: 32bit application on FreeBSD-6.3 amd64 gets SIGBUS

Chitti Nimmagadda Chitti.Nimmagadda at citrix.com
Mon Sep 15 13:30:01 UTC 2008


>Number:         127397
>Category:       kern
>Synopsis:       32bit application on FreeBSD-6.3 amd64 gets SIGBUS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 15 13:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Chitti Nimmagadda
>Release:        FreeBSD-6.3
>Organization:
Citrix
>Environment:
FreeBSD freebsd64bit 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 01:43:02 UTC 2008     root at palmer.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  amd64

>Description:
I'm running a 32bit application on amd64 FreeBSD-6.3 and the application is getting a SIGBUS. 

The issue can be reproduced with the following test program "foo.c"
====
main()
{
        char c1;
        static int a;
        static int b;
        static int c;
        int d;

        while(1) {
                a = b;
                b = c;
                c = a;
        }
}
====

The program is compiled using the following command:
gcc -g -m32 -L/usr/lib32 -B/usr/lib32 -o foo foo.c

following is the info from gdb
==
freebsd64bit# ./foo
^C
freebsd64bit# ./foo
^C
freebsd64bit# ./foo
^C
freebsd64bit# ./foo
Bus error (core dumped)
freebsd64bit# gdb -c foo.core foo
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `foo'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib32/libc.so.6...done.
Loaded symbols for /usr/lib32/libc.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x08048501 in main () at foo.c:10
10                      a = b;
(gdb) x/i 0x08048501
0x8048501 <main+33>:    mov    %eax,0x80496dc
(gdb)
==

system details:
OS 6.3 FreeBSD amd64
CPU: Intel(R) Xeon(R) CPU X5355  @ 2.66GHz (2666.78-MHz K8-class CPU)
Memory: 16GB

The issue is reproducible only on the SMP kernel.

This issue is not reproducible all the times, but occurs more frequently within the first 5mins after the machine is booted(after the login prompt)

Any solution or workaround exist for this issue?

Thanks,
Chitti.
>How-To-Repeat:


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list