[Qt-interest] QNetworkAccessManager and SIGPIPE
Jason Wood
jwood275 at googlemail.com
Mon Feb 22 14:35:51 CET 2010
On Mon, Feb 22, 2010 at 1:27 PM, Thiago Macieira <thiago at kde.org> wrote:
> Em Segunda-feira 22 Fevereiro 2010, às 14:04:09, Jason Wood escreveu:
> > Hi,
> >
> > I'm working on an application which uses QNetworkAccessManager to upload
> > data to a web server, I'm using the latest Qt release (4.6.2) and I'm
> > seeing an issue which seems to stop my uploads permanently.
> >
> > The scenario is:
> >
> > Main thread starts and spawns a new thread to handle uploads.
> > Upload thread owns 3 QNetworkAccessManagers to upload simultaneously.
>
> Unnecessary. One thread can do 3 simultaneous uploads, even to the same
> server.
>
OK, that's good to know. It seemed from my initial testing that the requests
would be queued but it seems that was wrong.
>
> > All 3 uploads begin as normal.
> > Main thread receives a SIGPIPE signal.
> > One of the 3 uploads now stops moving and never hits the finished()
> signal
> > with or without an error.
> >
> > This only happens on OSX as the Windows build functions normally. Is
> there
> > anything that would cause this? Perhaps I've got a build setting wrong
> > somewhere? Is there anything more I can do to debug?
>
> Why is your code receiving SIGPIPE?
>
> Is this something you caused?
>
That was my question really, the SIGPIPE occurs at exactly the same time as
a connection error in the server logs so it seems it is related to the
QNetworkAccessManager connection but my question is why do I receive a
SIGPIPE and not an error in the finished() slot for the
QNetworkAccessManager?
The stack trace for the SIGPIPE error is below and it always stops any
further data being sent to the server. I'm quite new to OSX development and
I don't know how to debug the issue further, please let me know if there is
anything I can do to debug further.
#0 0x941828da in mach_msg_trap
#1 0x94183047 in mach_msg
#2 0x9603a77f in __CFRunLoopRun
#3 0x96039864 in CFRunLoopRunSpecific
#4 0x96039691 in CFRunLoopRunInMode
#5 0x003052e0 in QEventDispatcherMac::processEvents
#6 0x0105a3e1 in QEventLoop::processEvents
#7 0x0105a71a in QEventLoop::exec
#8 0x0105bd66 in QCoreApplication::exec
#9 0x0006d159 in main at main.cpp:112
Thanks,
Jason
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100222/3350ffee/attachment.html
More information about the Qt-interest-old
mailing list