[Rtai] rt_task_init in user-space hangs the process (but not the system)

Shahbaz Yousefi shabbyx at gmail.com
Tue Sep 13 17:42:38 CEST 2011


(Sorry for the duplicate, I somehow mis-copy-pasted the title)

Follow up on the previous message:

One time that the hung process stopped, I got this log:

[ 2425.014469] BUG: unable to handle kernel NULL pointer dereference at
0000000000000480
[ 2425.014480] IP: [<ffffffffa0b1d036>] handle_lxrt_request+0xb56/0xc80
[rtai_lxrt]
[ 2425.014497] PGD d0dce067 PUD cc561067 PMD 0
[ 2425.014506] Oops: 0000 [#1] PREEMPT SMP
[ 2425.014514] last sysfs file:
/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
[ 2425.014520] CPU 0
[ 2425.014523] Modules linked in: e100 rtai_math rtai_shm rtai_msg rtai_mbx
rtai_sem rtai_fifos rtai_lxrt rtai_hal parport_pc ppdev binfmt_misc
nvidia(P) shpchp intel_agp lp intel_gtt psmouse serio_raw parport ahci
pata_jmicron libahci mii sky2 [last unloaded: ec_master]
[ 2425.014570]
[ 2425.014575] Pid: 1744, comm: prog3 Tainted: P
2.6.37-rtai-magma #5 965P-S3/
[ 2425.014579] RIP: 0010:[<ffffffffa0b1d036>]  [<ffffffffa0b1d036>]
handle_lxrt_request+0xb56/0xc80 [rtai_lxrt]
[ 2425.014591] RSP: 0018:ffff880037bd9d48  EFLAGS: 00010286
[ 2425.014595] RAX: 0000000000000000 RBX: 00007fff162437d0 RCX:
00007f09de0a7b39
[ 2425.014600] RDX: 00000000ffffffff RSI: 00000000000003eb RDI:
00000000003eb808
[ 2425.014604] RBP: ffff880037bd9de8 R08: 00007fff162437a0 R09:
00007fff162437d0
[ 2425.014608] R10: 00007fff162437d0 R11: 0000000000003206 R12:
0000000000000000
[ 2425.014612] R13: 0000000000000000 R14: 0000000000000000 R15:
0000000000000000
[ 2425.014617] FS:  00007f09de54e700(0000) GS:ffff8800dfc00000(0000)
knlGS:0000000000000000
[ 2425.014622] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2425.014626] CR2: 0000000000000480 CR3: 00000000cc77f000 CR4:
00000000000006f0
[ 2425.014630] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 2425.014634] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[ 2425.014639] Process prog3 (pid: 1744, threadinfo ffff880037bd8000, task
ffff880037acc530)
[ 2425.014643] Stack:
[ 2425.014646]  ffff880037bd9d68 ffffffff8130c88f ffff8801158d2000
ffff8801158d6800
[ 2425.014656]  ffff880037bd9d88 ffffffff8103f281 ffff880037bd9d98
ffffffff8103f281
[ 2425.014666]  ffff880037bd9da8 0000000000000001 ffff880037bd9db8
ffffffff81532aad
[ 2425.014676] Call Trace:
[ 2425.014685]  [<ffffffff8130c88f>] ? tty_wakeup+0x3f/0x80
[ 2425.014692]  [<ffffffff8103f281>] ? get_parent_ip+0x11/0x50
[ 2425.014698]  [<ffffffff8103f281>] ? get_parent_ip+0x11/0x50
[ 2425.014705]  [<ffffffff81532aad>] ? sub_preempt_count+0x9d/0xd0
[ 2425.014716]  [<ffffffffa0b1d1ff>] rtai_lxrt_invoke+0x9f/0x1b0 [rtai_lxrt]
[ 2425.014722]  [<ffffffff81532aad>] ? sub_preempt_count+0x9d/0xd0
[ 2425.014731]  [<ffffffffa0a8406a>] intercept_syscall_prologue+0x12a/0x150
[rtai_hal]
[ 2425.014739]  [<ffffffff810c353b>] __ipipe_dispatch_event+0x3b/0x210
[ 2425.014745]  [<ffffffff8131426d>] ? put_ldisc+0x8d/0x100
[ 2425.014752]  [<ffffffff8101f951>] __ipipe_syscall_root+0x61/0x140
[ 2425.014758]  [<ffffffff8152e4a1>] __ipipe_syscall_root_thunk+0x35/0x6a
[ 2425.014766]  [<ffffffff81003144>] ? system_call_after_swapgs+0x54/0x79
[ 2425.014770] Code: 63 08 bf 27 00 00 00 e8 b9 82 ff ff 44 89 f2 48 89 c1
44 89 e6 4c 89 ef 31 c0 ff d1 e9 35 fa ff ff 4d 85 e4 4d 0f 45 ec 83 ca ff
<49> 8b 9d 80 04 00 00 65 48 8b 04 25 80 b5 00 00 48 39 d8 74 34
[ 2425.014867] RIP  [<ffffffffa0b1d036>] handle_lxrt_request+0xb56/0xc80
[rtai_lxrt]
[ 2425.014878]  RSP <ffff880037bd9d48>
[ 2425.014881] CR2: 0000000000000480
[ 2425.014886] ---[ end trace f3749957006a9536 ]---

The programs are as simple as a few lines, calling rt_thread_init, getting a
semphore, in one program locking it and the other one unlocking it. Then
calling rt_task_delete.

Second, the hardware description attachment didn't arrive, so I'm pasting it
here:

    description: Desktop Computer
    width: 64 bits
    capabilities: smbios-2.3 dmi-2.3 vsyscall64 vsyscall32
    configuration: boot=normal chassis=desktop
  *-core
       description: Motherboard
       product: 965P-S3
       vendor: Gigabyte Technology Co., Ltd.
       physical id: 0
       version: x.x
     *-firmware
          description: BIOS
          vendor: Award Software International, Inc.
          physical id: 0
          version: F6 (10/12/2006)
          size: 128KiB
          capacity: 960KiB
          capabilities: pci pnp apm upgrade shadowing cdboot bootselect edd
int13floppy360 int13floppy1200 int13floppy720 int13floppy2880
int5printscreen int9keyboard int14serial int17printer int10video acpi usb
ls120boot zipboot biosbootspecification
     *-cpu
          description: CPU
          product: Intel(R) Core(TM)2 CPU          6700  @ 2.66GHz
          vendor: Intel Corp.
          physical id: 4
          bus info: cpu at 0
          version: Intel(R) Core(TM)2 CPU 670
          slot: Socket 775
          size: 1600MHz
          capacity: 4GHz
          width: 64 bits
          clock: 266MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8
apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl
aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm
lahf_lm tpr_shadow
        *-cache:0
             description: L1 cache
             physical id: a
             slot: Internal Cache
             size: 64KiB
             capacity: 64KiB
             capabilities: synchronous internal write-back
        *-cache:1
             description: L2 cache
             physical id: b
             slot: External Cache
             size: 4MiB
             capabilities: synchronous internal write-back
     *-memory
          description: System Memory
          physical id: 1b
          slot: System board or motherboard
          size: 4GiB
        *-bank:0
             description: DIMM 800 MHz (1.2 ns)
             physical id: 0
             slot: A0
             size: 1GiB
             width: 64 bits
             clock: 800MHz (1.2ns)
        *-bank:1
             description: DIMM 800 MHz (1.2 ns)
             physical id: 1
             slot: A1
             size: 1GiB
             width: 64 bits
             clock: 800MHz (1.2ns)
        *-bank:2
             description: DIMM 800 MHz (1.2 ns)
             physical id: 2
             slot: A2
             size: 1GiB
             width: 64 bits
             clock: 800MHz (1.2ns)
        *-bank:3
             description: DIMM 800 MHz (1.2 ns)
             physical id: 3
             slot: A3
             size: 1GiB
             width: 64 bits
             clock: 800MHz (1.2ns)
     *-pci
          description: Host bridge
          product: 82P965/G965 Memory Controller Hub
          vendor: Intel Corporation
          physical id: 100
          bus info: pci at 0000:00:00.0
          version: 02
          width: 32 bits
          clock: 33MHz
        *-pci:0
             description: PCI bridge
             product: 82P965/G965 PCI Express Root Port
             vendor: Intel Corporation
             physical id: 1
             bus info: pci at 0000:00:01.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm msi pciexpress normal_decode bus_master
cap_list
             resources: memory:f4000000-f6ffffff
ioport:e0000000(size=268435456)
           *-display
                description: VGA compatible controller
                product: G72 [GeForce 7300 LE]
                vendor: nVidia Corporation
                physical id: 0
                bus info: pci at 0000:01:00.0
                version: a1
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vga_controller bus_master
cap_list rom
                configuration: driver=nvidia latency=0
                resources: irq:16 memory:f4000000-f4ffffff
