Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

fs.watch on Mavericks => 'node test.js ' terminated by signal SIGBUS (Misaligned address error) #6269

Closed
ohardy opened this issue Sep 26, 2013 · 6 comments

Comments

@ohardy
Copy link

ohardy commented Sep 26, 2013

fs = require('fs')
fs.watch('assets/js', function (curr, prev) {
  console.log('the current mtime is: ' + curr.mtime);
  console.log('the previous mtime was: ' + prev.mtime);
});

causes : 'node test.js ' terminated by signal SIGBUS (Misaligned address error)

@eendeego
Copy link

eendeego commented Oct 9, 2013

It crashes inside darwin's CFRunLoop code (invoking the callback...):

$ lldb node
Current executable set to 'node' (x86_64).
(lldb) settings set target.run-args test.js
(lldb) r
Process 89190 launched: '[redacted]/.nvm/v0.10.19/bin/node' (x86_64)
Process 89190 stopped
* thread #2: tid = 0x63294f, 0x00007fff8fc76583 CarbonCore`FSEventsClientProcessMessageCallback + 39, stop reason = EXC_BAD_ACCESS (code=2, address=0x100e43f48)
    frame #0: 0x00007fff8fc76583 CarbonCore`FSEventsClientProcessMessageCallback + 39
CarbonCore`FSEventsClientProcessMessageCallback + 39:
-> 0x7fff8fc76583:  callq  0x7fff8fc66d4d            ; FSEventsD2F_server
   0x7fff8fc76588:  movq   (%rbx), %rax
   0x7fff8fc7658b:  cmpq   -16(%rbp), %rax
   0x7fff8fc7658f:  jne    0x7fff8fc7659b            ; FSEventsClientProcessMessageCallback + 63
(lldb) bt
* thread #2: tid = 0x63294f, 0x00007fff8fc76583 CarbonCore`FSEventsClientProcessMessageCallback + 39, stop reason = EXC_BAD_ACCESS (code=2, address=0x100e43f48)
    frame #0: 0x00007fff8fc76583 CarbonCore`FSEventsClientProcessMessageCallback + 39
    frame #1: 0x00007fff90c2fd04 CoreFoundation`__CFMachPortPerform + 388
    frame #2: 0x00007fff90c2fb69 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    frame #3: 0x00007fff90c2fade CoreFoundation`__CFRunLoopDoSource1 + 478
    frame #4: 0x00007fff90c20bd6 CoreFoundation`__CFRunLoopRun + 1830
    frame #5: 0x00007fff90c20275 CoreFoundation`CFRunLoopRunSpecific + 309
    frame #6: 0x00007fff90cd59d1 CoreFoundation`CFRunLoopRun + 97
    frame #7: 0x000000010012f874 node`uv__cf_loop_runner(arg=<unavailable>) + 73 at fsevents.c:511
    frame #8: 0x00007fff96662899 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x00007fff9666272a libsystem_pthread.dylib`_pthread_start + 137
    frame #10: 0x00007fff96666fc9 libsystem_pthread.dylib`thread_start + 13

(About to test on v0.10.20, but expecting the exact same result)

@eendeego
Copy link

eendeego commented Oct 9, 2013

Confirmed on v0.10.20.
And on v0.11.7.

@eendeego
Copy link

eendeego commented Oct 9, 2013

This duplicates issue #6251.

@cryptix
Copy link

cryptix commented Oct 9, 2013

As a workaround you can downgrade to v0.10.17 until it is fixed.

@eendeego
Copy link

eendeego commented Oct 9, 2013

@cryptix Thanks!

@bnoordhuis
Copy link
Member

Like you say, this is a dup of #6251 so I'm closing this one. FWIW, I reverted the post-v0.10.17 changes to libuv's FSEvents code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants