Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
run-crons reporting missing file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 3:15 pm    Post subject: run-crons reporting missing file Reply with quote

A couple days ago several machines suddenly reported the following (through system email)

Code:
Subject:    Cron <root@ng2> test -x /usr/sbin/run-crons && /usr/sbin/run-crons

...

Opening file "/tmp/conftest91" failed, ignoring: No such device or address


I have tried getting to the root-cause of this, but to no avail unfortunately.

Code:
qlist -Iv cron

Quote:
acct-group/cron-0-r1
acct-group/crontab-0-r1
acct-user/cron-0-r2
sys-process/cronbase-0.3.7-r10
sys-process/cronie-1.7.0-r2
virtual/cron-0-r3


should i be worried about this? any idea on a way to determine the reason for these messages ?

cheers,
guid0
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21741

PostPosted: Wed Jan 10, 2024 4:23 pm    Post subject: Reply with quote

What is /tmp/conftest91? I have historically seen some package builds leave garbage in /tmp, always with a name following the shown format. Perhaps this is a socket, block device, or other pseudo-file left over from a configure test that failed to clean up after itself.
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 4:45 pm    Post subject: Reply with quote

I really have no idea what /tmp/conftest91 is :oops: and the file is not present. What i do know is that its being reported on 7 machines which were installed over a few years. Some machines have been running for a while now (few years) and only gotten kernelupgrades / microcode when security demanded it.

Checked sockets, pids, ports and major/minor device numbers, none have 91..

really no clue what this could be.

Code:
# rc-update
               binfmt | boot                                   
             bootmisc | boot                                   
              cgroups |                                 sysinit
               cronie |      default                           
                devfs |                                 sysinit
                dmesg |                                 sysinit
                 fsck | boot                                   
             hostname | boot default                           
              hwclock | boot                                   
            ip6tables |      default                           
             iptables |      default                           
              keymaps | boot                                   
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
               mcelog |      default                           
                mdadm | boot                                   
              modules | boot                                   
             mount-ro |                        shutdown       
                 mtab | boot                                   
             net.eth0 |      default                           
             net.eth1 |      default                           
             net.eth2 |      default                           
             net.eth3 |      default                           
             netmount |      default                           
                nginx |      default                           
                 nrpe |      default                           
                 ntpd |      default                           
              postfix |      default                           
               procfs | boot                                   
                 root | boot                                   
         save-keymaps | boot                                   
    save-termencoding | boot                                   
            savecache |                        shutdown       
              seedrng | boot                                   
                 sshd |      default                           
                 swap | boot                                   
               sysctl | boot                                   
                sysfs |                                 sysinit
             sysklogd |      default                           
 systemd-tmpfiles-setup | boot                                   
 systemd-tmpfiles-setup-dev |                                 sysinit
         termencoding | boot                                   
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
Back to top
View user's profile Send private message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1673

PostPosted: Wed Jan 10, 2024 5:38 pm    Post subject: Reply with quote

maybe you can check the /etc/cron.*/ dirs which script actually tries to open the file and see why, and why it fails.
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 6:36 pm    Post subject: Reply with quote

I checked below scripts (not that many) using strace and none show any interaction with tempfiles. The /etc/crontab is near empty and only a wrapper for the periodic runs. There are no user crontabs.
Quote:
/etc/cron.monthly/smartmontools-update-drivedb
/etc/cron.weekly/mdadm
/etc/cron.hourly/0anacron
/etc/cron.daily/logrotate
/etc/cron.daily/man-db
/etc/cron.daily/systemd-tmpfiles-clean

/etc/conf.d/cronie
Code:
# Settings for the CRON daemon.
# CRONDARGS= :  any extra command-line startup arguments for crond
CRONDARGS=
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1693

PostPosted: Wed Jan 10, 2024 6:59 pm    Post subject: Reply with quote

Is /tmp mounted in a special way? Like set up as a tmpfs or zram?
This sounds like some sort of backing error where the main run-crons tried to claim a temporary file but something blocked it.
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 7:54 pm    Post subject: Reply with quote

nothing really special afaik:
Code:
/dev/sda5 on /tmp type ext4 (rw,nodev,noexec,noatime)
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 7:58 pm    Post subject: Reply with quote

on one of the other machines its mounted slightly different:
Code:
/dev/md2 on /tmp type ext4 (rw,nosuid,nodev,noexec,noatime)

still nothing really special.. i do appreciate all the new angles to look at this.
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 8:08 pm    Post subject: Reply with quote

hmm, i might be on to something as there is below message in a stale maildir at the same time (not day) as the conftest91 messages.

Code:
error: state file /var/lib/misc/logrotate.status is already locked
logrotate does not support parallel execution on the same set of logfiles.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1693

PostPosted: Wed Jan 10, 2024 8:12 pm    Post subject: Reply with quote

guid0 wrote:
nothing really special afaik:
Code:
/dev/sda5 on /tmp type ext4 (rw,nodev,noexec,noatime)

I am guessing from the failed name that a script is creating a "configuration test" and trying to execute it on /tmp. Since it is mounted as noexec, it fails.
Did this change recently as to coincide with noexec?
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Wed Jan 10, 2024 8:18 pm    Post subject: Reply with quote

grknight wrote:
Did this change recently as to coincide with noexec?

noexec on /tmp has been part of my Gentoo-setups for more than 20+ years :D
Back to top
View user's profile Send private message
guid0
Guru
Guru


Joined: 06 Jul 2003
Posts: 371
Location: The Netherlands / Nederland

PostPosted: Tue Apr 30, 2024 12:49 pm    Post subject: Reply with quote

I just happened to see the file reappear on a machine.

Code:
# ls -laF /tmp/conftest91
srwxr-xr-x 1 portage portage 0 Apr 30 12:16 /tmp/conftest91=


Here are the commands that were run.

Code:
emerge --sync && emerge -upvDN world
uname -a
eselect news list
eselect profile list
emerge -upvDN world
emerge -uvDN world  (quickly followed by a CTRL-C)
emerge -upvDN glibc
emerge -uvDN glibc
emerge -upvDN world
emerge -upvDN world
emerge -uvDN world
emerge -upvDN world
exit


Could this be an internal file to a portage activity and leaving it behind when hitting CTRL-C mid-process?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21741

PostPosted: Tue Apr 30, 2024 1:55 pm    Post subject: Reply with quote

Assuming that this file is written by an autoconf test, then yes, interrupting it partway through with Ctrl-C could cause the file not to be deleted properly. Many packages that Portage can build use autoconf / automake in their build process, so an emerge @world could have been running an autoconf-generated script at the time you interrupted it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum