[GH-ISSUE #44] Crash when creating journal from zone with allow_update=true #330

Closed
opened 2026-03-15 22:00:34 +03:00 by kerem · 6 comments
Owner

Originally created by @apexo on GitHub (Sep 8, 2016).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/44

2016-09-08T12:50:34.387565536+00:00 INFO named:115 loading zone file: "src/config/test/example.com.zone"`
2016-09-08T12:50:34.416164124+00:00 INFO named:129 enabling journal: "src/config/test/example.com..jrnl"
2016-09-08T12:50:34.417395558+00:00 INFO trust_dns::authority::authority:156 persisting zone to journal at SOA.serial: 199609203
thread '<main>' panicked at 'schema version mismatch, schema_up() resolves this', src/authority/persistence.rs:58
stack backtrace:
   1:     0x55d0d4c23c3f - std::sys::backtrace::tracing::imp::write::h3800f45f421043b8
   2:     0x55d0d4c2699b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h0ef6c8db532f55dc
   3:     0x55d0d4c26623 - std::panicking::default_hook::hf3839060ccbb8764
   4:     0x55d0d4c1852d - std::panicking::rust_panic_with_hook::h5dd7da6bb3d06020
   5:     0x55d0d48ff737 - std::panicking::begin_panic::h4c14e704ed94392f
                        at src/libstd/panicking.rs:328
   6:     0x55d0d4979704 - trust_dns::authority::persistence::Journal::insert_record::h7a7e1920fda45865
                        at /home/apexo/ext/dev/ext/trust-dns/<std macros>:3
   7:     0x55d0d4979130 - trust_dns::authority::authority::Authority::persist_to_journal::h05d78c5d49a01b1a
                        at src/authority/authority.rs:159
   8:     0x55d0d48d76a6 - named::load_zone::hd2498ba4e50bc526
                        at src/named.rs:138
   9:     0x55d0d48e7b93 - named::main::h1c8ee60b18765fac
                        at src/named.rs:225
  10:     0x55d0d4c26268 - std::panicking::try::call::hbbf4746cba890ca7
  11:     0x55d0d4c30aeb - __rust_try
  12:     0x55d0d4c30a8e - __rust_maybe_catch_panic
  13:     0x55d0d4c25d0e - std::rt::lang_start::hbcefdc316c2fbd45
  14:     0x55d0d48f7a29 - main
  15:     0x7fa51e4992b0 - __libc_start_main
  16:     0x55d0d48d5569 - _start
  17:                0x0 - <unknown>
Originally created by @apexo on GitHub (Sep 8, 2016). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/44 ``` 2016-09-08T12:50:34.387565536+00:00 INFO named:115 loading zone file: "src/config/test/example.com.zone"` 2016-09-08T12:50:34.416164124+00:00 INFO named:129 enabling journal: "src/config/test/example.com..jrnl" 2016-09-08T12:50:34.417395558+00:00 INFO trust_dns::authority::authority:156 persisting zone to journal at SOA.serial: 199609203 thread '<main>' panicked at 'schema version mismatch, schema_up() resolves this', src/authority/persistence.rs:58 stack backtrace: 1: 0x55d0d4c23c3f - std::sys::backtrace::tracing::imp::write::h3800f45f421043b8 2: 0x55d0d4c2699b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h0ef6c8db532f55dc 3: 0x55d0d4c26623 - std::panicking::default_hook::hf3839060ccbb8764 4: 0x55d0d4c1852d - std::panicking::rust_panic_with_hook::h5dd7da6bb3d06020 5: 0x55d0d48ff737 - std::panicking::begin_panic::h4c14e704ed94392f at src/libstd/panicking.rs:328 6: 0x55d0d4979704 - trust_dns::authority::persistence::Journal::insert_record::h7a7e1920fda45865 at /home/apexo/ext/dev/ext/trust-dns/<std macros>:3 7: 0x55d0d4979130 - trust_dns::authority::authority::Authority::persist_to_journal::h05d78c5d49a01b1a at src/authority/authority.rs:159 8: 0x55d0d48d76a6 - named::load_zone::hd2498ba4e50bc526 at src/named.rs:138 9: 0x55d0d48e7b93 - named::main::h1c8ee60b18765fac at src/named.rs:225 10: 0x55d0d4c26268 - std::panicking::try::call::hbbf4746cba890ca7 11: 0x55d0d4c30aeb - __rust_try 12: 0x55d0d4c30a8e - __rust_maybe_catch_panic 13: 0x55d0d4c25d0e - std::rt::lang_start::hbcefdc316c2fbd45 14: 0x55d0d48f7a29 - main 15: 0x7fa51e4992b0 - __libc_start_main 16: 0x55d0d48d5569 - _start 17: 0x0 - <unknown> ```
kerem 2026-03-15 22:00:34 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@bluejekyll commented on GitHub (Sep 8, 2016):

I wonder if there's another bug here. It looks like the journal filename is wrong, is it possible that the new journal is empty?

How did you produce this problem?

<!-- gh-comment-id:245617601 --> @bluejekyll commented on GitHub (Sep 8, 2016): I wonder if there's another bug here. It looks like the journal filename is wrong, is it possible that the new journal is empty? How did you produce this problem?
Author
Owner

@apexo commented on GitHub (Sep 8, 2016):

I just used the example config src/config/test/example.toml with the following extra zone:

zones
zone = "example.com"
zone_type = "Master"
file = "example.com.zone"
allow_update = true

<!-- gh-comment-id:245625565 --> @apexo commented on GitHub (Sep 8, 2016): I just used the example config src/config/test/example.toml with the following extra zone: [[zones]] zone = "example.com" zone_type = "Master" file = "example.com.zone" allow_update = true
Author
Owner

@apexo commented on GitHub (Sep 8, 2016):

Before the crash, the journal file does not exist. After the crash, it exists with size 0.

<!-- gh-comment-id:245625880 --> @apexo commented on GitHub (Sep 8, 2016): Before the crash, the journal file does not exist. After the crash, it exists with size 0.
Author
Owner

@bluejekyll commented on GitHub (Sep 8, 2016):

Ok, mind fixing another two lines in this? on:

https://github.com/bluejekyll/trust-dns/blob/master/src/named.rs#L94

the set_extension(".jrnl") should be set_extension("jrnl")
and similarly set_extension(".key") should be set_extension("key")

I don't know how I missed that, but I know that I don't have startup tests on the binary. I need to go back and add those. Anyway, if you could make those other changes too that would be awesome. Otherwise I'll do that later.

<!-- gh-comment-id:245676555 --> @bluejekyll commented on GitHub (Sep 8, 2016): Ok, mind fixing another two lines in this? on: https://github.com/bluejekyll/trust-dns/blob/master/src/named.rs#L94 the set_extension(".jrnl") should be set_extension("jrnl") and similarly set_extension(".key") should be set_extension("key") I don't know how I missed that, but I know that I don't have startup tests on the binary. I need to go back and add those. Anyway, if you could make those other changes too that would be awesome. Otherwise I'll do that later.
Author
Owner

@apexo commented on GitHub (Sep 8, 2016):

Will do.

<!-- gh-comment-id:245681551 --> @apexo commented on GitHub (Sep 8, 2016): Will do.
Author
Owner

@bluejekyll commented on GitHub (Sep 8, 2016):

Thanks for the changes!

<!-- gh-comment-id:245730236 --> @bluejekyll commented on GitHub (Sep 8, 2016): Thanks for the changes!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#330
No description provided.