Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-11 Thread Benjamin Zeller
Ok, i implemented a simple testcase (as simple as possible). And it crashes at exactly the same place. The testcode is attached to the mail! I ran 7 instances of autobench against it (httperf needs to be installed), but maybe it will crash sooner or later if only one is running: http://www.xen

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-10 Thread Thiago Macieira
On terça-feira, 10 de setembro de 2013 17:29:19, Benjamin Zeller wrote: > I did some more debugging today, something changed but its still > crashing at the same place: > > - The QAbstractSocket now has a QAdoptedThread affinity > - The QAbstractSocket has a 0x0 pointer to the engine > - The QAbst

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-10 Thread Benjamin Zeller
I did some more debugging today, something changed but its still crashing at the same place: - The QAbstractSocket now has a QAdoptedThread affinity - The QAbstractSocket has a 0x0 pointer to the engine - The QAbstractSocketEngine has a WorkerThread affinity - The QAbstractSocketEngine has no pare

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Thiago Macieira
On segunda-feira, 9 de setembro de 2013 18:10:25, Benjamin Zeller wrote: > > 2) there's a lingering bug in the dispatcher that causes it to send events > > to objects that have recently been moved away. For example, it's possible > > that the event dispatcher got woken up by two socket activities.

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Thiago Macieira
On segunda-feira, 9 de setembro de 2013 21:46:56, Benjamin Zeller wrote: > Is it maybe possible that due to high load the ThreadChange Event gets > lost (or is delivered too late)? The socket descriptor is then never > disabled and reenabled , which means the thread affinity would be wrong. The T

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Benjamin Zeller
On 09.09.2013 19:30, Thiago Macieira wrote: > On segunda-feira, 9 de setembro de 2013 18:10:25, Benjamin Zeller wrote: >>> 2) there's a lingering bug in the dispatcher that causes it to send events >>> to objects that have recently been moved away. For example, it's possible >>> that the event disp

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Thiago Macieira
On segunda-feira, 9 de setembro de 2013 15:18:26, Benjamin Zeller wrote: > sendEvent is used, but the receiver is in another thread, shouldn't it > use postEvent or better shouldn't the threads eventloop do this stuff? > As a note: the threads eventloop is not running when the crash occurs, > maybe

Re: [Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Benjamin Zeller
On 09.09.2013 17:37, Thiago Macieira wrote: > On segunda-feira, 9 de setembro de 2013 15:18:26, Benjamin Zeller wrote: >> sendEvent is used, but the receiver is in another thread, shouldn't it >> use postEvent or better shouldn't the threads eventloop do this stuff? >> As a note: the threads eventl

[Interest] QNetwork problem in threaded application (repost from development).

2013-09-09 Thread Benjamin Zeller
Hello, i'm currently stress-testing a application at work and came across this problem. The application accepts connections and pushes the created sockets to a worker thread (moveToThread), the worker thread then handles the rest. But sometimes when the socket was already closed in the thread i ge