Bug#917143: t-coffee breaks libbio-tools-run-alignment-tcoffee-perl autopkgtest: COREDUMP
Bernhard Übelacker
bernhardu at mailbox.org
Tue Dec 25 13:17:17 GMT 2018
Sorry, missed the file.
-------------- next part --------------
# buster amd64 qemu VM
apt update
apt dist-upgrade
apt install systemd-coredump fakeroot mc gdb htop dpkg-dev devscripts quilt
apt build-dep libbio-tools-run-alignment-tcoffee-perl
apt build-dep t-coffee
wget http://ftp.de.debian.org/debian/pool/main/t/t-coffee/t-coffee_12.00.7fb08c2-1_amd64.deb
dpkg -i t-coffee_12.00.7fb08c2-1_amd64.deb
mkdir source/libbio-tools-run-alignment-tcoffee-perl/orig -p
cd source/libbio-tools-run-alignment-tcoffee-perl/orig
apt source libbio-tools-run-alignment-tcoffee-perl
cd
mkdir source/t-coffee/orig -p
cd source/t-coffee/orig
dget http://deb.debian.org/debian/pool/main/t/t-coffee/t-coffee_12.00.7fb08c2-1.dsc
cd
cd source/t-coffee
cp orig try1 -a
cd try1/t-coffee-12.00.7fb08c2
# add gdb call
dpkg-buildpackage
dpkg -i /home/benutzer/source/t-coffee/try1/t-coffee_12.00.7fb08c2-1_amd64.deb
dpkg -i /home/benutzer/source/t-coffee/try1/t-coffee-dbgsym_12.00.7fb08c2-1_amd64.deb
cd source/libbio-tools-run-alignment-tcoffee-perl
cp orig try1 -a
cd try1/libbio-tools-run-alignment-tcoffee-perl-1.7.4/
dpkg-buildpackage -b
-> No crash
##############
# switch to unstable
apt update
apt dist-upgrade
cd source/t-coffee
cp orig try2 -a
cd try2/t-coffee-12.00.7fb08c2
cat <<EOF > debian/patches/0000-call-gdb-on-signal.patch
Description: 0000-call-gdb-on-signal.patch
Index: t-coffee-12.00.7fb08c2/t_coffee_source/util_lib/util.c
===================================================================
--- t-coffee-12.00.7fb08c2.orig/t_coffee_source/util_lib/util.c
+++ t-coffee-12.00.7fb08c2/t_coffee_source/util_lib/util.c
@@ -10002,6 +10002,11 @@ void error_exit (int exit_code)
{
lock (getpid(), LERROR, LSET, "%d -- ERROR: COREDUMP: %s %s (%s)\n",getpid(), PROGRAM, VERSION, BUILD_INFO );
global_exit_signal=exit_code;
+ {
+ char buf[200];
+ sprintf(buf, "gdb -q -n -batch -ex 'generate-core-file' -ex 'info thread' -ex 'info reg' -ex 'thread apply all bt full' -ex 'info share' -ex 'detach' -ex 'quit' --pid %d", getpid());
+ system(buf);
+ }
myexit (exit_code);
}
EOF
echo 0000-call-gdb-on-signal.patch >> debian/patches/series
dpkg-buildpackage
dpkg -i /home/benutzer/source/t-coffee/try2/t-coffee_12.00.7fb08c2-1_amd64.deb
dpkg -i /home/benutzer/source/t-coffee/try2/t-coffee-dbgsym_12.00.7fb08c2-1_amd64.deb
cd source/libbio-tools-run-alignment-tcoffee-perl
cp orig try2 -a
cd try2/libbio-tools-run-alignment-tcoffee-perl-1.7.4/
dpkg-buildpackage -b
$ find -iname "*core*"
./core.3995
./core.3996
./core.3994
./core.4000
$ gdb -q -ex 'set pagination off' -ex 'set width 0' -ex 'directory /home/benutzer/source/t-coffee/try2/t-coffee-12.00.7fb08c2/t_coffee_source' /usr/bin/t_coffee --core ./core.3995
Reading symbols from /usr/bin/t_coffee...Reading symbols from /usr/lib/debug/.build-id/26/7314cbd87aae405b78889c1e3af85806aea901.debug...done.
done.
[New LWP 3995]
Core was generated by `/usr/bin/t_coffee'.
#0 0x00007fe6b33eb7f7 in __GI___waitpid (pid=4065, stat_loc=stat_loc at entry=0x7ffe74a7b488, options=options at entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
30 ../sysdeps/unix/sysv/linux/waitpid.c: Datei oder Verzeichnis nicht gefunden.
Source directories searched: /home/benutzer/source/t-coffee/try2/t-coffee-12.00.7fb08c2/t_coffee_source:$cdir:$cwd
(gdb) bt
#0 0x00007fe6b33eb7f7 in __GI___waitpid (pid=4065, stat_loc=stat_loc at entry=0x7ffe74a7b488, options=options at entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007fe6b336980f in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
#2 0x000055f262eef2b0 in error_exit (exit_code=11) at util_lib/util.c:10008
#3 <signal handler called>
#4 0x000055f262ebb84d in decode_name (name=name at entry=0x55f26537f1f0 "TCTAG_53775_4", mode=mode at entry=2) at util_lib/reformat.c:14644
#5 0x000055f262ebbbdd in translate_name (name=0x55f26537f1f0 "TCTAG_53775_4") at util_lib/reformat.c:14575
#6 0x000055f262ebd1da in get_fasta_sequence (fname=<optimized out>, comment_out=0x0) at util_lib/reformat.c:5304
#7 0x000055f262ebe7b7 in main_read_aln (name=name at entry=0x55f265366250 "/var/tmp/tco/tcoifo4u0ng3972//11383988396", A=0x55f26538bf90, A at entry=0x0) at util_lib/reformat.c:1532
#8 0x000055f262f28db1 in aln_file2constraint_list (alname=alname at entry=0x55f265366250 "/var/tmp/tco/tcoifo4u0ng3972//11383988396", CL=CL at entry=0x55f2652de520, weight_mode=weight_mode at entry=0x55f265363858 "sim") at util_lib/util_constraints_list.c:4304
#9 0x000055f262f3decf in read_constraint_list (CL=0x55f2652de520, in_fname=<optimized out>, in_mode=in_mode at entry=0x55f262f582fc "aln", mem_mode=mem_mode at entry=0x55f262f6702f "disk", weight_mode=weight_mode at entry=0x55f265363858 "sim") at util_lib/util_constraints_list.c:2368
#10 0x000055f262f3dfaa in retrieve_lib_job (job=0x55f2635cb990) at util_lib/util_constraints_list.c:473
#11 0x000055f262f20bb5 in fork_subset_produce_list (CL=CL at entry=0x55f2652de520, method=method at entry=0x55f263617d71 "clustalw_pair", job=0x55f2635cb990, job at entry=0x55f263ab2f00, nproc=<optimized out>, local_stderr=0x55f2634f9bd0, mem_mode=0x55f2634f9bd0 "\204,\255", <incomplete sequence \373>, weight=<optimized out>, S=0x55f263617d71) at util_lib/util_constraints_list.c:177
#12 0x000055f262f3d1bf in produce_list (CL=CL at entry=0x55f2652de520, S=<optimized out>, method=method at entry=0x55f263617d71 "clustalw_pair", weight=weight at entry=0x55f2639d4020 "default", mem_mode=mem_mode at entry=0x55f2635cfbc0 "mem") at util_lib/util_constraints_list.c:94
#13 0x000055f262f3dc70 in read_constraint_list (CL=CL at entry=0x55f2652de520, in_fname=<optimized out>, in_mode=in_mode at entry=0x0, mem_mode=mem_mode at entry=0x55f2635cfbc0 "mem", weight_mode=weight_mode at entry=0x55f2639d4020 "default") at util_lib/util_constraints_list.c:2332
#14 0x000055f262f3e253 in fork_read_n_constraint_list (fname=0x55f2636139e0, n_list=<optimized out>, in_mode=0x0, mem_mode=0x55f2635cfbc0 "mem", weight_mode=0x55f2639d4020 "default", type=<optimized out>, local_stderr=0x55f2634f9bd0, CL=0x55f2652de520, seq_source=0x55f2639a9560 "ANY", nproc=8) at util_lib/util_constraints_list.c:2218
#15 0x000055f262f3e812 in read_n_constraint_list (fname=0x55f2636139e0, n_list=4, in_mode=0x0, mem_mode=0x55f2635cfbc0 "mem", weight_mode=0x55f2639d4020 "default", type=0x55f2635c74a0 "", local_stderr=0x55f2634f9bd0, CL=0x55f2652de520, seq_source=0x55f2639a9560 "ANY") at util_lib/util_constraints_list.c:2141
#16 0x000055f262e697f0 in batch_main (argc=<optimized out>, argv=<optimized out>) at t_coffee_lib/t_coffee.c:4942
#17 0x000055f262d905ad in main (argc=<optimized out>, argv=<optimized out>) at t_coffee_lib/t_coffee.c:179
(gdb) up
#1 0x00007fe6b336980f in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
149 ../sysdeps/posix/system.c: Datei oder Verzeichnis nicht gefunden.
(gdb)
#2 0x000055f262eef2b0 in error_exit (exit_code=11) at util_lib/util.c:10008
warning: Source file is more recent than executable.
10008 system(buf);
(gdb)
#3 <signal handler called>
(gdb)
#4 0x000055f262ebb84d in decode_name (name=name at entry=0x55f26537f1f0 "TCTAG_53775_4", mode=mode at entry=2) at util_lib/reformat.c:14644
14644 return name_list[i-1][0];
(gdb) list util_lib/reformat.c:14584,14700
14584 char *decode_name (char *name, int mode)
14585 {
14586 static char ***name_list;
14587 static int n;
14588 static char tag[100];
14589 int a;
14590
14591 if (mode==CLEAN)
14592 {
14593 for (a=0; a<n; a++)
14594 {
14595 vfree (name_list[a][0]);
14596 vfree (name_list[a][1]);
14597 vfree (name_list[a]);
14598 }
14599 vfree (name_list);
14600 tag[0]='\0';
14601 }
14602
14603 //spacial modes
14604 if ( mode == CODELIST)
14605 {
14606 char *file;
14607 file=vtmpnam (NULL);
14608 for (a=0; a< n; a++)
14609 printf_file(file, "a", "#CODE: %s <=> %s\n", name_list[a][0], name_list[a][1]);
14610 return file;
14611 }
14612 if (mode ==DECODE && name_list==NULL)return name;
14613 if ( name==NULL) return name;
14614
14615
14616
14617 if (!tag[0])
14618 {
14619 vsrand (0);
14620 sprintf ( tag, "TCTAG_%d",rand ()%100000);
14621 }
14622
14623 if ( mode==CODE)
14624 {
14625 for (a=0; a< n; a++)
14626 if ( strm (name, name_list[a][0]))return name_list[a][1];
14627
14628 name_list=(char***)realloc (name_list, sizeof (char**)*(n+1));
14629 name_list[n]=(char**)vcalloc (2, sizeof (char*));
14630 name_list[n][0]=(char*)vcalloc (strlen (name)+1, sizeof (char));
14631 name_list[n][1]=(char*)vcalloc (100, sizeof (char));
14632 sprintf ( name_list[n][0], "%s", name);
14633 sprintf ( name_list[n][1], "%s_%d", tag,n+1);
14634 return name_list[n++][1];
14635 }
14636 else if ( mode ==DECODE)
14637 {
14638 char *p;
14639 int i;
14640 if ( !(p=after_strstr (name, tag)))return name;
14641 else
14642 {
14643 sscanf (p, "_%d", &i);
14644 return name_list[i-1][0]; <<<<<<<<<<<
14645 }
14646 }
14647 else
14648 {
14649 printf_exit (EXIT_FAILURE, stderr,"Unknown Mode for Decode_name [FATAL:%s]", PROGRAM);
14650 }
14651 return NULL;
14652 }
(gdb) print i
$8 = 4
(gdb) print mode
$9 = 2
(gdb) print p
$10 = <optimized out>
(gdb) print name
$11 = 0x55f26537f1f0 "TCTAG_53775_4"
(gdb) print name_list
$12 = (char ***) 0x55f2635d00e0
(gdb) print name_list[0]
$13 = (char **) 0x55f26535a050
(gdb) print *name_list[0]
$14 = 0x55f265359d50 "CATH_RAT"
(gdb) print name_list[1]
$15 = (char **) 0x55f26536a410
(gdb) print *name_list[1]
$16 = 0x55f26536a290 "OW0UmFQ1YB"
(gdb) print name_list[2]
$17 = (char **) 0x55f265383220
(gdb) print *name_list[2]
$18 = 0x55f2653705e0 "PAPA_CARPA"
(gdb) print name_list[3]
$19 = (char **) 0x381
(gdb) print *name_list[3]
Cannot access memory at address 0x381
(gdb) disassemble 0x000055f262ebb84d-0x30,0x000055f262ebb84d+0x20
Dump of assembler code from 0x55f262ebb81d to 0x55f262ebb86d:
0x000055f262ebb81d <decode_name(char*, int)+125>: (bad)
0x000055f262ebb81e <decode_name(char*, int)+126>: imul $0xc0854800,(%rdx),%eax
0x000055f262ebb824 <decode_name(char*, int)+132>: je 0x55f262ebb850 <decode_name(char*, int)+176>
0x000055f262ebb826 <decode_name(char*, int)+134>: lea 0x4(%rsp),%rdx
0x000055f262ebb82b <decode_name(char*, int)+139>: mov %rax,%rdi
0x000055f262ebb82e <decode_name(char*, int)+142>: lea 0xab7df(%rip),%rsi # 0x55f262f67014
0x000055f262ebb835 <decode_name(char*, int)+149>: xor %eax,%eax
0x000055f262ebb837 <decode_name(char*, int)+151>: callq 0x55f262d8f280 <sscanf at plt>
0x000055f262ebb83c <decode_name(char*, int)+156>: movslq 0x4(%rsp),%rdx
0x000055f262ebb841 <decode_name(char*, int)+161>: mov 0x172cc0(%rip),%rax # 0x55f26302e508 <_ZZ11decode_namePciE9name_list>
0x000055f262ebb848 <decode_name(char*, int)+168>: mov -0x8(%rax,%rdx,8),%rax
=> 0x000055f262ebb84d <decode_name(char*, int)+173>: mov (%rax),%r13
0x000055f262ebb850 <decode_name(char*, int)+176>: mov 0x8(%rsp),%rcx
0x000055f262ebb855 <decode_name(char*, int)+181>: xor %fs:0x28,%rcx
0x000055f262ebb85e <decode_name(char*, int)+190>: mov %r13,%rax
0x000055f262ebb861 <decode_name(char*, int)+193>: jne 0x55f262ebbb38 <decode_name(char*, int)+920>
0x000055f262ebb867 <decode_name(char*, int)+199>: add $0x18,%rsp
0x000055f262ebb86b <decode_name(char*, int)+203>: pop %rbx
0x000055f262ebb86c <decode_name(char*, int)+204>: pop %rbp
End of assembler dump.
(gdb) print/x $rax
$21 = 0x381
More information about the pkg-perl-maintainers
mailing list