Skip to content

Segfault when watcher is moved. #33

@TyOverby

Description

@TyOverby

I have a program written using rsnotify 2.3.3 that segfaults when I touch a file that I'm watching.

Here's the backtrace from lldb

Process 60876 stopped
* thread #2: tid = 0x2b2995, 0x00000001000e36f8 stormtrooper`notify::sync::mpsc::oneshot::Packet<T>::sent(self=0x0000000000000010) + 8 at oneshot.rs:133, stop reason = EXC_BAD_ACCESS (code=1, address=0x60)
    frame #0: 0x00000001000e36f8 stormtrooper`notify::sync::mpsc::oneshot::Packet<T>::sent(self=0x0000000000000010) + 8 at oneshot.rs:133
(lldb) bt
error: need to add support for DW_TAG_base_type '()' encoded with DW_ATE = 0x7, bit_size = 0
* thread #2: tid = 0x2b2995, 0x00000001000e36f8 stormtrooper`notify::sync::mpsc::oneshot::Packet<T>::sent(self=0x0000000000000010) + 8 at oneshot.rs:133, stop reason = EXC_BAD_ACCESS (code=1, address=0x60)
  * frame #0: 0x00000001000e36f8 stormtrooper`notify::sync::mpsc::oneshot::Packet<T>::sent(self=0x0000000000000010) + 8 at oneshot.rs:133
    frame #1: 0x00000001000e2b95 stormtrooper`notify::sync::mpsc::Sender<T>::send(self=0x00007fff5fbff8e0, t=Event at 0x0000000101cfa618) + 517 at mod.rs:535
    frame #2: 0x00000001000e1c41 stormtrooper`notify::fsevent::callback(stream_ref=0x0000000101a002b0, info=0x00007fff5fbff8e0, num_events=1, event_paths=0x0000000101a00780, event_flags=0x00000001005f1000, event_ids=0x00000001005f0000) + 1649 at fsevent.rs:197
    frame #3: 0x00000001000dbf6d stormtrooper`fsevent::callback::hf1094fd0c5c09dbeeia + 61
    frame #4: 0x00007fff92498ba1 FSEvents`implementation_callback_rpc + 2123
    frame #5: 0x00007fff92496672 FSEvents`_Xcallback_rpc + 254
    frame #6: 0x00007fff92496746 FSEvents`FSEventsD2F_server + 54
    frame #7: 0x00007fff9249bf75 FSEvents`FSEventsClientProcessMessageCallback + 44
    frame #8: 0x00007fff88de8d87 CoreFoundation`__CFMachPortPerform + 247
    frame #9: 0x00007fff88de8c79 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    frame #10: 0x00007fff88de8beb CoreFoundation`__CFRunLoopDoSource1 + 475
    frame #11: 0x00007fff88dda767 CoreFoundation`__CFRunLoopRun + 2375
    frame #12: 0x00007fff88dd9bd8 CoreFoundation`CFRunLoopRunSpecific + 296
    frame #13: 0x00007fff88e91671 CoreFoundation`CFRunLoopRun + 97
    frame #14: 0x00000001000de91a stormtrooper`fnfn + 410 at fsevent.rs:158
    frame #15: 0x00000001000de749 stormtrooper`notify::boxed::F.FnBox<A>::call_box(self=0x0000000101437030, args=<unavailable>) + 89 at boxed.rs:516
    frame #16: 0x00000001000de33c stormtrooper`notify::boxed::Box<FnBox<A, Output = R>+ Send + 'a>.FnOnce<A>::call_once(self=Box<FnBox<()>> at 0x0000000101d00bc0, args=<unavailable>) + 60 at boxed.rs:532
    frame #17: 0x00000001000ddf0e stormtrooper`fnfn + 78 at mod.rs:281
    frame #18: 0x00000001000ddeba stormtrooper`notify::sys_common::unwind::try::try_fn<closure>(opt_closure=0x0000000101d00cf0) + 58 at mod.rs:156
    frame #19: 0x00000001001a7e89 stormtrooper`__rust_try + 9
    frame #20: 0x00000001001a59cf stormtrooper`sys_common::unwind::try::inner_try::h9c69b1952218bc71tRr + 111
    frame #21: 0x00000001000dde24 stormtrooper`notify::sys_common::unwind::try<closure>(f=closure at 0x0000000101d00d08) + 100 at mod.rs:126
    frame #22: 0x00000001000ddc9c stormtrooper`fnfn + 412 at mod.rs:281
    frame #23: 0x00000001000de56d stormtrooper`notify::boxed::F.FnBox<A>::call_box(self=0x000000010143b000, args=<unavailable>) + 77 at boxed.rs:516
    frame #24: 0x00000001001a955e stormtrooper`sys::thread::_$LT$impl$GT$::new::thread_start::h08e832c9db3841f0Qcw + 142
    frame #25: 0x00007fff8aba805a libsystem_pthread.dylib`_pthread_body + 131
    frame #26: 0x00007fff8aba7fd7 libsystem_pthread.dylib`_pthread_start + 176
    frame #27: 0x00007fff8aba53ed libsystem_pthread.dylib`thread_start + 13

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions