The sound distributed version control system

#726 Crash report: running `pijul pull` on nest change URL

Opened by chevyparakeet on November 8, 2022
chevyparakeet on November 8, 2022
$ pijul --version
pijul 1.0.0-beta.2
$ pijul clone https://nest.pijul.com/pijul/pijul
Downloading changes [==================================================] 816/816                                   
           Applying [==================================================] 816/816                                   
 Completing changes [                                                  ] 0/0                                     
$ cd pijul
$ pijul pull https://nest.pijul.com/pijul/pijul/changes/DHMXWWMSWJT5EJK4PNCG46ETUJ4CMBWBQXIHCKRCNUUH2ULEFQDAC
Well, this is embarrassing.

pijul had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/tmp/report-046b39b9-696a-4ce4-a7a3-2c84ab533e7f.toml". Submit an issue or email with the subject of "pijul Crash Report" and include the report as an attachment.

- Authors: Pierre-Étienne Meunier <pe@pijul.org>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!

/tmp/report-046b39b9-696a-4ce4-a7a3-2c84ab533e7f.toml:

name = 'pijul'
operating_system = 'unix:Arch'
crate_version = '1.0.0-beta.2'
explanation = '''
Panic occurred in file '/var/cache/cargo/registry/src/github.com-1ecc6299db9ec823/pijul-1.0.0-beta.2/src/remote/mod.rs' at line 1460
'''
cause = 'called `Option::unwrap()` on a `None` value'
method = 'Panic'
backtrace = '''

   0: 0x555555659cdd - core::panicking::panic::h13864fd33c4a62d7
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/core/src/panicking.rs:115
   1: 0x555555746721 - pijul::remote::parse_line::h60e656cc8d57de74
   2: 0x55555587510f - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h562b08e07d430a19
   3: 0x5555558840c9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb6d7e9fddb72fc88
   4: 0x55555589bc66 - pijul::commands::pushpull::Pull::run::{{closure}}::hd94b7798e6aa90f6
   5: 0x5555558b7b63 - pijul::run::{{closure}}::h90756b1d988f4efd
   6: 0x55555588b51d - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he72600d9cbb7df18
   7: 0x555555813169 - tokio::park::thread::CachedParkThread::block_on::hb160cc7e487e8196
   8: 0x555555734254 - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h4117978652af6f31
   9: 0x555555813284 - tokio::runtime::Runtime::block_on::h2f2d2d58917194b7
  10: 0x55555580077c - pijul::main::hafef6c9f7517bf2c
  11: 0x5555557197c3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1d2762f615e60a2c
  12: 0x555555694009 - std::rt::lang_start::{{closure}}::haa6154afe0b62a2c
  13: 0x555555e884fb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h794e1e4afa66380a
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/core/src/ops/function.rs:286
                 - std::panicking::try::do_call::hfd6c5b1f7bf73691
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panicking.rs:483
                 - std::panicking::try::h839db799119467fa
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panicking.rs:447
                 - std::panic::catch_unwind::h05c855469940707a
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panic.rs:137
                 - std::rt::lang_start_internal::{{closure}}::h9126d61107c32b22
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::haa755e13a90126e4
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panicking.rs:483
                 - std::panicking::try::h6a9f503dee17c397
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panicking.rs:447
                 - std::panic::catch_unwind::h7b4eecbe9fa754e3
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/panic.rs:137
                 - std::rt::lang_start_internal::h7236b99748ebd1ea
                at /rustc/1898c34e923bad763e723c68dd9f23a09f9eb0fc/library/std/src/rt.rs:148
  14: 0x555555800855 - main
  15: 0x7ffff7732290 - <unresolved>
  16: 0x7ffff773234a - __libc_start_main
  17: 0x55555565a0a5 - _start
                at /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115
  18:        0x0 - <unresolved>'''
tankf33der on November 8, 2022

Good catch. +1.

chevyparakeet on November 8, 2022

Perhaps parse_line is running on the HTML source of the relevant page rather than Pijul doing something clever to extract the change itself, and as such the PATHS_LINE regex is matching on nonsense from the HTML.

If so, it seems like PATHS_LINE and CHANGELIST_LINE regexes should be anchored to avoid triggering on nonsense like this.