Project

General

Profile

Bug #6131

failed chown on startup in /etc/inc/rrd.inc

Added by Christoph Filnkößl over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
RRD Graphs
Target version:
Start date:
04/13/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

Since updating to 2.3 I've got a strange problem after booting my pfSense.
This doesn't happen when the pppoe-interface reconnects (static IP).

Crash report begins.  Anonymous machine information:

amd64
10.3-RELEASE
FreeBSD 10.3-RELEASE #6 05adf0a(RELENG_2_3_0): Mon Apr 11 18:52:07 CDT 2016     root@ce23-amd64-builder:/builder/pfsense-230/tmp/obj/builder/pfsense-230/tmp/FreeBSD-src/sys/pfSense

Crash report details:

PHP Errors:
[13-Apr-2016 12:11:08 Europe/Vienna] PHP Stack trace:
[13-Apr-2016 12:11:08 Europe/Vienna] PHP   1. {main}() /etc/rc.newwanip:0
[13-Apr-2016 12:11:08 Europe/Vienna] PHP   2. enable_rrd_graphing() /etc/rc.newwanip:244
[13-Apr-2016 12:11:08 Europe/Vienna] PHP   3. chown() /etc/inc/rrd.inc:1073

Concerning code:

$databases = glob("{$rrddbpath}/*.rrd");
    foreach ($databases as $database) {
        chown($database, "nobody");
    }

This doesn't really make sense for me as the rights would be already set correctly:

ls -l /var/db/rrd/
total 6656
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 GW_WAN-quality.rrd
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 WANIPV6_TUNNELV6-quality.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 ipsec-packets.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 ipsec-traffic.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 lan-packets.rrd
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 lan-queuedrops.rrd
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 lan-queues.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 lan-traffic.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 opt3-packets.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 opt3-traffic.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 ovpns1-packets.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 ovpns1-traffic.rrd
-rw-r--r--  1 nobody  wheel   49720 Apr 13 13:03 ovpns1-vpnusers.rrd
-rw-r--r--  1 nobody  wheel  588592 Apr 13 13:03 system-mbuf.rrd
-rw-r--r--  1 nobody  wheel  735320 Apr 13 13:03 system-memory.rrd
-rw-r--r--  1 nobody  wheel  245976 Apr 13 13:03 system-processor.rrd
-rw-r--r--  1 nobody  wheel  245976 Apr 13 13:03 system-states.rrd
-rw-r--r--  1 root    wheel    9826 Apr 13 13:02 updaterrd.sh
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 wan-packets.rrd
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 wan-queuedrops.rrd
-rw-r--r--  1 nobody  wheel  147848 Apr 13 13:03 wan-queues.rrd
-rw-r--r--  1 nobody  wheel  393168 Apr 13 13:03 wan-traffic.rrd

Any clues on that?
Please tell me if you need more information.

Thanks, Christoph

Associated revisions

Revision 96860e98 (diff)
Added by Chris Buechler over 3 years ago

Only try to chown files that still exist. Ticket #6131

Revision 8e23a630 (diff)
Added by Chris Buechler over 3 years ago

Only try to chown files that still exist. Ticket #6131

History

#1 Updated by Jim Thompson over 3 years ago

  • Assignee set to Steve Beaver

#2 Updated by NOYB NOYB over 3 years ago

I get that crash report too. About 1/3 of the time. No pppoe here. i386 full install. Ram disk enabled.

#3 Updated by Chris Buechler over 3 years ago

  • Category set to RRD Graphs
  • Status changed from New to Feedback
  • Assignee changed from Steve Beaver to Chris Buechler
  • Target version set to 2.3.1

happened upon this. With RAM disk enabled, there can be file changes between the glob and chown. Fix pushed

#4 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

fixed

#5 Updated by Chris Buechler over 3 years ago

  • Affected Version changed from 2.3 to All

Also available in: Atom PDF