I seem to be able to generate this fairly reliably. Here's what gdb shows:
core was generated by `./timer_main'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 odp_atomic_fetch_inc_u64 (atom=<optimized out>)
at ./include/odp/atomic.h:158
158 return __atomic_fetch_add(&atom->v, 1, __ATOMIC_RELAXED);
(gdb) bt
#0 odp_atomic_fetch_inc_u64 (atom=<optimized out>)
at ./include/odp/atomic.h:158
#1 timer_notify (sigval=sigval@entry=...) at odp_timer.c:646
#2 0x00007f9a8b5dbeee in timer_sigev_thread (arg=0x7f9a840008c0)
at ../sysdeps/unix/sysv/linux/timer_routines.c:62
#3 0x00007f9a8adcb6aa in start_thread (arg=0x7f9a889fe700)
at pthread_create.c:333
#4 0x00007f9a8ab00eed in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
It appears that timer_notify() can get called with a bad sigval
occasionally? Since timer_notify uses the returned value as a pointer
without validating it that can cause easy segfaults. I did try adding a
check--if (!tp) return; but I'm still seeing the segfault so something
else may be causing the resulting area to be non-addressable. Perhaps a
clue?
On Wed, Sep 2, 2015 at 10:14 AM, <[email protected]> wrote:
> *Comment # 10 <https://bugs.linaro.org/show_bug.cgi?id=1615#c10> on bug
> 1615 <https://bugs.linaro.org/show_bug.cgi?id=1615> from Stuart Haslam
> <[email protected]> *
>
> I'm still seeing this occasionally, but I'm able to provoke it reliably like
> this;
>
> ulimit -c unlimited
> rm core
> while true; do ./test/validation/timer/timer_main; [ -f core ] && break; done
>
> (may need to modify according to your /proc/sys/kernel/core_pattern)
>
> ------------------------------
> You are receiving this mail because:
>
> - You are the assignee for the bug.
> - You are on the CC list for the bug.
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp