[apport] apport-gtk crashed with TypeError in thread_collect_info()

Bug #98961 reported by Brian J. Murrell
2
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apport

apport crashed while i was trying to send a crash from amandad.

ProblemType: Crash
ApportLog:
 apport (pid 14751) Fri Mar 30 04:10:31 2007: called for pid 5462, signal 11
 apport (pid 14751) Fri Mar 30 04:10:31 2007: executable: /usr/lib/amanda/amandad (command line "amandad")
 apport (pid 14751) Fri Mar 30 04:10:31 2007: writing core dump to /tmp/amanda/core (limit: None)
 apport (pid 14751) Fri Mar 30 04:10:38 2007: wrote report /var/crash/_usr_lib_amanda_amandad.34.crash
Architecture: i386
CrashReports:
 600:34:34:3924:2007-03-30 04:10:37.000000000 -0400:2007-03-30 07:10:17.000000000 -0400:/var/crash/_usr_lib_amanda_amandad.34.crash
 600:1001:1001:45776:2007-03-21 20:12:11.000000000 -0400:2007-03-30 02:19:09.000000000 -0400:/var/crash/_usr_lib_firefox_firefox-bin.1001.crash
 600:0:0:26760:2007-03-30 07:10:56.000000000 -0400:2007-03-30 07:11:20.000000000 -0400:/var/crash/_usr_share_apport_apport-gtk.0.crash
Date: Fri Mar 30 07:10:57 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/share/apport/apport-gtk
InterpreterPath: /usr/bin/python2.5
Package: apport-gtk 0.71
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
ProcCwd: /home/brian
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
 LANG=en_CA.UTF-8
PythonArgs: ['/usr/share/apport/apport-gtk']
SourcePackage: apport
Uname: Linux pc 2.6.20-10-generic #2 SMP Mon Mar 12 00:02:49 UTC 2007 i686 GNU/Linux

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Did you install amanda from an official Ubuntu package? What does

  apt-cache policy amanda-server

say?

Changed in apport:
status: Unconfirmed → Needs Info
Revision history for this message
Martin Pitt (pitti) wrote :

I fixed the crash now, but now it will report that the crash does not come from a genuine Ubuntu package. Thus I still appreciate the output I asked for, since this is a bit weird.

