Apport unable to report crash - urlopen error timed out

Bug #314212 reported by Matt Walker
140
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Apport
Invalid
Undecided
Unassigned
python-launchpad-bugs
Fix Released
Undecided
Unassigned
apport (Ubuntu)
Invalid
High
Unassigned
Nominated for Lucid by nascentmind
Jaunty
Invalid
High
Unassigned
python-apt (Ubuntu)
Fix Released
Medium
Michael Vogt
Nominated for Lucid by nascentmind
Jaunty
Won't Fix
Medium
Michael Vogt

Bug Description

Binary package hint: apport

I enabled apport in Jaunty and a crash occurred and apport was unable to report bug to launchpad database. This has been occurring for about 2 weeks now, and it seems to only give an error message when i choose to submit a complete report. And with a minimum report it is unable to process that neither.

I get the error: Network problem
could not upload report data to crash database:
<urlopen error The write operation timed out>

Tags: iso-testing
Revision history for this message
Matt Walker (matthaeus123) wrote :
Changed in apport:
status: New → Confirmed
Changed in launchpad-integration:
status: Confirmed → New
Revision history for this message
Daniel Hahler (blueyed) wrote :

Confirming, also because of duplicate.

It says in the bug 311082 that it's related only to xserver reports.
I'm getting this quite often, too. do not know if it's related to a particular package - it might be a kopete report, but "ubuntu-bug kopete" opens firefox correctly.

I can reproduce a "<urlopen error The write operation timed out>" error with a _usr_bin_kopete.1000.crash file ("/usr/share/apport/apport-{gtk,qt} -c /var/crash/_usr_bin_kopete.1000.crash"). Please let me know, if you need it to debug this.

It probably depends on the size of the crash file/data to be submitted?! (the sample crash file is ~10MB)

This is with apport 0.126.

Changed in apport:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jean.c.h (slug71) wrote :

Have gotten this about 3 times now too all relating to the same bug but i cant get it reported because of this one.

Revision history for this message
Jean.c.h (slug71) wrote :

Using Jaunty BTW

Revision history for this message
Åsmund Hjulstad (asmund) wrote :

Experiencing same problem (fresh jaunty), trying to report a bug after a vlc crash.

Jean.c.h (slug71)
Changed in apport:
status: New → Confirmed
Revision history for this message
André Gondim (andregondim) wrote :

I have this problem when try preview in "Notification Settings".

When I try report the problem, receve this problem with apport.

I'm using Jaunty Alpha 2

Cheers.

Revision history for this message
lilbudda (cory-meisch-gmail) wrote :

Same here. Haven't been able to report any error reports due to this problem.

Revision history for this message
Jean.c.h (slug71) wrote :

Had some Apport updates this morning but still have this bug.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

I've seen this also, but not against any one package. It has surfaced reporting against firefox, gedit, ubiquity, debian-installer at least. Most of the time, hitting try again in a couple of minutes lets it go through.

Revision history for this message
Daniel Queirolo (danf-1979) wrote :

Same here, this makes apport completely unusable for me in jaunty.

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :

Same here, I lost five different reports until now. Please fix this bug with priority critical. This bug prevents sending any bug reports and many are being lost, with serious consequences for development.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Raising prio to "High".

Changed in apport:
importance: Medium → High
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Wasn't there an "affects me too" button somewhere in Launchpad?

Anyway, this one affects me too. And for some reason after one or two tries Apport doesn't offer to send a report anymore (no idea if that's intended to happen), and so I can't retry sending it, as Charlie suggested.

Revision history for this message
Kjell Braden (afflux) wrote :

It's definetly independent of the crash file size, since simple python tracebacks don't seem to get uploaded either.

Revision history for this message
Markus Korn (thekorn) wrote :

I'm wondering how this is related to bug 309307.
To me it looks like this error is catched in UserInterface.file_report() (in apport/ui.py). This method is calling crashdb.upload() which is using this storeblob method of launchpad.

Revision history for this message
Markus Korn (thekorn) wrote :

I'm able to reproduce this timeout in about 1 out of 10 times when using apport on intrepid and on jaunty.
This timeout happens on launchpad.net/+storeblob this is why I added a task for launchpad.
I think as a workaround it makes sense to add a "try again" button to apport, or automatically try again a few times on timeouts.

Revision history for this message
spitfire (mieszkoslusarczyk) wrote :

This bug prevented me from reporting bug, everytime I tried it (jaunty a3).

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Is there an OOPS reference on the launchpad.net/+storeblob failure? That page doesn't appear in our daily OOPS report.

Or is this an Apache error page? (Is the error generated by Launchpad or by the apache front-proxy?)

Changed in launchpad:
status: New → Incomplete
Revision history for this message
Kjell Braden (afflux) wrote :

Removed unrelated logfiles with sensitive content.

Revision history for this message
spitfire (mieszkoslusarczyk) wrote :

Kjell, can you tell me what should I attach?

Revision history for this message
Alex Krastelev (alex-netrc) wrote :

Setting socket timeout ( socket.setdefaulttimeout(10)) fixes the bug but the reasons is unclear.

This patch fixes the bug under 9.04
in /usr/lib/python2.5/site-packages/launchpadbugs/storeblob.py
--- storeblob.py.orig
+++ storeblob.py
@@ -11,6 +11,7 @@
 '''

 import multipartpost_handler, urllib2, time, httplib
+import socket

 _https_upload_callback = None

@@ -68,6 +69,7 @@

     global _https_upload_callback
     _https_upload_callback = progress_callback
+ socket.setdefaulttimeout(10)
     opener = urllib2.build_opener(HTTPSProgressHandler, multipartpost_handler.MultipartPostHandler)
     result = opener.open('https://launchpad.net/+storeblob',
         { 'FORM_SUBMIT': '1', 'field.blob': blob })

Revision history for this message
STEVE555 (stevenward666) wrote :

Hi to all,
           I have been getting the same problem for sometime as well.
Here is the error message:
Could not upload report data to crash database:

<urlopen error The write operation timed out>

I'm currently using Kubuntu Jaunty Jackalope Alpha 3.

Regards,
            Steve

Revision history for this message
Alex Krastelev (alex-netrc) wrote :

Here is the reason for apport timeouts:
apt package ( imported by apport/packaging_impl.py) sets default timeout to 2 seconds, this seems to be too short for apport uploads.

in /usr/lib/python2.5/site-packages/apt/package.py
...
# Set a timeout for the changelog download
socket.setdefaulttimeout(2)
...

***This timeout must be increased.***

I wonder whether this timeout changed recently ?
Could anyone with 8.04 or 8.10 check if this timeout is 2 seconds, too ?
(please check in /usr/lib/python2.5/site-packages/apt/package.py)

Revision history for this message
spitfire (mieszkoslusarczyk) wrote :
Revision history for this message
Alex Krastelev (alex-netrc) wrote :

Thanks, found the package.py in Bazaar. The problematic 2-second timeout was introduced in rev 305 in the end of November 2008. Before the rev 305 there was no timeout at all.

Could anyone with knowledge of python-apt test increasing the timeout in package.py from 2 to 10 seconds and comment on this fix ?

Here is when the 2-second timeout appeared first:
merged from the consolidation-bracn (with some modificatins) // Michael Vogt 2008-11-24
http://bazaar.launchpad.net/~mvo/python-apt/python-apt--mvo/annotate/head%3A/apt/package.py

=== modified file 'apt/package.py'
--- apt/package.py 2008-09-18 12:58:03 +0000
+++ apt/package.py 2008-11-24 13:46:48 +0000
@@ -19,10 +19,18 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA

-import apt_pkg
+import httplib
 import sys
 import random
+import re
+import socket
 import string
+import urllib2
+
+import apt_pkg
+
+# Set a timeout for the changelog download
+socket.setdefaulttimeout(2)

 #from gettext import gettext as _
 import gettext

Revision history for this message
Matt Walker (matthaeus123) wrote :

I downloaded revision 297, and it fixed only part of the problem. It uploaded the file successfully, but was unable to connect to launchpad correctly

file:///ubuntu/+source/pidgin/+filebug/cc1aJmaHRqzC9fiQBYkxarPo7Oq
^That's the address apport sent me to after uploading the report.

Revision history for this message
Alex Krastelev (alex-netrc) wrote :

I think at the moment it's better to manually change
socket.setdefaulttimeout(2) to socket.setdefaulttimeout(10) in /usr/lib/python2.5/site-packages/apt/package.py,
instead of reverting to the revision 297

Regarding apport opening non-existing URL file:///ubuntu/...
It seems to be an unrelated bug that happens when a file in /var/crash is not readable for you (owned by root).
After chowning the file in /var/crash I could submit the big.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded a new release of python-launchpad-bugs to Jaunty that will work around this issue by increasing the default timeout in storeblob.py. Thanks for the tip Alex and thanks to Markus for the patch.

Changed in python-apt:
status: New → Triaged
Markus Korn (thekorn)
Changed in launchpad:
status: Incomplete → Invalid
Changed in apport:
status: Confirmed → Invalid
Changed in python-launchpad-bugs:
status: New → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for looking into this, I will fix the python-apt code

Changed in python-apt:
assignee: nobody → mvo
importance: Undecided → Medium
status: Triaged → In Progress
Revision history for this message
Jean.c.h (slug71) wrote :

Seems to be working for me so far again.

Revision history for this message
Matt Walker (matthaeus123) wrote :

It failed for me today, but didn't at all yesterday. But the report was about 14mb

Revision history for this message
wulf solter (wulfsolter) wrote :

manually changed socket.setdefaulttimeout(2) to socket.setdefaulttimeout(10) in /usr/lib/python2.5/site-packages/ and havn't had any problems since!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 0.7.9~exp2ubuntu4

---------------
python-apt (0.7.9~exp2ubuntu4) jaunty; urgency=low

  * apt/cache.py:
    - when running with the rootdir option, run
      InitConfig() again to ensure that the config
      from the rootdir is read, not from the host
      (lp: #243550)
  * apt/package.py:
    - make sure to set the defaulttimeout back to the
      original value (in getChangelog(), LP: #314212)

 -- Michael Vogt <email address hidden> Mon, 26 Jan 2009 08:45:00 +0100

Changed in python-apt:
status: In Progress → Fix Released
Revision history for this message
spitfire (mieszkoslusarczyk) wrote :

Now I tried to submit bug report (sending file > 10M), and just in the ended it showed up:

HTTP Error 502: Bad Gateway

Revision history for this message
spitfire (mieszkoslusarczyk) wrote :

Some reports are very big, are the compressed in any way?

Revision history for this message
Steve Langasek (vorlon) wrote :

since this bug was both introduced and fixed in python-apt, I don't think any changes are needed in apport here.

Changed in apport:
status: Triaged → Invalid
Revision history for this message
TJ (tj) wrote :

The problem of apport trying to display launchpad bug reports using "file://" URLs is dealt with in bug #314263

Revision history for this message
Martin Pitt (pitti) wrote :

The python-launchpad-bugs workaround is in Jaunty, but it's not needed any more. However, it doesn't hurt, and p-lp-bugs is relatively obsolete anyway.

Changed in python-launchpad-bugs:
status: Fix Committed → Fix Released
Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

I still get this error in Kubuntu Jaunty alpha 6 !! But it occurs randomly, most of the times i am able to submit bugs.
So, I don't think it is fixed completely yet. This is preventing some of the crashed from being submitted.

I am getting in even when firefox is open and the network connecting is active !!

Is there a way I can submit the crash bug after I get this error?

Revision history for this message
Daniel Hahler (blueyed) wrote :

Musthafa, from "/usr/share/apport/apport-qt -h":
  -c PATH, --crash-file=PATH
                        Report the crash from given .crash file instead of the
                        pending ones in /var/crash

So, try "/usr/share/apport/apport-qt /var/crash/YOURCRASHFILE".

Revision history for this message
Åskar (olskar) wrote :

No, this is not fixed. I can reproduce this 8 out of 10 times on fully updated Jaunty.

Daniel and Musthafa, the correct command is:

/usr/share/apport/apport-gtk --crash-file=/var/crash/YOURCRASHFILE
or
/usr/share/apport/apport-qt --crash-file=/var/crash/YOURCRASHFILE

Revision history for this message
Jeffrey Baker (jwbaker) wrote :

That's because the "fix" is dumb and broken. It will eventually timeout for someone, somewhere, with a slow connection.

Revision history for this message
Åskar (olskar) wrote :

Then I would say it is more of a workaround than a fix, and this should perhaps be marked as confirmed again instead of fix released?

Åskar (olskar)
Changed in python-apt (Ubuntu Jaunty):
status: Fix Released → Confirmed
Revision history for this message
Daniel Stone (danielstone) wrote :

This still effects me and it shows(from speedtest.net) I have an up speed of 0.47Mb/s
This is during page transition on the launchpad site and crash reports through apport
noticed since Saturday

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 314212] Re: Apport unable to report crash - urlopen error timed out

I think that's a different (LP) issue. I've had a lot of issues with LP
timeouts through the web interface recently too.

tags: added: iso-testing
Revision history for this message
Michael Vogt (mvo) wrote :

I close the jaunty task of this.

Changed in python-apt (Ubuntu Jaunty):
status: Confirmed → Won't Fix
tags: removed: iso-testing
tags: added: iso-testing
no longer affects: launchpad
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.