I feel that the signal handling of SIGUSR also has the same problems
that the vt switching code does.

in signals.c  there is this

static void
signal_handler( int num, siginfo_t *info, void *foo )
{
....
/* Loop through all handlers. */
     pthread_mutex_lock( &handlers_lock );
....
}

This should be changed either to use sigwait or semaphores.

Mike



On 11/30/05, Attilio Fiandrotti <[EMAIL PROTECTED]> wrote:
> Denis Oliver Kropp wrote:
> > Quoting Attilio Fiandrotti:
> >
> >>-Crash when a DFB app draws on a VT after a VT switch has occourred
> >
> >
> > Only non-windowed applications can distort other VTs by drawing,
> > but they shouldn't crash, at least without acceleration.
>
> (note that i'm still recompiling from scratch GTKDFB 2.8.3 and other
> needed libraries from scratch, so ATM i can only test to non windowed
> DFB apps like "simple" or "dfbtest_timer")
>
> On the VT switching issues this is what i got
>
> -"simple" crashes with the error message
>
> (!) Direct/Thread: Killing 'X' (134547904)!
> free(): invalid pointer 0x8054f90!
>
> -"dfbtest_timer" doesn't crash but continues drawing on the active VT
> producing this warning
>
>   (!!!)  *** ONCE [accessing video memory during suspend] ***
> [surfaces.c:804 in dfb_surface_software_lock()]
>
> >>-Crash when a DFB app has been switched to a different VT and receives a
> >>signal
> >
> >
> > Receiving a termination signal while being suspended also worked.
>
> To test signal handling functionalities i've sent SIGUSR1 and then
> SIGUSR2 to the "simple" test app and this is the result.
> Both signals were sent to the running dfb test app via a ssh console in
> order not to do VT switching on the graphic server, this is the result
>
> -"simple" crashes with
>
> debian:/home/attilio# kill -s SIGUSR1 20021
> debian:/home/attilio# (!) DirectFB/fbdev/vt: VT_RELDISP failed
>      --> Invalid argument
> (!) Direct/Thread: Killing 'X' (134547904)!
> free(): invalid pointer 0x8054f90!
>
>
> -"dfbtest_timer" was tested using first a SIGUSR1/SIGUSR2 pair of
> signals and then sending it SIGUSR1 twice after being restarted
>
> --SIGUSR1  nad then SIGUSR2
> debian:/home/attilio# kill -s SIGUSR1 20026
> debian:/home/attilio# (!) DirectFB/fbdev/vt: VT_RELDISP failed
>      --> Invalid argument
>   (!!!)  *** ONCE [accessing video memory during suspend] ***
> [surfaces.c:804 in dfb_surface_software_lock()]
>
> debian:/home/attilio# kill -s SIGUSR2 20026
> debian:/home/attilio# (*) Direct/Thread: Running 'PS/2 Input' (INPUT,
> 20031)...
> (*) Direct/Thread: Running 'Keyboard Input' (INPUT, 20032)...
> (!) DirectFB/FBDev: Panning display failed!
>      --> Invalid argument
>
> the app continued working as expected, no matter the warning
>
> --SIGUSR1 sent twice
>
> debian:/home/attilio# kill -s SIGUSR1 20044
> debian:/home/attilio# (!) DirectFB/fbdev/vt: VT_RELDISP failed
>      --> Invalid argument
>   (!!!)  *** ONCE [accessing video memory during suspend] ***
> [surfaces.c:804 in dfb_surface_software_lock()]
>
> debian:/home/attilio# kill -s SIGUSR1 20044
> debian:/home/attilio# (!) Direct/Thread: Killing '' (134548096)!
> (!) [20046:    0.000] --> Caught signal 11 (at 0x48262848, invalid
> address) <--
>
> debian:/home/attilio# ps aux |grep dfbtest
> root     20044  1.3  0.3  7232 2024 pts/0    S    23:58   0:00
> ./dfbtest_timer
> root     20045  0.0  0.3  7232 2024 pts/0    S    23:58   0:00
> ./dfbtest_timer
> root     20046  0.0  0.3  7232 2024 pts/0    S<   23:58   0:00
> ./dfbtest_timer
>
>
>
> as you can see the two apps behaves differently in all tests, even if
> "dfbtest_timer" is nothing more than a slightly modified "simple".
> Do you think this means something is broken in DFB signal handling
> /terminal switching functions or is the "simple" app to be broken?
> Or maybe is my debian system that is broken?
>
> Tomorrow i should be able to recompile GTKDFB 2.8.3 and do similar tests
>   with simple GTKDFB apps.
> Note that fixing those crashes that occours when GTKDFB apps are running
> and the user does VT switching or signal sending is performed is very
> important for the debian-installer since the user must be able to switch
> from VT to VT to do manual operations and the debian-installer must be
> able to receive SIGUSR1/2 signals from other d-i components.
>
> ciao
>
> Attilio
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to