Hi,
I wonder if this is a cleanup race condition - drvAsynIPServerPort calls epicsAtExit(ttyCleanup, tty) and I think the accept loop thread keeps trying to use the same tty structure after it has been deallocated leading to unpredictable behaviour
Regards,
Freddie
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mark Rivers
> via Tech-talk
> Sent: 20 December 2023 22:52
> To: J. Lewis Muir <jlmuir at imca-cat.org>; EPICS Tech-Talk <tech-
> talk at aps.anl.gov>
> Subject: RE: asyn ioctestIPServer prints many accept errors after IOC exit?
>
> Lewis,
>
> I have replied to your issue on Github:
>
> - You had an error when you started the IOC because envPaths could not be
> found. This is probably because you did not change ARCH in
> ioctestIPServer/Makefile to match your EPICS_HOST_ARCH, so it did not
> create the envPaths file.
> - When I run the IOC on linux-x86_64 it exits cleanly, I do not see any error
> messages.
> - When I run the IOC on windows-x64-static I see 2 error messages and then it
> exits cleanly.
>
> The problem may be specific to Darwin. You are one of relatively few people
> who run EPICS on Darwin, so you may need to debug this yourself and submit
> a Pull Request to fix it.
>
> Mark
>
>
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of J. Lewis Muir
> via Tech-talk
> Sent: Wednesday, December 20, 2023 4:01 PM
> To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
> Subject: asyn ioctestIPServer prints many accept errors after IOC exit?
>
> Hello!
>
> After exiting the ioctestIPServer of asyn 4-44-2, thousands of error messages
> get printed to the standard error stream.
>
> I created an issue on GitHub for this a few days ago:
>
> https://github.com/epics-modules/asyn/issues/199
>
> Since I didn't hear anything on that issue, I'm posting here.
>
> The specific behavior is that after exiting ioctestIPServer, a "Software caused
> connection abort" error message gets printed to the standard error stream
>
> ----
> 2023/12/15 16:09:01.998 drvAsynIPServerPort: accept error on ª : fd=5,
> Software caused connection abort
> ----
>
> followed by tens of "Socket operation on non-socket" error messages
>
> ----
> 2023/12/15 16:09:01.998 drvAsynIPServerPort: accept error on (null): fd=0,
> Socket operation on non-socket
> ----
>
> followed by another "Software caused connection abort" error message, but
> for a different file descriptor (maybe the other server?)
>
> ----
> 2023/12/15 16:09:01.999 drvAsynIPServerPort: accept error on : fd=4,
> Software caused connection abort
> ----
>
> followed by thousands more of the "Socket operation on non-socket" error
> messages
>
> ----
> 2023/12/15 16:09:01.999 drvAsynIPServerPort: accept error on (null): fd=0,
> Socket operation on non-socket
> ----
>
> Here's an example terminal session (using EPICS 7.0.7; the same problem also
> exists when using EPICS 7.0.8):
>
> ----
> $ cd iocBoot/ioctestIPServer
> $ ../../bin/darwin-aarch64/testIPServer st.cmd < envPaths Can't open
> envPaths: No such file or directory
> dbLoadDatabase("../../dbd/testIPServer.dbd")
> testIPServer_registerRecordDeviceDriver(pdbbase)
> #The following command starts a server on port 5001
> drvAsynIPServerPortConfigure("P5001","localhost:5001",2,0,0,0)
> serverAddr: 0.0.0.0:5001
> serverPort: 5001
> drvAsynIPServerPortConfigure("P5002","localhost:5002",1,0,0,0)
> serverAddr: 0.0.0.0:5002
> serverPort: 5002
> #asynSetTraceFile("P5001",-1,"")
> asynSetTraceIOMask("P5001",-1,0x2)
> #asynSetTraceMask("P5001",-1,0xff)
> dbLoadRecords("../../db/testIPServer.db", "P=testIPServer:")
> iocInit()
> Starting iocInit
> ################################################################
> ############
> ## EPICS R7.0.7
> ## Rev. 2023-11-28T21:51-0600
> ## Rev. Date build date/time:
> ################################################################
> ############
> iocRun: All initialization complete
> ipEchoServer("P5001")
> seq("ipSNCServer", "P=testIPServer:, PORT=P5002") sevr=info Sequencer
> release 2.2.9, compiled Fri Dec 15 15:36:22 2023 sevr=info Spawning
> sequencer program "ipSNCServer", thread 0x600003684000: "ipSNCServer"
> sevr=info ipSNCServer[0]: all channels connected & received 1st monitor
> epics> exit
> 2023/12/15 16:09:01.998 drvAsynIPServerPort: accept error on ª : fd=5,
> Software caused connection abort
> 2023/12/15 16:09:01.998 drvAsynIPServerPort: accept error on (null): fd=0,
> Socket operation on non-socket [previous line repeated tens of times sans
> timestamp differences]
> 2023/12/15 16:09:01.999 drvAsynIPServerPort: accept error on : fd=4,
> Software caused connection abort
> 2023/12/15 16:09:01.999 drvAsynIPServerPort: accept error on (null): fd=0,
> Socket operation on non-socket [previous line repeated thousands of times
> sans timestamp differences]
> ----
>
> Platform:
>
> * Apple Silicon (EPICS_HOST_ARCH=darwin-aarch64)
> * macOS Sonoma 14.1.1
> * EPICS 7.0.8
> * Asyn 4-44-2
>
> Thanks!
>
> Lewis
- References:
- asyn ioctestIPServer prints many accept errors after IOC exit? J. Lewis Muir via Tech-talk
- RE: asyn ioctestIPServer prints many accept errors after IOC exit? Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
RE: asyn ioctestIPServer prints many accept errors after IOC exit? Mark Rivers via Tech-talk
- Next:
Re: asyn ioctestIPServer prints many accept errors after IOC exit? J. Lewis Muir via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
- Navigate by Thread:
- Prev:
RE: asyn ioctestIPServer prints many accept errors after IOC exit? Mark Rivers via Tech-talk
- Next:
Re: asyn ioctestIPServer prints many accept errors after IOC exit? J. Lewis Muir via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
|