Changed in apport:
status: Needs Info → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

 apport (0.74) feisty; urgency=low
 .
   * debian/apport-{gtk,qt}.install: Do not install .desktop files for now,
     until we get a proper guided bug reporting.
   * problem_report.py, write_mime(): Do not re-compress keys which already end
     in .gz. Add test cases.
   * test-hooks: Add a (dodgy) test case for calling package_hook on an
     uninstalled package. After all, this is very likely to happen for
     installation errors. This reproduces #97636.
   * backends/packaging-dpkg.py, get_source(): Add a similarly dodgy fallback
     to apt if the queried package is not installed. This needs to be
     generalized and cleaned up later, but now is the time for unintrusive
     small patches. (LP: #97636)
   * test-apport: Do not fail on non-empty gdb stderr if it only consists of a
     single warning (as happens on powerpc).
   * apport/report.py, test_check_interpreted(): Run gedit test on an actually
     existing file, reproducing the interpreter confusion reported in #102056.
   * apport/report.py, _check_interpreted(): Add a whitelist of common
     interpreters and check ExecutablePath against it. (LP: #102056)
   * apport/ui.py: Ignore SystemError exceptions from apt, which happen on
     badly formatted source.list entries. (LP: #98901)
   * apport/ui.py: Fix crash on None candiateOrigin from the apt cache object.
     (LP: #98961)
   * gtk/apport-gtk.glade: Add window titles to progress and details dialogs.
     (LP: #97640)

Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
Download full text (5.5 KiB)

Yeah, you are reminding me that I rolled my own for this package. The reason is that my amanda server is 2.5.0 still which seems to be incompatible with 2.5.1, yet i needed a fix that went into 2.5.1 for gnutar's listed-incremental files.

The specific patch I needed to add your your 2.5.0p2-1 package just in case you are interested:

--- amanda-2.5.0p2.orig/client-src/sendsize.c
+++ amanda-2.5.0p2/client-src/sendsize.c
@@ -1454,6 +1454,9 @@
     char *file_exclude = NULL;
     char *file_include = NULL;
     times_t start_time;
+ int infd, outfd;
+ ssize_t nb;
+ char buf[32768];

     if(options->exclude_file) nb_exclude += options->exclude_file->nb_element;
     if(options->exclude_list) nb_exclude += options->exclude_list->nb_element;
@@ -1497,7 +1500,8 @@
   * be true for a level 0), arrange to read from /dev/null.
   */
  baselevel = level;
- while (in == NULL) {
+ infd = -1;
+ while (infd == -1) {
      if (--baselevel >= 0) {
   snprintf(number, sizeof(number), "%d", baselevel);
   inputname = newvstralloc(inputname,
@@ -1505,7 +1509,7 @@
      } else {
   inputname = newstralloc(inputname, "/dev/null");
      }
- if ((in = fopen(inputname, "r")) == NULL) {
+ if ((infd = open(inputname, O_RDONLY)) == -1) {
   int save_errno = errno;

   dbprintf(("%s: gnutar: error opening %s: %s\n",
@@ -1519,40 +1523,36 @@
  /*
   * Copy the previous listed incremental file to the new one.
   */
- if ((out = fopen(incrname, "w")) == NULL) {
+ if ((outfd = open(incrname, O_WRONLY|O_CREAT, 0600)) == -1) {
      dbprintf(("%s: opening %s: %s\n",
         debug_prefix(NULL), incrname, strerror(errno)));
      goto common_exit;
  }

- for (; (line = agets(in)) != NULL; free(line)) {
- if (fputs(line, out) == EOF || putc('\n', out) == EOF) {
+ while ((nb = read(infd, &buf, SIZEOF(buf))) > 0) {
+ if (fullwrite(outfd, &buf, (size_t)nb) < nb) {
   dbprintf(("%s: writing to %s: %s\n",
       debug_prefix(NULL), incrname, strerror(errno)));
   goto common_exit;
      }
  }
- amfree(line);
-
- if (ferror(in)) {
+
+ if (nb < 0) {
      dbprintf(("%s: reading from %s: %s\n",
         debug_prefix(NULL), inputname, strerror(errno)));
      goto common_exit;
  }
- if (fclose(in) == EOF) {
+
+ if (close(infd) != 0) {
      dbprintf(("%s: closing %s: %s\n",
         debug_prefix(NULL), inputname, strerror(errno)));
- in = NULL;
      goto common_exit;
  }
- in = NULL;
- if (fclose(out) == EOF) {
+ if (close(outfd) != 0) {
      dbprintf(("%s: closing %s: %s\n",
         debug_prefix(NULL), incrname, strerror(errno)));
- out = NULL;
      goto common_exit;
  }
- out = NULL;

  amfree(inputname);
  amfree(basename);
--- amanda-2.5.0p2.orig/client-src/sendbackup-gnutar.c
+++ amanda-2.5.0p2/client-src/sendbackup-gnutar.c
@@ -147,6 +147,10 @@
     char *encryptopt = skip_argument;
     char *quoted;
     char *qdisk;
+ int infd, outfd;
+ ssize_t nb;
+ char buf[32768];
+

     error_pn = stralloc2(get_pname(), "-smbclient");
 @@ -240,7 +246,8 @@
   * be true for a level 0), arrange to read from /dev/null.
   */
  baselevel = level;
- while (in == NULL) {
+ infd = -1;
+ while (infd == -1) {
      if (--baselevel >= 0) {
   snp...

Read more...

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.