QNetworkAccessManager hangs when in flight mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Zoltan Balogh | ||
qtbase-opensource-src (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
qtbase-opensource-src (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned | ||
thumbnailer (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Testing the fix:
- Update rc-proposed (vivid) to citrain device-upgrade 32 0000
- Optional: If you want to test using the 'generic' bearer plugin instead of the Network Manager bearer, either do not upgrade ubuntu-
- Reboot
---
When my phone is in flight mode, HTTP requests made using QNetworkAccessM
From my tests, it looks like the HTTP request is blocked until the flight mode is disabled and a network connection is reestablished. This is contrary to the documentation, which states:
"""If the network is not accessible the network access manager will not process any new network requests, all such requests will fail with an error. Requests with URLs with the file:// scheme will still be processed."""
http://
By running strace on my test program, it doesn't even look like it attempts to open a TCP connection when blocked in flight mode.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in canonical-devices-system-image: | |
milestone: | none → ww08-2016 |
Changed in canonical-devices-system-image: | |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in thumbnailer (Ubuntu): | |
status: | Triaged → Invalid |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Zoltan Balogh (bzoltan) |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Attached is the test program. I compiled it within the click chroot using the following command:
arm-linux- gnueabihf- g++ -ggdb -std=c++11 -fPIC -o net-test.arm net-test.cpp `arm-linux- gnueabihf- pkg-config --cflags --libs Qt5Network`
When run with a URL as an argument, it will attempt to retrieve the resource every 5 seconds. When in flight mode, I see the process blocked in poll():
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}], 2, -1)
Where the two file descriptors are:
eventfd2(0, O_NONBLOCK| O_CLOEXEC) = 3 SOCK_CLOEXEC, 0) = 7 AF_LOCAL, sun_path= "/var/run/ dbus/system_ bus_socket" }, 33) = 0
socket(PF_LOCAL, SOCK_STREAM|
connect(7, {sa_family=
(i.e. the second is a D-Bus connection to the system bus).