Bug 13161 - [2.7 M2 RC1] Perl can not handle signals
Summary: [2.7 M2 RC1] Perl can not handle signals
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.7
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.7 M3
Assignee: Alexander Kanavin
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-01-31 02:50 UTC by Yi Zhao
Modified: 2019-02-14 05:56 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
test.pl (106 bytes, application/x-perl)
2019-01-31 02:50 UTC, Yi Zhao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2019-01-31 02:50:06 UTC
Created attachment 4427 [details]
test.pl

Image location: https://autobuilder.yocto.io/pub/releases/yocto-2.7_M2.rc1/

Git rev: master/1979d9162a335b7d4718a6697ca57bfa16237f0e

I found the perl can not handle signal on poky with core-image-sato-sdk:
####################################################
root@beaglebone-yocto:~# cat test.pl 
#!/usr/bin/env perl

use strict;
use warnings;

$SIG{INT} = sub { die "Caught a sigint $!" };

sleep(20);
root@beaglebone-yocto:~# chmod a+x ./test.pl 
root@beaglebone-yocto:~# ./test.pl 
No such signal: SIGINT at ./test.pl line 6.
^C
####################################################

Run the test.pl on Ubuntu 16.04, I got the correct result:
####################################################
$ ./test.pl 
^CCaught a sigint Interrupted system call at ./test.pl line 5.
####################################################


Run command perl -e 'foreach (keys %SIG) { print "$_\n" }' to check the signals in perl:

On poky:
#################################################
root@beaglebone-yocto:~# perl -e 'foreach (keys %SIG) { print "$_\n" }'
root@beaglebone-yocto:~# 
################################################

On Ubuntu 16.04:
####################################################
$ perl -e 'foreach (keys %SIG) { print "$_\n" }'
NUM32
XCPU
PROF
STOP
ABRT
PIPE
NUM63
NUM55
NUM48
[snip]
####################################################

This issue happens on both qemu and BSPs.
Comment 1 Ross Burton 2019-01-31 10:14:51 UTC
Try adding 'seq' to HOSTTOOLS and rebuilding perl.
Comment 2 Ross Burton 2019-01-31 15:50:06 UTC
A patch was sent to the list (bitbake.conf: Add seq to HOSTTOOLS) to fix this.
Comment 3 Alexander Kanavin 2019-02-01 13:51:14 UTC
I can confirm that latest poky master fixes this.
Comment 4 Yi Zhao 2019-02-14 05:56:48 UTC
Verified with 2.7 M2 RC2.
Git rev: master/be52da152a4d9f9e798844f592ec9ae7e051c658