EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer build problem cygwin64
From: Benjamin Franksen <[email protected]>
To: "Graber, Tim" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 14 Apr 2014 20:36:24 +0200
Am Montag, 14. April 2014, 17:34:27 schrieb Graber, Tim:
> Hi Ben-
> I added a few statements to the code in addition to the patch to print out
> more information.  The source codes are attached as well.

The are are no significant difference between your pvSync.i and mine, so I 
guess we can exclude CPP from the list of suspects.

>  When the build
> gets to the point where it is going to print the offending scope->type, the
> process hangs on the function:
 
> report_at_expr(scope, "scope->type == %d\n", scope->type);
> 	
> and I can't ctrl-c out of it.  I actually have to kill the Cygwin window and
> start over.  

That strongly suggests the 'scope' pointer is corrupt. I guess you will have 
to start it with a debugger, as Eric described. (Thanks, Eric, for the 
suggestion.)

You could also wait until I get a 64 Bit Windows VM so I can debug this 
myself. I ordered one today, but it could take a few days until I can get my 
hands on it.

Cheers
Ben

> Here is the part of the analysis.c code that I changed:
> 
> 	report_at_expr(scope, "scope->type == %d\n", scope->type);
> 	switch(scope->type)
> 	{
> 	case D_PROG:
> 		return scope->prog_defns;
> 	case D_SS:
> 		return scope->ss_defns;
> 	case D_STATE:
> 		return scope->state_defns;
> 	case D_WHEN:
> 		return scope->when_defns;
> 	case D_ENTRY:
> 		return scope->entry_defns;
> 	case D_EXIT:
> 		return scope->exit_defns;
> 	case S_CMPND:
> 		return scope->cmpnd_defns;
> 	default:
> 		report("In default, line = 209\n");
> 		report_at_expr(scope, "offending scope->type == %d\n", scope->type);
> 		assert(impossible); 
> 		return NULL;
> 
> Here is the output from the build:
> 
> ../../../bin/cygwin-x86_64/snc.exe   +m -i  pvSync.i -o pvSync.c.tmp
> ../pvSync.st:7: scope->type == 6
> ../pvSync.st:33: scope->type == 2
> ../pvSync.st:41: scope->type == 7
> ../pvSync.st:42: scope->type == 8
> ../pvSync.st:43: scope->type == 11
> ../pvSync.st:51: scope->type == 7
> ../pvSync.st:52: scope->type == 8
> ../pvSync.st:54: scope->type == 11
> ../pvSync.st:64: scope->type == 7
> ../pvSync.st:65: scope->type == 8
> ../pvSync.st:66: scope->type == 11
> ../pvSync.st:75: scope->type == 8
> ../pvSync.st:76: scope->type == 11
> ../pvSync.st:80: scope->type == 25
> 
> Tim
> 
> 
> -----Original Message-----
> From: Benjamin Franksen [mailto:[email protected]] 
> Sent: Monday, April 14, 2014 10:31 AM
> To: Mark Rivers
> Cc: Graber, Tim; [email protected]
> Subject: Re: Sequencer build problem cygwin64
> 
> Oops, no core file. That makes things more difficult.
> 
> Can you apply this patch:
> 
> diff -rN -u old-branch-2-1/src/snc/analysis.c new-
> branch-2-1/src/snc/analysis.c
 --- old-branch-2-1/src/snc/analysis.c  
> 2014-04-14 17:30:40.000000000 +0200
> +++ new-branch-2-1/src/snc/analysis.c   2014-04-14 17:30:40.000000000 
> +0200
> @@ -205,6 +205,7 @@
>         case S_CMPND:
>                 return scope->cmpnd_defns;
>         default:
> +               report_at_expr(scope, "offending scope->type == %d\n",
> scope->type);
>                 assert(impossible); return NULL;
>         }
>  }
> 
> and then run again and send the output?
> 
> Cheers
> Ben
> 
> On Monday, April 14, 2014 15:22:13 Mark Rivers wrote:
> 
> > The last time I checked on Cygwin it did not produce useful core 
> > files, so gdb could not be used with them.
> 
>  
> 
> > Maybe it has improved since I last tried it?
> > 
> > Mark
> > 
> > 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Benjamin Franksen
> 
>  Sent: Monday, April 14, 2014 10:15 AM
> 
> > To: Graber, Tim; [email protected]
> > Subject: Re: Sequencer build problem cygwin64
> > 
> > Hi Tim
> > 
> > can you send me the original pvSync.i? Maybe there is a problem with 
> > the
> 
>  C preprocessor on your platform.
> 
> > 
> > Also, can you use gdb to analyse the core for the aborted snc run?
> > Start
> 
>  it like
> 
> > 
> > 
> >   gdb bin/cygwin-x86_64/snc.exe test/validate/O.cygwin-x86_64/core
> > 
> > 
> > and enter
> > 
> > 
> >   backtrace
> > 
> > 
> > then send me the output.
> > 
> > Thanks
> > Ben
> > 
> > On Monday, April 14, 2014 02:51:42 Graber, Tim wrote:
> > 
> > 
> > > Hi Ben-
> > > I did a bit more debugging and found the point in the pvSync.i file 
> > > that is causing the problem.  It's at line 84:
> > > 
> > > 
> > > 
> > >        if (i >= 1000 -1) {
> > > 	
> > > 	
> > > 	state done;
> > > 	
> > > 	
> > >        }
> > > 
> > > 
> > > 
> > > When I replaced the above by
> > > 
> > > %%       if (i >= 1000 -1) {
> > > 
> > > 
> > > 	state done;
> > > 
> > > 
> > > %%      }
> > > 
> > > and ran the command
> > > 
> > > ../../../bin/cygwin-x86_64/snc.exe   +m -i  pvSync.i -o
> > > pvSync.c.tmp
> > > 
> > > in the O.cygwin-x86_64 directory, it produced  pvSync.c.tmp without 
> > > error.
> > 
> > 
> > 
> > 
> > 
> > 
> > > 
> > > Tim
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]] On Behalf Of Johnson, Andrew 
> > > N. Sent: Sunday, April 13, 2014 9:38 PM
> > > To: Benjamin Franksen
> > > Cc: [email protected]
> > > Subject: Re: Sequencer build problem cygwin64
> > > 
> > > Hi Ben,
> > > 
> > > The OSCLASS for the cygwin-x86_64 architecture is 'cygwin32' so that 
> > > include path is actually correct. This is an accident of history, as 
> > > is the OSCLASS 'WIN32' of the windows-x64 architectures; the OS APIs 
> > > didn't change significantly when they went to 64-bit and we didn't 
> > > want to duplicate code unnecessarily, so we still use the old names.
> > > 
> > > Your "impossible" assertion condition might not be (whatever it is).
> > > 
> > > - Andrew
> > > 
> > > --
> > > Sent from my iPad
> > > 
> > > 
> > > 
> > > > On Apr 13, 2014, at 5:52 PM, "Benjamin Franksen"
> > > > <[email protected]> wrote:
> > > > 
> > > > Hi Tim
> > > > 
> > > > looking at the make output, I notice that your include path has - 
> > > > I../../../include/os/cygwin32, even though you compile for 
> > > > O.cygwin-x86_64. This looks inconsistent to me, and could perhaps 
> > > > explain the assertion failure. I may be wrong, though, in which 
> > > > case we'd have to look deeper into what's broken (I have never 
> > > > compiled on this platform, only on 32 bit Windows native).
> > > > 
> > > > Cheers
> > > > Ben
> > > > 
> > > > Am Sonntag, 13. April 2014, 17:17:11 schrieb Graber, Tim:
> > > > 
> > > > 
> > > >> I am trying to build the EPICS Sequencer (version seq-2.1.15) 
> > > >> using
> > > >> 64-bit Cygwin.   I get the following error when I build the test
> > > >> directory and a similar error when building the examples 
> > > >> directory.  If I comment out the test and examples directories in 
> > > >> the Makefile, the src directory builds fine.  Any help will be 
> > > >> appreciated. Thanks, Tim Graber
> > > >> 
> > > >> 
> > > >> gcc -c  -D_POSIX_THREADS -D_POSIX_TIMERS            -DUNIX 
> > > >> -DCYGWIN32 -O3   -Wall     -m64   -DEPICS_DLL_NO   -MMD -I.
> > > >> -I../O.Common -I. -I.. -I../../../include/os/cygwin32 
> > > >> -I../../../include
> > > >> -I/usr/local/EPICS/base/include/os/cygwin32
> > > >> -I/usr/local/EPICS/base/include>>
> > > >> 
> > > >> 
> > > >>      opttVar.c g++ -o opttVar.exe -static
> > > >> 
> > > >> 
> > > >> 
> > > >> -L/usr/local/epics/base-3.14.12.4/seq-2.1.15/lib/cygwin-x86_64
> > > >> -L/usr/local/EPICS/base-3.14.12.4/lib/cygwin-x86_64      -m64
> > > >> opttVar.o subThreadSleep.o
> > > >> seqSoftIoc_registerRecordDeviceDriver.o
> > > >> testSupport.o    -lseq -lpv -lrecIoc -lsoftDevIoc -lmiscIoc
> > > >> -lrsrvIoc
> > > >> -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca 
> > > >> -lCom
> > > >> -lpthread    -lm preprocessing ../pvSync.st
> > > >> gcc -x c -E  -D_POSIX_THREADS -D_POSIX_TIMERS            -DUNIX 
> > > >> -DCYGWIN32 -I. -I../O.Common -I. -I..
> > > >> -I../../../include/os/cygwin32
> > > >> -I../../../include -I/usr/local/EPICS/base/include/os/cygwin32
> > > >> -I/usr/local/EPICS/base/include       ../pvSync.st > pvSync.i
> > > >> converting pvSync.i
> > > >> ../../../bin/cygwin-x86_64/snc.exe   +m -i  pvSync.i -o
> > > >> pvSync.c.tmp
> > > >> assertion "impossible" failed: file "../analysis.c", line 209,
> > > >> function: defn_list_from_scope
> > > >> ../../../configure/RULES_BUILD:62:
> > > >> recipe for target 'pvSync.c' failed make[3]: *** [pvSync.c] 
> > > >> Aborted (core dumped)
> > > >> make[3]: Leaving directory
> > > >> '/usr/local/epics/base-3.14.12.4/seq-2.1.15/test/validate/O.cygwi
> > > >> n-
> > > >> x86_64' /usr/local/EPICS/base/configure/RULES_ARCHS:63: recipe 
> > > >> for target 'install.cygwin-x86_64' failed make[2]: *** 
> > > >> [install.cygwin-x86_64] Error 2
> > > >> make[2]: Leaving directory
> > > >> '/usr/local/epics/base-3.14.12.4/seq-2.1.15/test/validate'
> > > >> /usr/local/EPICS/base/configure/RULES_DIRS:70: recipe for target 
> > > >> 'validate.install' failed make[1]: *** [validate.install] Error
> > > >> 2
> > > >> make[1]: Leaving directory
> > > >> '/usr/local/epics/base-3.14.12.4/seq-2.1.15/test'
> > > >> /usr/local/EPICS/base/configure/RULES_DIRS:70: recipe for target 
> > > >> 'test.install' failed make: *** [test.install] Error 2
> > > >> 
> > > >> -------------------------------------------------
> > > >> Timothy Graber
> > > >> Research Professor
> > > >> Washington State University
> > > >> Manager, Dynamic Compression Sector c/o Argonne National 
> > > >> Laboratory Bld. 438F/F002
> > > >> 9700 S. Cass Ave
> > > >> Argonne, IL 60439
> > > >> Phone: (630)252-0462
> > > > 
> > > > 
> > > > 
> > > > --
> > > > Perl: There Is More Than One Way To Do It
> > > > Python: There Is One Way To Do It
> > > > Haskell: There Is One Way To Do It, Up To Isomorphisµ
> > 
> > 
> > --
> > "Make it so they have to reboot after every typo." ― Scott Adams
> 
> 
> --
> "Make it so they have to reboot after every typo." ― Scott Adams

-- 
Perl: There Is More Than One Way To Do It
Python: There Is One Way To Do It
Haskell: There Is One Way To Do It, Up To Isomorphisµ

Attachment: signature.asc
Description: This is a digitally signed message part.


Navigate by Date:
Prev: RE: Streamdevice 2.6 autoconnection failure using drvAsynSerialPort Mark Rivers
Next: Re: Array Writes to HW Registers - How to ??? Stephen Beckwith
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Modbus R2-6 available Mark Rivers
Next: Re: Array Writes to HW Registers - How to ??? Stephen Beckwith
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·