Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI/Rapper hanging on (apparently) OK RDF/XML input #4

Open
CountCulture opened this issue May 12, 2010 · 4 comments
Open

CLI/Rapper hanging on (apparently) OK RDF/XML input #4

CountCulture opened this issue May 12, 2010 · 4 comments
Assignees
Labels

Comments

@CountCulture
Copy link

This is generally working OK for me, but I'm getting it hanging with no apparent errors on the following RDF/XML output produce by w3c Distiller at the following URL:
http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A%2F%2Fwww.scambs.gov.uk%2FCouncilAndDemocracy%2FElections%2F2010results.htm

Running it from the console, it just hangs:
RDF::Reader.for(:rdfxml).new(open("http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A%2F%2Fwww.scambs.gov.uk%2FCouncilAndDemocracy%2FElections%2F2010results.htm"))

interrupting it gives:

CIRB::Abort: abort then interrupt!!
from /opt/local/lib/ruby/1.8/irb.rb:81:in irb_abort' from /opt/local/lib/ruby/1.8/irb.rb:247:insignal_handle'
from /opt/local/lib/ruby/1.8/irb.rb:66:in start' from /opt/local/lib/ruby/gems/1.8/gems/rdf-raptor-0.3.0/lib/rdf/raptor/cli.rb:31:incall'
from /opt/local/lib/ruby/gems/1.8/gems/rdf-raptor-0.3.0/lib/rdf/raptor/cli.rb:31:in write' from /opt/local/lib/ruby/gems/1.8/gems/rdf-raptor-0.3.0/lib/rdf/raptor/cli.rb:31:ininitialize'
from (irb):104:in `new'

Any ideas? Mac OS X 10.5.8, rdf-raptor 0.3.0, rapper 1.4.21

@bhuga
Copy link
Contributor

bhuga commented May 12, 2010

I had very similar issues with the same OS setup. I never quite figured it out, but for whatever reason, a reboot fixed it. It had something to do with the OS not sending EOF's properly. I hurled myself at this for hours before I realized it was below both Ruby and Raptor.

See http://github.com/bendiken/rdf-raptor/issues/closed#issue/3

@jfieber
Copy link
Contributor

jfieber commented May 12, 2010

There are reader/writer deadlocks in the cli implementation which I've made a stab at addressing in http://github.com/jfieber/rdf-raptor.

The output of rapper goes into a pipe, and pipes are finite. If there is no reader consuming the pipe data, rapper will eventually block when writing to the pipe. My fix is simply to read for any rapper output to ensure the rapper's output pipe is clear before shoving something in the input pipe.

Having got those working, I've shifted to implementing an ffi writer, which ought to be quite a bit more efficient.

@artob
Copy link
Member

artob commented May 20, 2010

Chris, could you try again with John's fork of RDF::Raptor. When Ben had this problem earlier, I suspected the very reason that John outlines, and since John's solution looks good to me, hopefully that should fix the problem you are experiencing.

@artob
Copy link
Member

artob commented May 20, 2010

FYI, I've now merged John's work into the mainline, and will release a new major version of the gem after I've had a chance to do some testing (which might not be for a few days yet).

@ghost ghost assigned artob Jan 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants