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

Can't cd to (unreachable)/var/lib/sympa/list_data: No such file or directory #72

Closed
stbuehler opened this issue Aug 23, 2017 · 1 comment
Labels

Comments

@stbuehler
Copy link
Contributor

stbuehler commented Aug 23, 2017

My comment in #55 was ignored, so I'm creating this new issue.

I'm on debian stretch amd64, using needrestart 2.11-3, with #70 applied manually.

This results in:

# perl -MCarp::Always /usr/sbin/needrestart -v
[main] eval /etc/needrestart/needrestart.conf
[main] needrestart v2.11
[main] running in root mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] detected systemd
[Core] #310 is a NeedRestart::Interp::Perl
[Perl] #310: source=/usr/sbin/munin-node
[Core] #564 is a NeedRestart::Interp::Python
[Python] #564: source=/usr/bin/salt-minion
[Core] #954 is a NeedRestart::Interp::Python
[Python] #954: source=/usr/bin/salt-minion
[Python] #954: use cached file list
[Core] #1066 is a NeedRestart::Interp::Python
[Python] #1066: source=/usr/bin/salt-minion
[Python] #1066: use cached file list
[Core] #29670 is a NeedRestart::Interp::Perl
[Perl] #29670: source=/usr/lib/cgi-bin/sympa/wwsympa.fcgi
[Core] #29762 is a NeedRestart::Interp::Perl
[Perl] #29762: source=/usr/lib/sympa/bin/bounced.pl
Can't cd to (unreachable)/var/lib/sympa/list_data: No such file or directory
 at /usr/share/perl/5.24/File/Find.pm line 283.
        File::Find::_find_opt(HASH(0x5593ce166f40), "/usr/lib/x86_64-linux-gnu/perl/5.24/auto/POSIX") called at /usr/share/perl/5.24/File/Find.pm line 760
        File::Find::find(CODE(0x5593ce14f098), "/usr/lib/x86_64-linux-gnu/perl/5.24/auto/POSIX") called at /usr/share/perl5/Module/ScanDeps.pm line 1177
        Module::ScanDeps::_glob_in_inc("auto/POSIX") called at /usr/share/perl5/Module/ScanDeps.pm line 1104
        Module::ScanDeps::add_deps("used_by", "bounced.pl", "rv", HASH(0x5593ce17b500), "modules", ARRAY(0x5593cde32878), "skip", undef, ...) called at /usr/share/perl5/Module/ScanDeps.pm line 684
        Module::ScanDeps::scan_deps_static(HASH(0x5593ce043fe8)) called at /usr/share/perl5/Module/ScanDeps.pm line 614
        Module::ScanDeps::scan_deps("files", ARRAY(0x5593ce1609b8), "recurse", 1) called at /usr/share/perl5/NeedRestart/Interp/Perl.pm line 164
        NeedRestart::Interp::Perl::files(NeedRestart::Interp::Perl=HASH(0x5593cde5c200), 29762, HASH(0x5593cda032f0)) called at /usr/share/perl5/NeedRestart.pm line 171
        NeedRestart::needrestart_interp_check(1, 29762, "/usr/bin/perl", ARRAY(0x5593cdd7a540)) called at /usr/sbin/needrestart line 498

If I revert the change in Perl.pm:107 from 4e020cb, I don't get any errors, but it takes "forever":

# time needrestart -v 2>&1 | ts '[%Y-%m-%d %H:%M:%S]'
[2017-08-23 10:12:03] [main] eval /etc/needrestart/needrestart.conf
[2017-08-23 10:12:03] [main] needrestart v2.11
[2017-08-23 10:12:03] [main] running in root mode
[2017-08-23 10:12:03] [Core] Using UI 'NeedRestart::UI::stdio'...
[2017-08-23 10:12:03] [main] detected systemd
[2017-08-23 10:12:03] [Core] #310 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:03] [Perl] #310: source=/usr/sbin/munin-node
[2017-08-23 10:12:03] [Core] #564 is a NeedRestart::Interp::Python
[2017-08-23 10:12:03] [Python] #564: source=/usr/bin/salt-minion
[2017-08-23 10:12:03] [Core] #640 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:03] [Perl] #640: source=/usr/bin/ts
[2017-08-23 10:12:03] [Core] #954 is a NeedRestart::Interp::Python
[2017-08-23 10:12:03] [Python] #954: source=/usr/bin/salt-minion
[2017-08-23 10:12:03] [Python] #954: use cached file list
[2017-08-23 10:12:03] [Core] #1066 is a NeedRestart::Interp::Python
[2017-08-23 10:12:03] [Python] #1066: source=/usr/bin/salt-minion
[2017-08-23 10:12:03] [Python] #1066: use cached file list
[2017-08-23 10:12:03] [Core] #29670 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:03] [Perl] #29670: source=/usr/lib/cgi-bin/sympa/wwsympa.fcgi
[2017-08-23 10:12:03] [Core] #29762 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:03] [Perl] #29762: source=/usr/lib/sympa/bin/bounced.pl
[2017-08-23 10:12:14] [Core] #29767 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:14] [Perl] #29767: source=/usr/lib/sympa/bin/task_manager.pl
[2017-08-23 10:12:26] [Core] #29769 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:26] [Perl] #29769: source=/usr/lib/sympa/bin/bulk.pl
[2017-08-23 10:12:39] [Core] #29770 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:39] [Perl] #29770: source=/usr/lib/sympa/bin/archived.pl
[2017-08-23 10:12:51] [Core] #29771 is a NeedRestart::Interp::Perl
[2017-08-23 10:12:51] [Perl] #29771: source=/usr/lib/sympa/bin/sympa_msg.pl
[2017-08-23 10:13:04] [Kernel] Linux: kernel release 4.9.0-3-amd64, kernel version #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06)
[2017-08-23 10:13:04] Failed to load NeedRestart::Kernel::kFreeBSD: [Kernel/kFreeBSD] Not running on GNU/kFreeBSD!
[2017-08-23 10:13:04] [Kernel/Linux] /boot/vmlinuz-4.9.0-3-amd64 => 4.9.0-3-amd64 (debian-kernel@lists.debian.org) #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) [4.9.0-3-amd64]*
[2017-08-23 10:13:04] [Kernel/Linux] Expected linux version: 4.9.0-3-amd64
[2017-08-23 10:13:04] Running kernel seems to be up-to-date.
[2017-08-23 10:13:04] No services need to be restarted.
[2017-08-23 10:13:04] No containers need to be restarted.
[2017-08-23 10:13:04] No user sessions are running outdated binaries.

real    1m1.635s
user    0m53.948s
sys     0m7.332s

I don't think it always took that long, but I'm not sure since when (i.e. which debian update might have broken it).

@liske liske added the bug label Oct 1, 2017
@liske liske closed this as completed in 41af70b Nov 1, 2017
@liske
Copy link
Owner

liske commented Nov 1, 2017

This was a problem while scanning perl scripts:

  • individual mnt ns making /proc/$$/root unreachable
  • Module::ScanDeps dies if the initial file is unaccessable

The code has been changed to be able to detect foreign mnt ns and ignore such processes.

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

No branches or pull requests

2 participants