Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#77 closed defect (fixed)

Catch schema error exceptions

Reported by: jreed Owned by:
Priority: low Milestone:
Component: data source Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket:
Total Hours: Internal?: no

Description

bind10 was repeated looping b10-auth:

Resurrected b10-auth (PID 28228)
My local name is:  4b954fbe_b@t1.m.reedmedia.net
could not prepare
SELECT rdtype, ttl, rdata FROM nsec3 WHERE zone_id = ?1 AND hash = $2
no such table: nsec3
terminate called after throwing an instance of 'char const*'
Process b10-auth (PID 28228) died.
Resurrecting dead b10-auth process...
Resurrected b10-auth (PID 12377)

The core dump:

#0  0x00007f7ffd23267a in kill () from /usr/lib/libc.so.12
No symbol table info available.
#1  0x00007f7ffd2d7319 in abort () from /usr/lib/libc.so.12
No symbol table info available.
#2  0x00007f7ffd9c0e79 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/pkg/gcc44/lib/libstdc++.so.6
No symbol table info available.
#3  0x00007f7ffd9bede6 in std::set_unexpected ()
   from /usr/pkg/gcc44/lib/libstdc++.so.6
No symbol table info available.
#4  0x00007f7ffd9bee23 in std::terminate ()
   from /usr/pkg/gcc44/lib/libstdc++.so.6
No symbol table info available.
#5  0x00007f7ffd9bee36 in std::terminate ()
   from /usr/pkg/gcc44/lib/libstdc++.so.6
No symbol table info available.
#6  0x00007f7ffd9be463 in __cxa_call_unexpected ()
   from /usr/pkg/gcc44/lib/libstdc++.so.6
No symbol table info available.
#7  0x00000000004d86c7 in ModuleCCSession (this=0x7f7fffffdc20, spec_file_name=
        {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f7fffffdd10 "\030R\020ý\177\177"}}, 
    config_handler=0x4181c4 <my_config_handler(boost::shared_ptr<isc::data::Element>)>, 
    command_handler=0x418296 <my_command_handler(std::string const&, boost::shared_ptr<isc::data::Element>)>) at ccsession.cc:168
No locals.
#8  0x0000000000419011 in main (argc=3, argv=0x7f7fffffddc0) at main.cc:185
        cs = {<isc::config::ConfigData> = {_vptr.ConfigData = 0x64cad0, 
    _config = {px = 0x7f7ffd104140, pn = {pi_ = 0x7f7ffd102260}}, 
    _module_spec = {module_specification = {px = 0x0, pn = {pi_ = 0x0}}}}, 
  module_name_ = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f7ffd102258 "Auth"}}, 
  session_ = {sock = 5, sequence = 3, lname = {
      static npos = 18446744073709551615, 
      _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
        _M_p = 0x7f7ffd1041d8 "4b954fbe_b@t1.m.reedmedia.net"}}}, 
  module_specification_ = {module_specification = {px = 0x7f7ffd104440, pn = {
        pi_ = 0x7f7ffd102680}}}, config_ = {px = 0x7f7ffd104280, pn = {
      pi_ = 0x7f7ffd102ae0}}, 
  config_handler_ = 0x4181c4 <my_config_handler(boost::shared_ptr<isc::data::Element>)>, 
  command_handler_ = 0x418296 <my_command_handler(std::string const&, boost::shared_ptr<isc::data::Element>)>}
        fds = {fds_bits = {-33579008, 32639, 6627112, 0, 32, 0, 6631376, 0}}
        ss = 0
        specfile = {static npos = 18446744073709551615, 
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
    _M_p = 0x7f7ffd105218 "/home/reed/opt/bind10/share/bind10/auth.spec"}}
        nfds = 32639
        counter = 5260694
        ps4 = 3
        ps6 = 4
        ret = 0
        ch = -1
        port = 0x7f7fffffff1c "5300"
        ipv4_only = false
        ipv6_only = false

Evan said caused by old schema. I removed zone.sqlite3 and tried again and problem went away.

Opening this ticket so we don't treat this as a fatal error that stops entire service.

Subtickets

Change History (8)

comment:1 Changed 10 years ago by shane

  • Summary changed from b10-auth failure on old schema to Catch schema error exceptions

This was caused by the schema being updated without changing the version number. While this was a developer error, we should catch the exception and handle it more gracefully.

comment:2 Changed 10 years ago by shane

  • Component changed from Unclassified to data source
  • Milestone set to feature backlog item
  • Type changed from defect to enhancement

comment:3 Changed 9 years ago by stephen

  • Milestone feature backlog item deleted

Milestone feature backlog item deleted

comment:4 Changed 8 years ago by shane

  • Defect Severity set to N/A
  • Internal? unset
  • Priority changed from major to minor
  • Sub-Project set to DNS
  • Type changed from enhancement to defect

Seems like this is still a potential problem. I broke the schema version to see what happens now, and I see:

2012-02-15 12:00:14.988 INFO  [b10-xfrout.xfrout] XFROUT_NEW_CONFIG_DONE Update xfrout configuration done
Traceback (most recent call last):
  File "/tmp/bind10/libexec/bind10-devel/b10-xfrout", line 1040, in <module>
    xfrout_server = XfroutServer()
  File "/tmp/bind10/libexec/bind10-devel/b10-xfrout", line 925, in __init__
    self._start_notifier()
  File "/tmp/bind10/libexec/bind10-devel/b10-xfrout", line 939, in _start_notifier
    self._notifier = notify_out.NotifyOut(datasrc)
  File "/tmp/bind10/lib64/python3.2/site-packages/isc/notify/notify_out.py", line 139, in __init__
    self._init_notify_out(datasrc_file)
  File "/tmp/bind10/lib64/python3.2/site-packages/isc/notify/notify_out.py", line 154, in _init_notify_out
    for zone_name, zone_class in sqlite3_ds.get_zones_info(datasrc_file):
  File "/tmp/bind10/lib64/python3.2/site-packages/isc/datasrc/sqlite3_ds.py", line 190, in get_zones_info
    conn, cur = open(dbfile)
  File "/tmp/bind10/lib64/python3.2/site-packages/isc/datasrc/sqlite3_ds.py", line 119, in open
    raise Sqlite3DSError("Bad database schema version")
isc.datasrc.sqlite3_ds.Sqlite3DSError: Bad database schema version

I am going to lower the priority, since it seems not that important - it only causes ugliness, and only for broken setups.

comment:5 Changed 8 years ago by shane

  • Defect Severity changed from N/A to Low

comment:6 Changed 8 years ago by jinmei

  • Milestone set to New Tasks

It would also be resolved with migration to the new datasource
implementation/API.

comment:7 Changed 8 years ago by shane

  • Resolution set to fixed
  • Status changed from new to closed

Resolving with the expectation that the new datasource API will fix this.

comment:8 Changed 8 years ago by shane

  • Milestone New Tasks deleted
Note: See TracTickets for help on using tickets.