Xenomai v2.4-rc4
Here is the fourth candidate release for the v2.4.x branch. With the v2.3.x maintenance cycle soon coming to an end after nearly a year since it has started, v2.4 is going to be our next stable branch for quite some time, so I would suggest that you make sure it can run your favourite board(s) _now_.
[nucleus]
* Fix /proc support for timebases.
[posix]
* Fix random hang in per-process cleanup code.
[native]
* Fix double free issue upon failure to create a new task.
[vxworks]
* Fix implementation of watchdog support in user-space.
* Fix double free issue upon failure to create a new task.
[vrtx]
* Fix double free issue upon failure to create a new task.
[rtdm]
* Add private data pointer to the rtdm_device structure.
[can]
* Support new resource management of arch/powerpc tree properly.
* Fix handling of the "port" module parameter.
[testsuite]
* Prevent overflow in timer handler test.
* Close race window in timer setup code.
[powerpc]
* Update Adeos support for 2.6.20.
* Upgrade Adeos support to 2.6.23.
[i386]
* SMI: Detect ICH-4 chipsets.
* Sanitize calibration code.
* Fix timer setup code (mostly for GENERIC_CLOCKEVENTS, but not only).
* Upgrade Adeos support to 2.6.23.
[x86_64]
* SMI: Detect ICH-4 chipsets.
* Sanitize calibration code.
* Upgrade Adeos support to 2.6.23.
http://download.gna.org/xenomai/testing/xenomai-2.4-rc4.tar.bz2
Signature · 1 line
Philippe.
Hi,
We tested xenomai 2.4-rc4 on a MPC5200B board and a Denx 2.6.23 kernel and for us it runs very stable. In contrary to 2.4.25 + Xenomai 2.3.x debugging applications on 2.4-rc4 with a recent gdb works very well multithreaded, either locally or remote.
However we think there might be a problem with pthread_cond_timedwait() in the POSIX skin.
It seems that after return of ETIMEOUT the mutex is not acquired again by the function automatically as stated by the standard, so that an additional pthread_mutex_lock() is necessary. Otherwise a subsequent call to pthread_cond_timedwait() would return EPERM, which is the case if the mutex is not owned by the calling thread.
The attached code illustrates this behaviour. Replacing #if 1 with #if 0 will cause the behaviour to show up. Furthermore #if 0 will cause a segmentation fault, which seems to be xenomai related.
Compiling without Xenomai (just with native glibc 2.5) shows expected behaviour.
Best regards,
Daniel Schnell.
Quoted 5 lines · Philippe Gerum
Here is the fourth candidate release for the v2.4.x branch. With the v2.3.x maintenance cycle soon coming to an end after nearly a year since it has started, v2.4 is going to be our next stable branch for quite some time, so I would suggest that you make sure it can run your favourite board(s) _now_.
Quoted 4 lines · Daniel Schnell
However we think there might be a problem with
pthread_cond_timedwait()in the POSIX skin.
It seems that after return of ETIMEOUT the mutex is not acquired again by the function automatically
Ok, do you still observe the same behaviour with the attached patch ?
Signature · 1 line
Gilles Chanteperdrix
skins/posix/syscall.c +1 -1
@@ -1549,7 +1549,7 @@ } -if (!err || err ==EINTR ) +if (!err || err ==EINTR || err ==ETIMEDOUT )__xn_copy_to_user (curr, (void __user *)__xn_reg_arg3 (regs), &count,sizeof (count));
Quoted 7 lines · Gilles Chanteperdrix
Quoted 4 lines · Daniel Schnell
However we think there might be a problem with
pthread_cond_timedwait()in the POSIX skin.
It seems that after return of ETIMEOUT the mutex is not acquired again by the function automaticallyOk, do you still observe the same behaviour with the attached patch ?
No, this patch fixes the issues. Thanks.
Was the segmentation fault corelated to that fix or is it still waiting somewhere ?
Best regards,
Daniel Schnell.
Quoted 7 lines · Daniel Schnell
Quoted 6 lines · Gilles Chanteperdrix
Quoted 4 lines · Daniel Schnell
However we think there might be a problem with
pthread_cond_timedwait()in the POSIX skin.
It seems that after return of ETIMEOUT the mutex is not acquired again by the function automatically
Quoted 7 lines
Quoted 1 line
Ok, do you still observe the same behaviour with the attached patch ?
No, this patch fixes the issues. Thanks.
Was the segmentation fault corelated to that fix or is it still waiting somewhere ?
I do not know, I will check this tonight.
Signature · 1 line
Gilles Chanteperdrix
Quoted 7 lines · Daniel Schnell
Quoted 6 lines · Gilles Chanteperdrix
Quoted 4 lines · Daniel Schnell
However we think there might be a problem with
pthread_cond_timedwait()in the POSIX skin.
It seems that after return of ETIMEOUT the mutex is not acquired again by the function automatically
Quoted 7 lines
Quoted 1 line
Ok, do you still observe the same behaviour with the attached patch ?
No, this patch fixes the issues. Thanks.
Was the segmentation fault corelated to that fix or is it still waiting somewhere ?
The segmentatino fault was due to a cleanup handler "pthread_cleanup_push"ed by __wrap_pthread_cond_timedwait that was not pthread_cleanup_poped in the error case.
Signature · 1 line
Gilles Chanteperdrix.