memory:e0000000-efffffff memory:f5000000-f5ffffff memory:f6000000-f601ffff
        *-usb:0
             description: USB Controller
             product: 82801H (ICH8 Family) USB UHCI Controller #4
             vendor: Intel Corporation
             physical id: 1a
             bus info: pci at 0000:00:1a.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:16 ioport:b000(size=32)
        *-usb:1
             description: USB Controller
             product: 82801H (ICH8 Family) USB UHCI Controller #5
             vendor: Intel Corporation
             physical id: 1a.1
             bus info: pci at 0000:00:1a.1
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:21 ioport:a000(size=32)
        *-usb:2
             description: USB Controller
             product: 82801H (ICH8 Family) USB2 EHCI Controller #2
             vendor: Intel Corporation
             physical id: 1a.7
             bus info: pci at 0000:00:1a.7
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pm ehci bus_master cap_list
             configuration: driver=ehci_hcd latency=0
             resources: irq:18 memory:fb101000-fb1013ff
        *-pci:1
             description: PCI bridge
             product: 82801H (ICH8 Family) PCI Express Port 1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci at 0000:00:1c.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master
cap_list
             resources: ioport:5000(size=4096) memory:fb200000-fb3fffff
ioport:fb400000(size=2097152)
        *-pci:2
             description: PCI bridge
             product: 82801H (ICH8 Family) PCI Express Port 4
             vendor: Intel Corporation
             physical id: 1c.3
             bus info: pci at 0000:00:1c.3
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master
cap_list
             resources: ioport:6000(size=8192) memory:fb000000-fb0fffff
ioport:fb600000(size=2097152)
           *-storage
                description: SATA controller
                product: JMB362/JMB363 Serial ATA Controller
                vendor: JMicron Technology Corp.
                physical id: 0
                bus info: pci at 0000:03:00.0
                version: 02
                width: 32 bits
                clock: 33MHz
                capabilities: storage pm pciexpress ahci_1.0 bus_master
cap_list
                configuration: driver=ahci latency=0
                resources: irq:19 memory:fb000000-fb001fff
           *-ide
                description: IDE interface
                product: JMB362/JMB363 Serial ATA Controller
                vendor: JMicron Technology Corp.
                physical id: 0.1
                bus info: pci at 0000:03:00.1
                logical name: scsi4
                version: 02
                width: 32 bits
                clock: 33MHz
                capabilities: ide pm bus_master cap_list emulated
                configuration: driver=pata_jmicron latency=0
                resources: irq:16 ioport:6000(size=8) ioport:6400(size=4)
ioport:6800(size=8) ioport:6c00(size=4) ioport:7000(size=16)
              *-cdrom
                   description: DVD-RAM writer
                   product: DVD RW AD-7173A
                   vendor: Optiarc
                   physical id: 0.0.0
                   bus info: scsi at 4:0.0.0
                   logical name: /dev/cdrom
                   logical name: /dev/cdrw
                   logical name: /dev/dvd
                   logical name: /dev/dvdrw
                   logical name: /dev/scd0
                   logical name: /dev/sr0
                   version: 1-01
                   serial: [Optiarc DVD RW AD-7173A 1-01 Jul11,2006
                   capabilities: removable audio cd-r cd-rw dvd dvd-r
dvd-ram
                   configuration: ansiversion=5 status=nodisc
        *-pci:3
             description: PCI bridge
             product: 82801H (ICH8 Family) PCI Express Port 5
             vendor: Intel Corporation
             physical id: 1c.4
             bus info: pci at 0000:00:1c.4
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master
cap_list
             resources: ioport:8000(size=4096) memory:f7000000-f8ffffff
ioport:fb800000(size=2097152)
           *-network
                description: Ethernet interface
                product: 88E8056 PCI-E Gigabit Ethernet Controller
                vendor: Marvell Technology Group Ltd.
                physical id: 0
                bus info: pci at 0000:04:00.0
                logical name: eth0
                version: 12
                serial: 00:16:e6:d3:4a:83
                size: 100MB/s
                capacity: 1GB/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm vpd msi pciexpress bus_master cap_list rom
ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd
autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=sky2
driverversion=1.28 duplex=full firmware=N/A ip=10.186.15.24 latency=0
link=yes multicast=yes port=twisted pair speed=100MB/s
                resources: irq:40 memory:f8000000-f8003fff
ioport:8000(size=256) memory:fb800000-fb81ffff
        *-usb:3
             description: USB Controller
             product: 82801H (ICH8 Family) USB UHCI Controller #1
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci at 0000:00:1d.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:23 ioport:a400(size=32)
        *-usb:4
             description: USB Controller
             product: 82801H (ICH8 Family) USB UHCI Controller #2
             vendor: Intel Corporation
             physical id: 1d.1
             bus info: pci at 0000:00:1d.1
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:19 ioport:a800(size=32)
        *-usb:5
             description: USB Controller
             product: 82801H (ICH8 Family) USB UHCI Controller #3
             vendor: Intel Corporation
             physical id: 1d.2
             bus info: pci at 0000:00:1d.2
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:18 ioport:ac00(size=32)
        *-usb:6
             description: USB Controller
             product: 82801H (ICH8 Family) USB2 EHCI Controller #1
             vendor: Intel Corporation
             physical id: 1d.7
             bus info: pci at 0000:00:1d.7
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pm ehci bus_master cap_list
             configuration: driver=ehci_hcd latency=0
             resources: irq:23 memory:fb100000-fb1003ff
        *-pci:4
             description: PCI bridge
             product: 82801 PCI Bridge
             vendor: Intel Corporation
             physical id: 1e
             bus info: pci at 0000:00:1e.0
             version: f2
             width: 32 bits
             clock: 33MHz
             capabilities: pci subtractive_decode bus_master cap_list
             resources: ioport:9000(size=4096) memory:f9000000-faffffff
ioport:fba00000(size=1048576)
           *-network
                description: Ethernet controller
                product: 82557/8/9/0/1 Ethernet Pro 100
                vendor: Intel Corporation
                physical id: 0
                bus info: pci at 0000:05:00.0
                version: 08
                width: 32 bits
                clock: 33MHz
                capabilities: pm bus_master cap_list rom
                configuration: driver=ec_e100 latency=64 maxlatency=56
mingnt=8
                resources: irq:20 memory:fa100000-fa100fff
ioport:9000(size=64) memory:fa000000-fa0fffff memory:fba00000-fbafffff
        *-isa
             description: ISA bridge
             product: 82801HB/HR (ICH8/R) LPC Interface Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci at 0000:00:1f.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master cap_list
             configuration: latency=0
        *-ide:0
             description: IDE interface
             product: 82801H (ICH8 Family) 4 port SATA IDE Controller
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci at 0000:00:1f.2
             logical name: scsi0
             version: 02
             width: 32 bits
             clock: 66MHz
             capabilities: ide pm bus_master cap_list emulated
             configuration: driver=ata_piix latency=0
             resources: irq:19 ioport:b400(size=8) ioport:b800(size=4)
ioport:bc00(size=8) ioport:c000(size=4) ioport:c400(size=16)
ioport:c800(size=16)
           *-disk
                description: ATA Disk
                product: WDC WD2500YD-01N
                vendor: Western Digital
                physical id: 0.0.0
                bus info: scsi at 0:0.0.0
                logical name: /dev/sda
                version: 10.0
                serial: WD-WCANK9129706
                size: 233GiB (251GB)
                capabilities: partitioned partitioned:dos
                configuration: ansiversion=5 signature=000659d4
              *-volume:0
                   description: EXT4 volume
                   vendor: Linux
                   physical id: 1
                   bus info: scsi at 0:0.0.0,1
                   logical name: /dev/sda1
                   logical name: /
                   version: 1.0
                   serial: 4b042933-2d75-4bb5-ae71-57bc907102cf
                   size: 228GiB
                   capacity: 228GiB
                   capabilities: primary bootable journaled
extended_attributes large_files huge_files dir_nlink recover extents ext4
ext2 initialized
                   configuration: created=2011-02-18 12:20:31
filesystem=ext4 lastmountpoint=/m�,�����u���@;Ո���o�����8����Dā��
modified=2011-09-07 12:04:15 mount.fstype=ext4
mount.options=rw,relatime,errors=remount-ro,barrier=1,data=ordered
mounted=2011-09-13 15:44:38 state=mounted
              *-volume:1
                   description: Extended partition
                   physical id: 2
                   bus info: scsi at 0:0.0.0,2
                   logical name: /dev/sda2
                   size: 5878MiB
                   capacity: 5878MiB
                   capabilities: primary extended partitioned
partitioned:extended
                 *-logicalvolume
                      description: Linux swap / Solaris partition
                      physical id: 5
                      logical name: /dev/sda5
                      capacity: 5878MiB
                      capabilities: nofs
        *-serial UNCLAIMED
             description: SMBus
             product: 82801H (ICH8 Family) SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci at 0000:00:1f.3
             version: 02
             width: 32 bits
             clock: 33MHz
             configuration: latency=0
             resources: memory:fb102000-fb1020ff ioport:500(size=32)
        *-ide:1
             description: IDE interface
             product: 82801H (ICH8 Family) 2 port SATA IDE Controller
             vendor: Intel Corporation
             physical id: 1f.5
             bus info: pci at 0000:00:1f.5
             version: 02
             width: 32 bits
             clock: 66MHz
             capabilities: ide pm bus_master cap_list
             configuration: driver=ata_piix latency=0
             resources: irq:19 ioport:d000(size=8) ioport:d400(size=4)
ioport:d800(size=8) ioport:dc00(size=4) ioport:e000(size=16)
ioport:e400(size=16)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.rtai.org/pipermail/rtai/attachments/20110913/01db2738/attachment-0001.html>


More information about the Rtai mailing list