Giter Club home page Giter Club logo

Comments (6)

jonleighton avatar jonleighton commented on July 19, 2024

Hey, thanks for the report.

I wonder if this is the same issue as #40.

@cj - are you also on Snow Leopard?

@benkitzelman could you try dtruss on the process? i.e. dtruss rspec ... I am particularly interested in the output right before it hangs. You could also try using it on phantomjs too, to get a perspective from the other end of the socket - to do that set the :path config option to "dtruss phantomjs"

Thanks

from poltergeist.

benkitzelman avatar benkitzelman commented on July 19, 2024

I ran rspec spec/integration/driver_spec.rb:38 with dtruss and monitored the output...

At the point of hanging (when waiting for socket read) - dtruss for the poltergeist spec spits out this at regular intervals:

__semwait_signal(0x1403, 0x1603, 0x1)        = -1 Err#60
 ... a bunch of these ....
__semwait_signal(0x1503, 0x1703, 0x1)        = -1 Err#60
sigprocmask(0x1, 0x0, 0x1040C9610)       = 0x0 0
sigaltstack(0x0, 0x1040C9600, 0x0)       = 0 0
sigprocmask(0x1, 0x0, 0x1040C9630)       = 0x0 0

On the phantomjs side at the time of sending the socket accpet msg received in poltergeists web_socket_servers accept fn:

82704/0x4e914:  sigaction(0xD, 0x7FFF5FBFCF80, 0x0)      = 0 0
82704/0x4e914:  write(0x9, "GET / HTTP/1.1\r\nUpgrade: WebSocket\r\nConnection: Upgrade\r\nHost: 127.0.0.1:64747\r\nOrigin: null\r\n\r\n\0", 0x60)       = 96 0
82704/0x4e919:  thread_selfid(0x7FFF70A23660, 0x0, 0xFFFFFFFF)       = 321817 0
82704/0x4e91c:  thread_selfid(0x7FFF70A23660, 0x0, 0xFFFFFFFF)       = 321820 0
82704/0x4e91c:  workq_kernreturn(0x1, 0x103047AE0, 0x0)      = 0 0
82704/0x4e918:  __disable_threadsignal(0x1, 0x0, 0x0)        = 0 0
82704/0x4e917:  __disable_threadsignal(0x1, 0x0, 0x0)        = 0 0
82704/0x4e91c:  __disable_threadsignal(0x1, 0x0, 0x0)        = 0 0
82704/0x4e91b:  select(0x20, 0x102954130, 0x1029443E0, 0x0, 0x0)         = 1 0
82704/0x4e91b:  recvfrom(0xC, 0x116FC2DD0, 0x100)        = 1 0
82704/0x4e91b:  select(0x20, 0x102954130, 0x1029443E0, 0x0, 0x0)         = 1 0
82704/0x4e91b:  recvfrom(0xC, 0x116FC2DD0, 0x100)        = 1 0
82704/0x4e930:  thread_selfid(0x7FFF70A23660, 0x0, 0xFFFFFFFF)       = 321840 0
82704/0x4e930:  __pthread_canceled(0x2, 0x0, 0x1)        = 0 0
82704/0x4e930:  pipe(0x10306569C, 0x40704, 0x103000000)      = 13 0
82704/0x4e930:  fcntl(0xD, 0x2, 0x1)         = 0 0
82704/0x4e930:  fcntl(0xE, 0x2, 0x1)         = 0 0
82704/0x4e930:  fcntl(0xD, 0x3, 0x0)         = 0 0
82704/0x4e930:  fcntl(0xD, 0x4, 0x4)         = 0 0
82704/0x4e930:  fcntl(0xE, 0x3, 0x0)         = 1 0
82704/0x4e930:  fcntl(0xE, 0x4, 0x5)         = 0 0
82704/0x4e930:  __pthread_canceled(0x1, 0x0, 0x1)        = 0 0
82704/0x4e930:  socket(0x2, 0x2, 0x0)        = 15 0
82704/0x4e930:  __sysctl(0x102E80970, 0x6, 0x0)      = 0 0
82704/0x4e930:  __sysctl(0x102E80970, 0x6, 0x103084400)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02C6938, 0x102E80A70)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02C6938, 0x102E80A70)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02C6938, 0x102E80A70)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80AA0)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02C6938, 0x102E80A70)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80B50)      = 0 0
82704/0x4e930:  socket(0x20, 0x3, 0x1)       = 16 0
82704/0x4e930:  ioctl(0x10, 0x800C6502, 0x102E80B90)         = 0 0
82704/0x4e930:  getsockopt(0x10, 0xFFFF, 0x1008)         = 0 0
82704/0x4e930:  sendto(0xB, 0x102E80ABF, 0x1)        = 1 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80B70)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80BF0)      = 0 0
82704/0x4e930:  geteuid(0x7FFF7127A008, 0x7FFF89C0B46C, 0xFFFFFFFF)      = 502 0
82704/0x4e91a:  select(0x8, 0x1038311C0, 0x103831458, 0x1038316F0, 0x0)      = 1 0
82704/0x4e91a:  read(0x7, "\0", 0x10)        = 1 0
dtrace: error on enabled probe ID 1770 (ID 18656: syscall::read:return): out of scratch space in action #13 at DIF offset 44
82704/0x4e91a:  __semwait_signal(0x4103, 0x4203, 0x0)        = 0 0
82704/0x4e91a:  __semwait_signal(0x4303, 0x4103, 0x0)        = 0 0
82704/0x4e91b:  select(0x20, 0x102954130, 0x1029443E0, 0x0, 0x0)         = 1 0
82704/0x4e91b:  recvfrom(0xC, 0x116FC2DD0, 0x100)        = 1 0
82704/0x4e91a:  select(0x8, 0x1038311C0, 0x103831458, 0x1038316F0, 0x116F30C78)      = 0 0
82704/0x4e91a:  socket(0x2, 0x2, 0x0)        = 10 0
82704/0x4e91a:  __sysctl(0x116F2F9C0, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2F9C0, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FAC0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FAC0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FAC0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2FAF0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FAC0)      = 0 0
82704/0x4e91a:  close(0xA)       = 0 0
82704/0x4e91a:  socket(0x2, 0x2, 0x0)        = 10 0
82704/0x4e91a:  __sysctl(0x116F2F7C0, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2F7C0, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2F8C0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2F8C0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2F8C0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2F8F0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2F8C0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2F9A0)      = 0 0
82704/0x4e91a:  socket(0x20, 0x3, 0x1)       = 13 0
82704/0x4e91a:  ioctl(0xD, 0x800C6502, 0x116F2F9E0)      = 0 0
82704/0x4e91a:  getsockopt(0xD, 0xFFFF, 0x1008)      = 0 0
82704/0x4e91a:  sendto(0xB, 0x116F2F90F, 0x1)        = 1 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2F9C0)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2FA40)      = 0 0
82704/0x4e91a:  geteuid(0x7FFF7127A008, 0x7FFF89C0B46C, 0xFFFFFFFF)      = 502 0
82704/0x4e91a:  open("/Users/benkitzelman/Library/Preferences/com.apple.eap.profiles.plist\0", 0x0, 0x1B6)       = -1 Err#2
82704/0x4e91a:  sendto(0xB, 0x116F2FA9F, 0x1)        = 1 0
82704/0x4e91a:  close(0xD)       = 0 0
82704/0x4e91a:  close(0xA)       = 0 0
82704/0x4e91a:  socket(0x2, 0x2, 0x0)        = 10 0
82704/0x4e91a:  __sysctl(0x116F2FD20, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FD20, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FE20)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FE20)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FE20)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02869C9, 0x116F2FE50)      = 0 0
82704/0x4e91a:  ioctl(0xA, 0xC02C6938, 0x116F2FE20)      = 0 0
82704/0x4e91a:  close(0xA)       = 0 0
82704/0x4e91a:  bsdthread_create(0x1023BDCE0, 0x10293A2C0, 0x80000)      = 48762880 0
82704/0x4e91a:  socket(0x2, 0x1, 0x0)        = 10 0
82704/0x4e91a:  fcntl(0xA, 0x2, 0x1)         = 0 0
82704/0x4e91a:  __sysctl(0x116F2FBC0, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FBC0, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x0)      = 0 0

// HEAPS OF THESE

82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x0)      = 0 0
82704/0x4e91a:  __sysctl(0x116F2FB80, 0x6, 0x103826800)      = 0 0
82704/0x4e91a:  close(0xA)       = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80890)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80960)      = 0 0
82704/0x4e930:  socket(0x20, 0x3, 0x1)       = 10 0
82704/0x4e930:  ioctl(0xA, 0x800C6502, 0x102E7FB30)      = 0 0
82704/0x4e930:  ioctl(0xF, 0x802869C8, 0x102E80990)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80990)      = -1 Err#5
82704/0x4e930:  close(0xA)       = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80CC0)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80C50)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80CC0)      = 0 0

// HEAPS OF THESE

82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80CC0)      = 0 0
82704/0x4e930:  ioctl(0xF, 0xC02869C9, 0x102E80C50)      = 0 0
82704/0x4e930:  write(0x8, "\0", 0x1)        = 1 0
82704/0x4e930:  sendto(0xB, 0x102E80C4F, 0x1)        = 1 0
82704/0x4e930:  close(0x10)      = 0 0
82704/0x4e930:  close(0xF)       = 0 0
82704/0x4e930:  close(0xD)       = 0 0
82704/0x4e930:  close(0xE)       = 0 0
82704/0x4e930:  __disable_threadsignal(0x1, 0x0, 0x0)        = 0 0
82704/0x4e914:  __semwait_signal(0x4203, 0x4303, 0x0)        = 0 0
82704/0x4e91b:  select(0x20, 0x102954130, 0x1029443E0, 0x0, 0x0)         = 1 0
82704/0x4e91b:  recvfrom(0xC, 0x116FC2DD0, 0x100)        = 1 0
82704/0x4e914:  __semwait_signal(0x4303, 0x4103, 0x0)        = 0 0

// THEN I INTERRUPTED THE TEST AFTER HANGING

82704/0x4e91a:  select(0x8, 0x1038311C0, 0x103831458, 0x1038316F0, 0x116F30C78)      = -1 Err#4
82704/0x4e91b:  select(0x20, 0x102954130, 0x1029443E0, 0x0, 0x0)         = -1 Err#4
82704/0x4e916:  kevent(0x3, 0x0, 0x0)        = -1 Err#4
82704/0x4e919:  __semwait_signal(0x3F03, 0x4003, 0x0)        = -1 Err#4

Poltergeist just sits and waits for phantomjs to send it something to read

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

Another question: did you install the phantomjs tarball, or did you compile phantomjs yourself? (perhaps via homebrew?)

from poltergeist.

benkitzelman avatar benkitzelman commented on July 19, 2024

Hi - sorry for the late reply - it was a standard homebrew install

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

Ok, I think that's probably your issue. I believe homebrew compiles against Qt 4.7, which has an old version of WebKit and generally misses out on a bunch of patches that are supposed to be applied for PhantomJS to work correctly. Please try the binary package as detailed in the readme. (FWIW, PhantomJS 1.5 is imminent and doesn't compile against Qt at all any more - it has its own in-built, patched, version of Qt 4.8.)

from poltergeist.

benkitzelman avatar benkitzelman commented on July 19, 2024

That was the issue - all working now - cheers for that :)

from poltergeist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.