Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
BIND
BIND
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 637
    • Issues 637
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 106
    • Merge Requests 106
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #1679

Closed
Open
Opened Mar 16, 2020 by Mark Andrews@markaMaintainer

Handle systems with broken gettimeofday system calls

Job #758142 failed for a38a3244:

isc_stdtime_get corrects systems which gettimeofday returns a out-of-range tv_usec field by adding and subtracting seconds from tv_sec and tv_usec as appropriate. This results in a seconds value which is outside the expected range by 1 (too large) based on observed failures.

I:nsupdate:check that unixtime serial number is correctly generated (7)
I:nsupdate:out-of-range serial=1584313212 > now=1584313211
I:nsupdate:failed
n=`expr $n + 1`
ret=0
echo_i "check that unixtime serial number is correctly generated ($n)"
$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 > dig.out.old.test$n || ret=1
oldserial=`awk '{print $3}' dig.out.old.test$n` || ret=1
start=`$PERL -e 'print time()."\n";'`
$NSUPDATE <<END > /dev/null 2>&1 || ret=1
    server 10.53.0.1 ${PORT}
    ttl 600
    update add new.unixtime.nil in a 1.2.3.4
    send
END
now=`$PERL -e 'print time()."\n";'`
sleep 1
$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 > dig.out.new.test$n || ret=1
serial=`awk '{print $3}' dig.out.new.test$n` || ret=1
[ "$oldserial" = "$serial" ] && { echo_i "oldserial == serial"; ret=1; }
if [ "$serial" -lt "$start" ]; then
    echo_i "out-of-range serial=$serial < start=$start"; ret=1;
elif [ "$serial" -gt "$now" ]; then
    echo_i "out-of-range serial=$serial > now=$now"; ret=1;
fi
[ $ret = 0 ] || { echo_i "failed"; status=1; }
15-Mar-2020 23:00:11.995 journal file unixtime.db.jnl does not exist, creating it
15-Mar-2020 23:00:11.995 writing to journal
15-Mar-2020 23:00:11.995 del unixtime.nil.              300     IN      SOA     ns1.unixtime.nil. hostmaster.unixtime.nil. 1 2000 2000 1814400 3600
15-Mar-2020 23:00:11.995 add unixtime.nil.              300     IN      SOA     ns1.unixtime.nil. hostmaster.unixtime.nil. 1584313212 2000 2000 1814400 3600
15-Mar-2020 23:00:11.995 add new.unixtime.nil.  600     IN      A       1.2.3.4

1584313212 is 15-Mar-2020 23:00:12

Edited Mar 16, 2020 by Mark Andrews
Assignee
Assign to
April 2020 (9.11.18, 9.16.2, 9.17.1)
Milestone
April 2020 (9.11.18, 9.16.2, 9.17.1) (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: isc-projects/bind9#1679