njh / redstore

RedStore is a lightweight RDF triplestore written in C using the Redland library.
https://www.aelius.com/njh/redstore/
GNU General Public License v3.0
62 stars 6 forks source link

Make HTTP PUT more robust #24

Closed cgueret closed 13 years ago

cgueret commented 13 years ago

The HTTP PUT handler is not robust enough against bad queries. In the following test code https://gist.github.com/844021 , when the "getresponse" part is commented out redstores crashes just after adding the triples, because of a broken pipe. It is needed (but not obvious) for the client to read the response from redstore to make things work properly.

njh commented 13 years ago

Hello,

I'm afraid that I have been unable to re-produce the problem using the python script that you provided. The script is successfully creating a triple in a named graph for me.

Can you provide me with some extra information please:

Does redstore display anything in verbose mode before crashing?

Thanks,

nick.

cgueret commented 13 years ago

Hi,

* which version of RedStore are you running?

0.5.2 * which version of raptor/rasqal/librdf are you using? 2.0.0/0.9.24/1.0.13 * what operating system are you using? Archlinux x64 * which storage backend are you using? (in-memory is default) I've tried in memory and sqlite, both have the same issue

Does redstore display anything in verbose mode before crashing? Actually, it doesn't crash. Seems more to close properly, the daemon just stops after the triples had been inserted. I found there was a broken pipe when monitoring the execution with strace.

Christophe

njh commented 13 years ago

I'm afraid that I have still been unable to reproduce the problem that you have reported.

I have been testing on a Debian Linux 6.0 (squeeze) system with the following dependancy versions installed and your script is working fine for me:

The only major difference I can see is that you have a 64-bit system. I will try Archlinux x64 under vmware and see if I can re-produce it on that.

nick.

njh commented 13 years ago

I think this was fixed in 0c9d206b5f3c603f7c79195a820444a1929a7d08

cgueret commented 13 years ago

Thanks, that's a good news! I'll test that and let you know if it re-appears ;-)