[med-svn] r20870 - in trunk/packages/t-coffee/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Wed Dec 23 09:57:43 UTC 2015


Author: tille
Date: 2015-12-23 09:57:42 +0000 (Wed, 23 Dec 2015)
New Revision: 20870

Added:
   trunk/packages/t-coffee/trunk/debian/patches/mayhem_debug.patch
Modified:
   trunk/packages/t-coffee/trunk/debian/changelog
   trunk/packages/t-coffee/trunk/debian/patches/mayhem.patch
Log:
Unable to fix Mayhem bug in a sensible time frame - insert some code to make the problem less urgent and drop some debugging code inside debian/patches which is not activated.


Modified: trunk/packages/t-coffee/trunk/debian/changelog
===================================================================
--- trunk/packages/t-coffee/trunk/debian/changelog	2015-12-22 21:16:00 UTC (rev 20869)
+++ trunk/packages/t-coffee/trunk/debian/changelog	2015-12-23 09:57:42 UTC (rev 20870)
@@ -1,4 +1,4 @@
-t-coffee (11.00.8cbe486-2) UNRELEASED; urgency=medium
+t-coffee (11.00.8cbe486-2) unstable; urgency=medium
 
   * cme fix dpkg-control
   * update debian/copyright
@@ -14,7 +14,7 @@
     Closes: #631249
     (feel free to reopen if tests might keep on failing on armel)
 
- -- Andreas Tille <tille at debian.org>  Tue, 22 Dec 2015 17:16:01 +0100
+ -- Andreas Tille <tille at debian.org>  Tue, 22 Dec 2015 19:02:14 +0100
 
 t-coffee (11.00.8cbe486-1) unstable; urgency=low
 

Modified: trunk/packages/t-coffee/trunk/debian/patches/mayhem.patch
===================================================================
--- trunk/packages/t-coffee/trunk/debian/patches/mayhem.patch	2015-12-22 21:16:00 UTC (rev 20869)
+++ trunk/packages/t-coffee/trunk/debian/patches/mayhem.patch	2015-12-23 09:57:42 UTC (rev 20870)
@@ -5,16 +5,21 @@
  The idea behind this patch is that if there is a problem to set the HOME
  directories no additional processes can exist and so we should *really*
  exit.  Somehow the printf_exit() function does some logic which ends up
- in an endless loop and thus forcing the exit by setting clean_exit_started
- will help here.
+ in an endless loop and thus forcing the exit will help here.
+ .
+ Unfortunately this does not solve the issue completely since inside the
+ Exit call a "Segmentation fault" happens - so some broken pointer handling
+ seems to happen somewhere before.
 
 --- a/t_coffee_source/util_lib/util.c
 +++ b/t_coffee_source/util_lib/util.c
-@@ -4642,6 +4641,7 @@ char *get_home_4_tcoffee ()
+@@ -4642,7 +4642,8 @@ char *get_home_4_tcoffee ()
      }
    else
      {
-+      clean_exit_started=1; /* Force exit */
-       printf_exit (EXIT_FAILURE, stderr, "ERROR: Could not set a HOME directory.\nSet any of the following environement variables to some suitable location: HOME, HOME_4_TCOFFEE, TMP or TEMP [FATAL:%s]\n", PROGRAM);
+-      printf_exit (EXIT_FAILURE, stderr, "ERROR: Could not set a HOME directory.\nSet any of the following environement variables to some suitable location: HOME, HOME_4_TCOFFEE, TMP or TEMP [FATAL:%s]\n", PROGRAM);
++      fprintf(stderr, "ERROR: Could not set a HOME directory.\nSet any of the following environement variables to some suitable location: HOME, HOME_4_TCOFFEE, TMP or TEMP [FATAL:%s]\n", PROGRAM);
++      exit(EXIT_FAILURE);
      }
  
+ 

