[Vm-dev] Camera sig fault on 64 bits machines.

Eliot Miranda eliot.miranda at gmail.com
Tue Apr 22 19:26:57 UTC 2014


On Tue, Apr 22, 2014 at 8:09 AM, Andreas Wacknitz <a.wacknitz at gmx.de> wrote:

>
> Hi Eliot,
>
> Thanks again for your help.
>
> Am 21.04.2014 um 22:56 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
>
> Hi Andreas,
>
>
> On Sat, Apr 19, 2014 at 2:52 PM, Andreas Wacknitz <a.wacknitz at gmx.de>wrote:
>
>>
>> Hi Eliot,
>>
>> Today I was able to work on this problem again. Alas heartbeat_handler()
>> in sqUnixTimerHeartbeat.c is not called automatically as it should be.
>> Only if I trigger an external ALRM signal (by means of signal -ALRM
>> <pid>) it’s being called. I wasn’t able to find out how the trigger for it
>> is being
>> set.
>>
>
> Hmmm.  In sqUnixTimerHeartbeat.c::ioInitHeartbeat() there's a sigaction
> call that establishes heartbeat_handle as the handler for SIGALRM.  Perhaps
> on FreeBSD or OpenSolaris you need to rearm the signal handler on each
> delivery?  But perhaps there's a flag you can set in the sigaction that
> avoids having to do this.
>
> No, when I trigger SIGALRM from the outside the image works (albeit very
> slow). First I emitted SIGALRM by means of kill -SIGALRM <pid> from the
> shell; later I wrote a simple C program to do that for me :)
>
>
>
>
>> The only place I found a nanosleep() call was in block() in sqUnixMain.c.
>>
>
> See the nanosleep in sqUnixHeartbeat.c::beatStateMachine.
>
> Yeah, I don’t know how I could miss this. I will debug a little bit in
> order to find out why this doesn’t work as expected on OpenSolaris.
> After the initial step through heartbeat, there won’t be any
> heartbeat_handler calls triggered from within the vm…
>
>
>
>
>> BTW what does with ticker and without ticker mean in respect to the
>> heartbeat?
>>
>
> The Qwaq/Teleplace/Terf VM needs support for sound processing.  The ticker
> is the thread or call that provides cycles for sound processing.
>
> But look, if FreeBSD provides pthreads you should try and use
> sqUnixHeartbeat.c instead of sqUnixTimerHeartbeat.c.
>
> I already did that yesterday. Alas it’s only working with superuser
> rights, otherwise I’ll get "pthread_setschedparam failed; consider using
> ITIMER_HEARTBEAT: Not owner“.
>

Ah, ok.  That was the situation on linux before the 2.6.16 kernel (IIRC).
 I guess you're stuck with the getitimer heartbeat.  So the issue is how to
rearm the signal handler.  If necessary put a call to signal/sigaction in
heartbeat_handler.



> I will also investigate further here so maybe I will get this working.
>
>
> HTH,
> Eliot
>
>
> Regards,
> Andreas
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140422/e7e4a3aa/attachment-0001.htm


More information about the Vm-dev mailing list