Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/non_existent_path.t occasionally hangs on Android #15

Open
Hugmeir opened this issue Feb 5, 2014 · 1 comment
Open

t/non_existent_path.t occasionally hangs on Android #15

Hugmeir opened this issue Feb 5, 2014 · 1 comment

Comments

@Hugmeir
Copy link

Hugmeir commented Feb 5, 2014

With a big emphasis on occasionally, borderline never. Feel free to close this and consider it as just informative, since there isn't much to fix.

This is on Android 2.3.3, on relatively old hardware (armv7 1024 MHz processor, 300MB RAM), perl 5.19.9 (blead as of yesterday). The test file looks simple enough, so it's probably the alarm() firing off too quickly/too late on this processor.

@eserte
Copy link

eserte commented Nov 30, 2015

While doing some research for the fail report http://www.cpantesters.org/cpan/report/3edc5590-8cbd-11e5-a3d8-5587f83dfc95 (which does not hang, but fails in the same test script), I managed to produce a hang on a "normal" Linux system. For this I had to hack the test script to use a shorter alarm value, something like Time::HiRes::alarm(0.002). It seems that under some circumstances, if SIGALRM is delivered while dynamically loading File::Find and its dependencies, the signal handler never gets called. Here's an strace log showing this situation. Perl was started with "unsafe signals" here (PERL_SIGNALS=unsafe), but it happens with safe signals, too:

8559  21:03:53.423201 open("/opt/perl-5.22.0/lib/5.22.0/File/Find.pm", O_RDONLY) = 3 <0.000018>
8559  21:03:53.423264 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ffceb77b3f0) = -1 ENOTTY (Inappropriate ioctl for device) <0.000015>
8559  21:03:53.423315 lseek(3, 0, SEEK_CUR) = 0 <0.000014>
8559  21:03:53.423373 read(3, "package File::Find;\nuse 5.006;\nuse strict;\nuse warnings;\n"..., 8192) = 8192 <0.000019>
8559  21:03:53.424358 brk(0x2b23000)    = 0x2b23000 <0.000018>
8559  21:03:53.424407 --- SIGALRM (Alarm clock) @ 0 (0) ---
8559  21:03:53.424438 rt_sigaction(SIGALRM, NULL, {0x49bd70, [], SA_RESTORER|SA_RESTART, 0x7f4e356570a0}, 8) = 0 <0.000015>
8559  21:03:53.424508 mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x7f4e2c1d3000 <0.000017>
8559  21:03:53.424560 munmap(0x7f4e2c1d3000, 65196032) = 0 <0.000019>
8559  21:03:53.424613 munmap(0x7f4e34000000, 1912832) = 0 <0.000017>
8559  21:03:53.424664 mprotect(0x7f4e30000000, 135168, PROT_READ|PROT_WRITE) = 0 <0.000018>
8559  21:03:53.424758 futex(0x7f4e34b6be40, FUTEX_WAIT_PRIVATE, 2, NULL) = ? ERESTARTSYS (To be restarted) <5.597345>
8559  21:03:59.022151 --- SIGINT (Interrupt) @ 0 (0) ---

Some more data points:

  • Debian wheezy
  • inside a VM on a quite fast host system
  • tried various perls, including 5.20.1 and 5.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants