Mageia Bugzilla – Attachment 4738 Details for
Bug 10289
MCC & mgapplet segfault due to glib2.0/webkit threads (perl segfaulting when having a custom signal handler for SIG_CHILD)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
bug reproducer
mcc (text/plain), 1014 bytes, created by
Thierry Vignaud
on 2014-01-08 00:24:08 CET
(
hide
)
Description:
bug reproducer
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2014-01-08 00:24:08 CET
Size:
1014 bytes
patch
obsolete
>#!/usr/bin/perl > >$SIG{CHLD} = \&sig_child; # will die in Perl_csignalhandler() >use Gtk2 '-init'; >use Gtk2::WebKit; >use POSIX qw(:sys_wait_h); > >my $view = Gtk2::WebKit::WebView->new; >$view->set_size_request(-1, -1); > >my $window_global = Gtk2::Window->new('toplevel'); >$window_global->set_size_request(800, 800); >$window_global->add($view); >$window_global->signal_connect(delete_event => sub { exit(0) }); >$window_global->show_all; > ># THIS IS WHAT CAUSES THREADS TO BREAK HAVOC!!!! ># filling the Webkit WebView causes it to create threads through glib: >Glib::Timeout->add(100, sub { warn ">> HERE2\n"; 0 }); >$view->load_html_string(qq(<HTML> ><BODY> ><A HREF="foobar"><IMG SRC="/usr/share/mcc/themes/default//installremoverpm.png"> >Install & Remove Software</A> ></BODY></HTML>), 'file:///'); > >warn ">> HERE1\n"; >Gtk2->main; > ># got when child died and gone in zombie state >sub sig_child { > my ($_sig) = @_; > my $child_pid; > do { > $child_pid = waitpid(-1, POSIX::WNOHANG); > } while $child_pid > 0; >}
#!/usr/bin/perl $SIG{CHLD} = \&sig_child; # will die in Perl_csignalhandler() use Gtk2 '-init'; use Gtk2::WebKit; use POSIX qw(:sys_wait_h); my $view = Gtk2::WebKit::WebView->new; $view->set_size_request(-1, -1); my $window_global = Gtk2::Window->new('toplevel'); $window_global->set_size_request(800, 800); $window_global->add($view); $window_global->signal_connect(delete_event => sub { exit(0) }); $window_global->show_all; # THIS IS WHAT CAUSES THREADS TO BREAK HAVOC!!!! # filling the Webkit WebView causes it to create threads through glib: Glib::Timeout->add(100, sub { warn ">> HERE2\n"; 0 }); $view->load_html_string(qq(<HTML> <BODY> <A HREF="foobar"><IMG SRC="/usr/share/mcc/themes/default//installremoverpm.png"> Install & Remove Software</A> </BODY></HTML>), 'file:///'); warn ">> HERE1\n"; Gtk2->main; # got when child died and gone in zombie state sub sig_child { my ($_sig) = @_; my $child_pid; do { $child_pid = waitpid(-1, POSIX::WNOHANG); } while $child_pid > 0; }
View Attachment As Raw
Actions:
View
Attachments on
bug 10289
:
4145
|
4146
|
4669
|
4722
|
4723
|
4732
| 4738