Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

iobasic.t segfault: os x 10.8.5 w/ clang 3.3 #6

Closed
jbergstroem opened this issue Sep 17, 2013 · 6 comments
Closed

iobasic.t segfault: os x 10.8.5 w/ clang 3.3 #6

jbergstroem opened this issue Sep 17, 2013 · 6 comments
Labels

Comments

@jbergstroem
Copy link

Not able to reproduce this on every run, but here's a backtrace:

Program exited normally.
(gdb) run
Starting program: /Users/jbergstroem/Work/libphenom/tests/iobasic.t
1..13
ok 1 - PH_OK == ph_nbio_init(0)
ok 2 - PH_OK == ph_job_init(&pipe_job)
ok 3 - 0 == ph_pipe(pipe_fd, PH_PIPE_NONBLOCK)
ok 4 - set up ping
ok 5 - 100ms resolution: diff=100
ok 6 - 1 == read(pipe_fd[0], &buf, sizeof(buf))
ok 7 - 100ms resolution: diff=101

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000004
[Switching to process 21613 thread 0x10b]
0x00000001000165f5 in ck_epoch_synchronize (global=<value temporarily unavailable, due to optimizations>, record=0x0) at thirdparty/ck/src/ck_epoch.c:395
395     record->epoch = delta;
(gdb) bt
#0  0x00000001000165f5 in ck_epoch_synchronize (global=<value temporarily unavailable, due to optimizations>, record=0x0) at thirdparty/ck/src/ck_epoch.c:395
#1  0x000000010001660e in ck_epoch_barrier (global=0x100020600, record=0x0) at thirdparty/ck/src/ck_epoch.c:403
#2  0x000000010000d149 in destroy_thread (ptr=0x101200008) at corelib/thread.c:108
#3  0x00000001001104b0 in _pthread_tsd_cleanup ()
#4  0x00000001001099d2 in _pthread_exit ()
#5  0x000000010010977d in _pthread_start ()
#6  0x00000001000f61a1 in thread_start ()
Current language:  auto; currently minimal
@ghost ghost assigned wez Sep 17, 2013
@wez
Copy link
Contributor

wez commented Sep 17, 2013

Do you only see this with clang?

@wez
Copy link
Contributor

wez commented Sep 17, 2013

I think 75a11cb will get you up and running

@jbergstroem
Copy link
Author

Can only reproduce this with clang. Thought it was some kind of optimisation error (auto* seems to imply CFLAGS=-O2), but that doesn't seem to be the case either. Here's the latest bt from b23ae9e:

Starting program: /Users/jbergstroem/Work/libphenom/tests/iobasic.t
1..13
ok 1 - PH_OK == ph_nbio_init(0)
ok 2 - PH_OK == ph_job_init(&pipe_job)
ok 3 - 0 == ph_pipe(pipe_fd, PH_PIPE_NONBLOCK)
ok 4 - set up ping
ok 5 - 100ms resolution: diff=100
ok 6 - 1 == read(pipe_fd[0], &buf, sizeof(buf))
ok 7 - 100ms resolution: diff=101

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000004
[Switching to process 10997 thread 0x10b]
0x000000010002678f in ck_epoch_synchronize (global=0x100034710, record=0x0) at thirdparty/ck/src/ck_epoch.c:395
395     record->epoch = delta;
(gdb) bt
#0  0x000000010002678f in ck_epoch_synchronize (global=0x100034710, record=0x0) at thirdparty/ck/src/ck_epoch.c:395
#1  0x000000010002694d in ck_epoch_barrier (global=0x100034710, record=0x0) at thirdparty/ck/src/ck_epoch.c:403
#2  0x0000000100014705 in ph_thread_epoch_barrier () at corelib/thread.c:353
#3  0x0000000100014175 in ph_thread_boot (arg=0x101184ab8) at corelib/thread.c:223
#4  0x0000000100127772 in _pthread_start ()
#5  0x00000001001141a1 in thread_start ()

Feel free to ping me at IRC (jbergstroem@freenode) if you want to chat.

@wez
Copy link
Contributor

wez commented Sep 18, 2013

ae1968f should help with this

@jbergstroem
Copy link
Author

(confirmed that it does)

@wez
Copy link
Contributor

wez commented Sep 18, 2013

I'll close this crash issue, and open a separate one to track the potential leak; thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants