John,
the HAL_LIB error message you got and the divide error raise my gut feeling
that something is wrong with in-kernel 64bit integer division on x32_64; clock
periods are long long; maybe there's some inline assembly somewhere which breaks
maybe that can be verified in a standalone program?
---
I'd be interested if you can verify the below error as well
also, can you verify you have the same strange '[permanent]' tag in lsmod as me?
(post failure described below):
root@atom:~# lsmod
Module Size Used by
sampler 14143 1 [permanent]
hal_lib 39412 1 sampler,[permanent]
rtapi 46610 2 sampler,hal_lib,[permanent]
xeno_math 12602 1 rtapi,[permanent]
binfmt_misc 16829 1
-----
meanwhile I could produce an oops during module load, but different from yours
(null pointer deref in-kernel), with the 32bit 2.6.38.8-xenomai+
to trigger the error:
mah@atom:~/emc2-dev/tests/abs.0$ realtime start
mah@atom:~/emc2-dev/tests/abs.0$ halcmd -f -k
halcmd: loadrt sampler cfg=ff depth=350
<stdin>:1: child did not exit normally
<stdin>:1: insmod failed, returned -1
See the output of 'dmesg' for more information.
halcmd:
(which is part of tests/abs.0, so runtests should cause it)
root@atom:~# dmesg
[ 252.764152] RTAI[math]: loaded.
[ 260.200891] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 260.201030] IP: [<c1072256>] sys_init_module+0x2c6/0x1b80
[ 260.201132] *pde = 00000000
[ 260.201184] Oops: 0000 [#1] SMP
[ 260.201244] last sysfs file:
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:00.0/local_cpus
[ 260.201381] Modules linked in: sampler(+) hal_lib rtapi xeno_math
binfmt_misc nfsd exportfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc dm_crypt
snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm
snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq ppdev snd_timer
snd_seq_device snd psmouse parport_pc serio_raw soundcore snd_page_alloc
parport usbhid hid i915 drm_kms_helper drm ahci r8169 libahci i2c_algo_bit video
[ 260.202135]
[ 260.202164] Pid: 1779, comm: insmod Not tainted 2.6.38.8-xenomai+ #1
/D525MW
[ 260.202321] EIP: 0060:[<c1072256>] EFLAGS: 00010246 CPU: 0
[ 260.202415] EIP is at sys_init_module+0x2c6/0x1b80
[ 260.204015] EAX: 00000000 EBX: f90d9000 ECX: 00000000 EDX: 00000001
[ 260.204015] ESI: 00000000 EDI: 00000001 EBP: f0d9bfac ESP: f0d9bf24
[ 260.204015] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 260.204015] Process insmod (pid: 1779, ti=f0d9a000 task=f0d3dee0
task.ti=f0d9a000)
[ 260.204015] I-pipe domain Linux
[ 260.204015] Stack:
[ 260.204015] 000006dc c16d39a4 00000000 c16575e6 f90d900c f13debc4 f90be460
00000004
[ 260.204015] f90d84e8 0000000b f90d9048 00000025 00000001 f0d9bf5c f90bd000
00017cc8
[ 260.204015] f90cf3c4 f90cf262 f90d4a4c f13d8180 00003000 00003040 00000000
00000000
[ 260.204015] Call Trace:
[ 260.204015] [<c1002ce1>] sysenter_do_call+0x12/0x16
[ 260.204015] Code: 00 00 8b 93 e8 00 00 00 8b b3 e0 00 00 00 89 34 24 e8 1f
e3 ff ff 8b 83 80 01 00 00 85 c0 74 19 31 f6 8d 76 00 8b 83 7c 01 00 00 <ff> 14
b0 83 c6 01 3b b3 80 01 00 00 72 ec 8b 83 d4 00 00 00 85
[ 260.204015] EIP: [<c1072256>] sys_init_module+0x2c6/0x1b80 SS:ESP
0068:f0d9bf24
[ 260.204015] CR2: 0000000000000000
[ 260.366000] ---[ end trace 7dbf30905148abaa ]---
Am 10.11.2012 um 08:06 schrieb John Morris:
> Hi Michael,
>
> I've been whacking away ('hacking' is too glamorous a term for my clumsy
> bumbling) at getting xenomai-kernel to work today. I did make some
> progress; there's a new commit that fixes a problem where symbols in
> xeno_math.ko are not being shared with other modules, resulting in
> rtapi.ko not loading.
>
> Xenomai seems to work properly. The Xenomai 'latency' and 'xeno-test'
> programs look great, with <3uS/<9uS latency in kernel task and user task
> modes, respectively. I followed all the guides I could find, and added
> '--enable-dlopen-skins' to the user tools build, per your instructions.
>
> The LinuxCNC latency-test, however, results in one of a few bad endings.
>
> - Exits after writing the lines from 'Symptom 1' below into syslog; this
> probably happens on the first run after a reboot.
>
> - (One time only) a kernel oops, see 'Symptom 2' below; system kept running
>
> - Machine hangs; CPU fan spins at max speed until system reset.
>
> Let me know what bells these ring.
>
> John
>
>
>
> Symptom 1:
> RTAI[math]: loaded.
> HAL_LIB: ERROR: clock period too long: 1000000000000
> THREADS: ERROR: could not create thread 'slow'
> RTAI[math]: unloaded.
>
> Symptom 2:
> RTAI[math]: loaded.
> divide error: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/module/xeno_nucleus/parameters/xenomai_gid
> CPU 0
> Modules linked in: threads(+) hal_lib rtapi xeno_math nfs fscache
> nfs_acl auth_rpcgss autofs4 lockd sunrpc ipv6 uinput ppdev parport_pc
> parport sg pcspkr k8temp edac_core edac_mce_amd forcedeth i2c_nforce2
> ext4 mbcache jbd2 raid1 firewire_ohci firewire_core crc_itu_t sd_mod
> crc_t10dif sr_mod cdrom pata_amd pata_acpi ata_generic sata_nv radeon
> ttm drm_kms_helper drm i2c_algo_bit i2c_core dm_mirror dm_region_hash
> dm_log dm_mod [last unloaded: xeno_math]
>
> Pid: 17143, comm: insmod Not tainted 2.6.38.8-2.xenomai.el6.x86_64 #1
> /M61P-S3
> RIP: 0010:[<ffffffffa04aad0c>] [<ffffffffa04aad0c>]
> hal_create_thread+0x1fc/0x530 [hal_lib]
> RSP: 0000:ffff8801c09afea8 EFLAGS: 00010256
> RAX: 00000000000186a0 RBX: ffffc90004ffde58 RCX: 0000000000000000
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000063
> RBP: ffff8801c09aff08 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801c097f410
> R13: 00000000000186a0 R14: 0000000000000001 R15: ffffc90004ffde80
> FS: 00007f19885c1700(0000) GS:ffff8800dfc00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f7109cc90f0 CR3: 00000001c09e2000 CR4: 00000000000006f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process insmod (pid: 17143, threadinfo ffff8801c09ac000, task
> ffff88020e728e40)
> Stack:
> ffff8801c09afee8 ffffffff814b67c4 657268745f4c4148 ffffffff00736461
> ffffc90004fbe000 0000000000000001 ffffffffa04bd540 ffffffffa04bd540
> 0000000000000000 ffffffffa04bd020 0000000001276050 0000000000000004
> Call Trace:
> [<ffffffff814b67c4>] ? notifier_call_chain+0x54/0x80
> [<ffffffffa04bd020>] ? init_module+0x0/0x1f4 [threads]
> [<ffffffffa04bd121>] init_module+0x101/0x1f4 [threads]
> [<ffffffff810001e3>] do_one_initcall+0x43/0x1a0
> [<ffffffff8109678a>] sys_init_module+0xba/0x200
> [<ffffffff81002fff>] system_call_fastpath+0x16/0x1b
> Code: 48 8b 48 08 8b 78 10 48 8b b2 98 00 00 00 49 39 f5 0f 82 61 02 00
> 00 48 89 f0 31 d2 48 c1 e8 3f 48 01 f0 48 d1 f8 49 8d 44 05 00 <48> f7
> f6 48 98 48 0f af c6 48 39 c1 48 89 43 08 0f 8f cb 01 00
> RIP [<ffffffffa04aad0c>] hal_create_thread+0x1fc/0x530 [hal_lib]
> RSP <ffff8801c09afea8>
> ---[ end trace 3a9286738b179516 ]---
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers