« Back to Technical Questions

futex and real-time applications

Combination View Flat View Tree View
Threads [ Previous | Next ]
I am porting my application from Fedora Core 6. Following the AXP developers' guide, I have a base system with my libc installed in /custom/lib. It works fine for programs like ls and bash, but a basic bringup of my application segfaults. strace shows that it happens after a call to the kernel API futex(): (BTW, I prefixed all the console output with '|'. The rich text editor mangles the console printouts.)

|root@axp-vm# strace /custom/lib/ld-2.5.so --library-path /custom/lib ./my-app -version
|
| ... snip many lines ...
|stat64("/path/to/my/shared.so", {st_mode=S_IFREG|0755, st_size=61023, ...}) = 0
|futex(0x40019064, FUTEX_WAKE, 2147483647) = 0
|*** SIGSEGV (Segmentation fault) @ 0 (0) ---
|+++ killed by SIGSEGV +
|root@axp-vm#

In my Fedora development platform, I see the symbols exist:

|root@fedora ~# grep futex /boot/System.map-2.6.18-1.2798.fc6
|c0432c60 W compat_sys_futex
|c04355a8 t hash_futex
|c0435633 t futex_poll
|c043565a t futexfs_get_sb
|c043566e t get_futex_key
|c043580d t wake_futex
|c0435859 t futex_requeue
|c0435a86 t futex_wake
|c0435b3c T handle_futex_death
|c0435bb9 t futex_close
|c0435bd2 t futex_handle_fault
|c0435d40 t futex_lock_pi
|c04365b4 T do_futex
|c043712a T sys_futex
|c0673a80 d futex_fs_type
|c0673aa0 d futex_fops
|c07eeaa0 b futex_queues
|c07f02a0 b futex_mnt
|root@fedora ~#

But, I can't find a symbol map for the AXP kernel (as there is no /boot) or /proc/kallsyms for me to check for sure.

AXP information:
|root@axp-vm# uname -a
|Linux AXP-blade 2.6.14.3-vs2.0.1cisco #1 Mon Aug 25 14:23:58 PDT 2008 i686 unknown unknown GNU/Linux

So two questions:
1. Can you confirm that futex() is not included in your kernel?

2. How do you support real-time applications on the AXP? My application uses futex() to manage locking for real-time threads that execute every 20ms.

Oops. Bad form to answer your own post, but... a re-read of my trace, and I see that futex actually returns 0... so it must exist.

|futex(0x40019064, FUTEX_WAKE, 2147483647) = 0

I have some more looking to do for my segfault... sorry.

No problem. Let us know if you need further assistance.