| slava | any sbcl hackers know of known problems with setitimer on mac os x? |
| chandler | no, nothing that I recall |
| slava | if i GC in a loop with profiling enabled, i get a weird crash eventually doesn't happen on linux, only on mac os x does sb-sprof use setitimer? |
| chandler | oh. now that you mention it, I do recall some OS X-specific sb-sprof problems, but I never worked on sb-sprof |
| jsnell | I don't remember hearing anything particular about sb-sprof problems on OS X (as opposed to ppc) |
| slava | i'm on os x/ppc. |
| chandler | jsnell: you're right, quick check agains gmane suggests it was just bad interrupt safety on ppc |
| jsnell | those were more problems with sbcl, not ppc right but it wouldn't particularily surprise me if there was some problem with setitimer on os x. they've certainly managed to screw up everything else related to signals |
| lucca | it's quite a mach-ery of an operating system |
| slava | jsnell: any ideas why setitimer(...) with a no-op signal handler function would change the behavior of the program? |
| Zhivago | what happens if you take out the setitimer, but leave in the handler? |
| slava | that works... |
| Zhivago | handler on an alternate stack? |
| slava | i don't think so, but why would that make a difference? |
| jsnell | are you using mach exceptions or posix signal handlers? |
| slava | posix signal handlers but there is another thread hanging around for mach exceptions i'll try disabling it |
| Zhivago | it would only matter if it were corrupting the stack or something |
| foom | or if gc was triggering while in the signal handler, say. |
| slava | the signal handler is a no-op, and there's no GC to trigger, this is C i'm implementing a profiler much like sb-sprof, so i aask here |
| foom | wait, this isn't with sbcl? |
| slava | no, i was asking if the sbcl developers encountered something similar |
| foom | what's the behavior difference your C program sees? |
| slava | i have a GC (implemented in C). if i enable profiling and run the GC in a loop, it crashes after about 10 iterations by 'enable profiling' i mean 'enable setitimer with an empty signal handler'... i've narrowed it down to this |
| foom | ah. signal handlers do of course interrupt some syscalls. but that's probably not the problem with your GC. :) |
| slava | i thought it could be that, but i don't think the GC makes any syscalls i'll try running in truss wait os x doesn't have that; what's the strace equivalent again? |
| Xach | ktrace/kdump? |
| slava | ok |
| nyef | Heh. The thought occurs: no asynchronous interrupts => no C-c + no statistical profiler via an interval timer. |