Added: trunk/packages/t-coffee/trunk/debian/patches/mayhem_debug.patch
===================================================================
--- trunk/packages/t-coffee/trunk/debian/patches/mayhem_debug.patch	                        (rev 0)
+++ trunk/packages/t-coffee/trunk/debian/patches/mayhem_debug.patch	2015-12-23 09:57:42 UTC (rev 20870)
@@ -0,0 +1,176 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 21 Dec 2015 21:30:36 +0100
+Bug-Debian: https://bugs.debian.org/716373
+Description: Fix Mayhem issue
+ The idea behind this patch is that if there is a problem to set the HOME
+ directories no additional processes can exist and so we should *really*
+ exit.  Somehow the printf_exit() function does some logic which ends up
+ in an endless loop and thus forcing the exit will help here.
+ .
+ Since the exit call triggers some "Segmentation fault" I'll leave some
+ debug printf lines for further debugging.
+
+--- a/t_coffee_source/util_lib/util.c
++++ b/t_coffee_source/util_lib/util.c
+@@ -4618,9 +4618,9 @@ char *get_home_4_tcoffee ()
+   static char *home_4_tcoffee;
+   static char home[1000];
+ 
+-
+   if ( !home_4_tcoffee)
+     home_4_tcoffee=(char*)vcalloc ( 1000, sizeof (char));
++printf("%s (%d): home_4_tcoffee = %s\n", __FILE__, __LINE__, home_4_tcoffee); fflush(stdout);
+ 
+   if ( home_4_tcoffee[0])return home_4_tcoffee;
+   else if ( check_dir_getenv ("HOME_4_TCOFFEE"))
+@@ -4642,7 +4642,9 @@ char *get_home_4_tcoffee ()
+     }
+   else
+     {
+-      printf_exit (EXIT_FAILURE, stderr, "ERROR: Could not set a HOME directory.\nSet any of the following environement variables to some suitable location: HOME, HOME_4_TCOFFEE, TMP or TEMP [FATAL:%s]\n", PROGRAM);
++      fprintf(stderr, "ERROR: Could not set a HOME directory.\nSet any of the following environement variables to some suitable location: HOME, HOME_4_TCOFFEE, TMP or TEMP [FATAL:%s]\n", PROGRAM);
++printf("%s (%d): PROGRAM = %s\n", __FILE__, __LINE__, PROGRAM); fflush(stdout);
++      exit(EXIT_FAILURE);
+     }
+ 
+ 
+@@ -4880,7 +4882,7 @@ int cputenv (char *string, ...)
+ 
+ 
+ 
+-
++printf("%s (%d): string = %s\n", __FILE__, __LINE__, string); fflush(stdout);
+ 
+   char *s;
+   char *s2;
+@@ -6524,7 +6526,7 @@ int get_cl_param (int argc, char **argv,
+ 	int    n_pv_r;
+ 	char   value[STRING];
+ 
+-
++printf("%s(%d) argc=%d, argv[1] = %s, para_name_in =%s\n", __FILE__, __LINE__, argc, argv[1], para_name_in);
+ /*CHECK THAT ALL THE PARAM IN ARG EXIST*/
+ 	if ( para_name_in==NULL)
+ 	   {
+@@ -8818,7 +8820,6 @@ char ** standard_initialisation  (char *
+ /*Standard exit*/
+   global_exit_signal=EXIT_SUCCESS;
+   atexit (clean_exit);
+-
+   signal (SIGTERM,signal_exit);
+   signal (SIGINT, signal_exit);
+   signal (SIGKILL, signal_exit);
+@@ -8826,7 +8827,6 @@ char ** standard_initialisation  (char *
+   signal (SIGFPE, error_exit);
+   signal (SIGILL, error_exit);
+   signal (SIGSEGV, error_exit);
+-
+   program_name=(char*)vcalloc ( strlen (in_argv[0])+strlen (PROGRAM)+1, sizeof (char));
+   if (in_argv)
+     {
+@@ -8836,7 +8836,6 @@ char ** standard_initialisation  (char *
+       set_command_line (s);
+     }
+   else sprintf ( program_name, "%s",PROGRAM);
+-
+   if ( name_is_in_list ( "-no_error_report", out_argv, in_argc[0], 100)!=-1)no_error_report=1;
+ 
+   //Plugins
+@@ -8845,6 +8844,7 @@ char ** standard_initialisation  (char *
+ //  get_nproc();
+ 
+ 
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]);
+ 
+   if (!getenv ("UPDATED_ENV_4_TCOFFEE"))
+     {
+@@ -8856,13 +8856,17 @@ char ** standard_initialisation  (char *
+       if (getenv ("ENV_4_TCOFFEE"))file_putenv (getenv ("ENV_4_TCOFFEE"));
+     }
+ 
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]); fflush(stdout);
+   string_putenv (s); //let Command line update go through
+-
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]); fflush(stdout);
++printf("%s (%d): in_argc = %d, in_argv[1][1] = %d, in_argv[2][1] = %d\n", __FILE__, __LINE__, *in_argc, in_argv[1][1], in_argv[2][1]); fflush(stdout);
+ 
+   cputenv ("HOME_4_TCOFFEE=%s",get_home_4_tcoffee());
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]); fflush(stdout);
+   cputenv ("DIR_4_TCOFFEE=%s",get_dir_4_tcoffee());
+   cputenv ("TMP_4_TCOFFEE=%s",get_tmp_4_tcoffee());
+   cputenv ("CACHE_4_TCOFFEE=%s",get_cache_4_tcoffee());
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]); fflush(stdout);
+   cputenv ("MCOFFEE_4_TCOFFEE=%s",get_mcoffee_4_tcoffee());
+   cputenv ("METHODS_4_TCOFFEE=%s",get_methods_4_tcoffee());
+   cputenv ("PLUGINS_4_TCOFFEE=%s",get_plugins_4_tcoffee());
+@@ -8871,6 +8875,7 @@ char ** standard_initialisation  (char *
+ 
+ 
+ 
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]);
+ 
+ 
+   string_putenv (s); //let Command line update go through //Twice in case an executable dir not created
+@@ -8893,6 +8898,7 @@ char ** standard_initialisation  (char *
+   lock(getpid(),LLOCK, LRESET, "%d\n",getppid());//set the main lock
+   if (is_shellpid(getppid()))lock(getppid(),LLOCK, LSET, "%d\n",getpid());//update parent lock when parent is shell
+ 
++printf("%s (%d): in_argc = %d, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, *in_argc, in_argv[1], in_argv[2]);
+ 
+   //set special Variables
+   if (getenv ("MAFFT_BINARIES") || isdir4path ("/usr/local/lib/mafft"));
+@@ -8905,6 +8911,8 @@ char ** standard_initialisation  (char *
+   //pipe_in
+   for (a=1, stdi=0; a<in_argc[0]; a++)
+ 	{
++printf("%s (%d): a = %s, in_argv[1] = %s, in_argv[2] = %s\n", __FILE__, __LINE__, a, in_argv[1], in_argv[2]);
++
+ 	  if ( (strm ( out_argv[a], "stdin") || strm (out_argv[a], "STDIN")) && stdi==0)
+ 	    {
+ 	      char *file;
+--- a/t_coffee_source/t_coffee_lib/t_coffee.c
++++ b/t_coffee_source/t_coffee_lib/t_coffee.c
+@@ -156,8 +156,10 @@ int main (int argc, char *argv[])
+ // printf("RUNNING DEBUG\n");
+   int r, a;
+ 
++printf("%s (%d): argc = %d, argv[1] = %s, argv[2] = %s\n", __FILE__, __LINE__, argc, argv[1], argv[2]);
+   if (argc>=2 && strcmp (argv[1], "-batch")==0)
+     {
++printf("%s (%d): argc = %d, argv[1] = %s\n", __FILE__, __LINE__, argc, argv[1]);
+       char **list;
+       list=file2lines (argv[2]);
+       for (a=1; a<atoi (list[0]); a++)
+@@ -170,8 +172,10 @@ int main (int argc, char *argv[])
+     }
+   else
+     {
++printf("%s (%d): argc = %d, argv[1] = %s, argv[2] = %s\n", __FILE__, __LINE__, argc, argv[1], argv[2]);
+       r=batch_main (argc, argv);
+     }
++printf("%s (%d): argc = %d, argv[1] = %s\n", __FILE__, __LINE__, argc, argv[1]);
+   myexit (r);
+ }
+ 
+@@ -512,7 +516,7 @@ int batch_main ( int argc, char **argv)
+ 	
+ 	int sand_box=0;
+ 
+-
++printf("%s (%d): argc = %d, argv[1] = %s, argv[2] = %s\n", __FILE__, __LINE__, argc, argv[1], argv[2]);
+ 
+ 	if (sand_box==1)
+ 	  {
+@@ -525,9 +529,12 @@ int batch_main ( int argc, char **argv)
+ 	 *        If so, redirect to ::run_other_pg.
+ 	 *        (In case of kmcoffee, load the kmcoffee arguments from ::km_coffee)
+ 	 */
++printf("%s (%d): argc = %d, argv[1] = %s, argv[2] = %s\n", __FILE__, __LINE__, argc, argv[1], argv[2]);
+ 	argv=standard_initialisation (argv, &argc);
+ 	set_string_variable ("t_coffee", argv[0]);
+ 
++printf("%s (%d): argc = %d, argv[1] = %s\n", __FILE__, __LINE__, argc, argv[1]);
++
+ 	if (argc>=3 && strm (argv[1], "-other_pg"))
+ 	  {
+ 	    //standard_initialisation (NULL,NULL);




More information about the debian-med-commit mailing list