This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ptolemy 0.7.1 on NTsp3 - pigiRpc Aborts Often


Well, it's obvious that I am rusty on "signal" processing basics :-)... In
Ptolemy 0.7.1, for the NT build,

...
#else
/*default is no assignment*/
void ptBlockSig (int SigNum) {};
void ptReleaseSig (int SigNum) {};
void ptSafeSig( int SigNum ) {};
...

are found in $PTOLEMY/src/kernel/ptsignals.cc.  Now, since I've enabled the
itimers (removed the -DPT_NO_TIMERS from my config-nt4.mk), there are
SIGALRMs (in addition to the occasional SIGCHLD) flying around, causing the
occasional "Interrupted system call" error exits from pigiRpc.  So:
...
#else
#if defined(PTNT)   # maybe other, HAVE_POSIX... type flags should be
checked here as well...
static sigset_t signal_to_block;

void ptSafeSig( int ) {}

void ptBlockSig( int SigNum ) {
    sigemptyset(&signal_to_block);
    sigaddset (&signal_to_block, SigNum);
    sigprocmask (SIG_BLOCK, &signal_to_block, (sigset_t *)NULL);
}
void ptReleaseSig( int SigNum ) {
    sigemptyset(&signal_to_block);
    sigaddset (&signal_to_block, SigNum);
    sigprocmask (SIG_UNBLOCK, &signal_to_block, (sigset_t *)NULL);
}

#else
/*default is no assignment*/
...

in the same file fixed my problem after make install in $PTOLEMY/obj.nt4.
The tcl/tk demos (and interactive sources/sinks) still work, Ptolemy NT is
still running fast, so I'm happy...

Thank you for your patience,
Zoltan Kemenczy

> Hi Everyone,
>
> I have compiled Ptolemy 0.7.1 (PtolemyClassic
> http://ptolemy.eecs.berkeley.edu/) on NTsp3 with: Cygwin B20.1+Win95
> make/fork/fault patch and egcs-1.1.2.  (For Ptolemy Hackers: I found that
> the Win95 make/fork/fault patch fixes the problem with % characters in
> pathnames.  I am using the prebuilt X11R6.4 binaries and Exceed 6.1 for
> X-server.  I have also removed the -DPT_NO_TIMERS from LOCALCCFLAGS
> config-nt4.mk for pigiRpc to run at normal speeds and haven't found any
> demos that aren't working yet, including the Tk demos under SDF).
>
> Now the problem: Whenever there seems to be some kind of problem in the
> simulation (i.e. a port is not connected in some deeper-buried galaxy...),
> instead of completing the error messages and highlighting the associated
> icons with red, pigiRpc exits with the following error:
>
> Ptolemy failed to receive response from Vem!
> RPC Error: application: ../../../../src/octtools/Xpackages/rpc/rpc.c (line
> 79): RPCReceiveLong(&dummy, stream): Interrupted system call
> /users/ptolemy/bin.nt4/pigiRpc: fatal error detected by rpc (code -1):
>  RPC Error: application: ../../../../src/octtools/Xpackages/rpc/rpc.c
(line
> 79): RPCReceiveLong(&dummy, stream)
> Vem RPC: client has failed.
>
> I suspect this is some kind of problem with the cygwin fread / signal
> handling / masking. In the Cygwin User's Guide unde the Signals section
they
> talk about some of this stuff, so I'm not sure if the "Interrupted system
> call" message is a sign of a hole in cygwin or is Ptolemy not compliant
with
> the current cygwin-level of POSIX implementation?
>
> Has anyone seen this problem before, any ideas for a fix, or what to try
to
> narrow it down? When I run this in pigi -debug mode and set breakpoints in
> rpc.c to catch the error, the gdb backtrace is about 70 frames deep...
>
> Thank you,
> Zoltan Kemenczy, zkemenczy@rim.net
> DSP Software Engineering
> Research in Motion Limited
> Waterloo, Ontario Canada  N2L 3W8
> www.rim.net
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]