[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Signal on Memory volation

Hello Helmut,
Am 15.09.2014, 19:45 Uhr, schrieb OL:

Finaly I understand my mistake, I want to add signal handler inside AES to manage crash in gem application for debug, so I install handler, unfortunately the handler is in protected area of AES in supervisor so in fact I have double bus error one from the application the second one from the signal handler itself, Mint doesn't like this case and freeze if I try to kill the application, the system is in panic. Interesting case.

Interesting, yes. I can't tell what to do right now. In XaAES there is something similar: It parses the content of the alert-text (CE_fa() in k_main.c):

   if( pid >= 0 && strstr( data->buf, "KILLED:" ) )
      short s;
      long r;
if( pid == C.Aes->p->pid || pid == C.Hlp->p->pid || pid == C.Aes->tp->pid )
      for( s = 0; !(r=ikill(pid, 0)) && s < 666; s++ )
        ikill(pid, SIGKILL);

to be sure the app is really gone. But that is not very elegant.

For a long time I use Pwait3() to remove zombie and I think it work but for debug it's sometime not very usefull as system crash before I can know the program crash, with signal I think in this case be able to know where the program crash except writing all AES call. I have an idea to fix the problem.

But I'm very surprise that Mint crash because the signal can't be delivered when the handler crash.

Thanks a lot.