Author Topic: Trap 000e and Sockets  (Read 2739 times)

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #15 on: December 05, 2019, 03:19:58 pm »
I have both of those files in my CONFIG.SYS both in C:\MPTN\PROTOCOL.

SOCKETSK.SYS   8-24-14      128,512
AFINETK.SYS      9-20-15      318,976

I rotate my apache logs about once a month. Right now the biggest is around 2 meg.

With respect to netstat -m right now after running 6 hours this is what it shows:

Code: [Select]
mbufs obtained from page pool            = 10304
free mbufs                               = 8484
data mbufs                               = 0
header mbufs                             = 1
socket structure mbufs                   = 75
socket name mbufs                        = 43
socket option mbufs                      = 0
protocol control block mbufs             = 100
routing table mbufs                      = 1585
fragment reassembly mbufs                = 0
clusters obtained from page pool         = 1135
free clusters                            = 486
times failed to find space               = 0
times waited for space                   = 0


I will monitor InJoyFW GUI to see if see if something or someone is hammering the system but usually that will automatically block any IP/Port that is doing so.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 47
  • Posts: 1264
    • View Profile
Re: Trap 000e and Sockets
« Reply #16 on: December 05, 2019, 04:54:22 pm »
Good point Doug. I however checked both binaries in FC (socketsk.sys and sockets.sys). I think both have the module name "sockets".
So I am not certain if the TRAP screen makes it possible to see the difference which driver is loaded.
Ben your config.sys lists the driver socketsk.sys and afitnek.sys with a letter k before the .sys ?

Roderick

I haven't seen a SOCKETS(K) trap, for a couple of years. I do see the odd AFINETK (with the K) trap, which is why I made the suggestion. Apparently, the AFINETK trap has something to do with SMP.

I will also mention, that ArcaOS includes a program SOCKTIDY.EXE, that is supposed to keep dead sockets from accumulating. Again, I am not sure if that is available outside of ArcaOS. Apparently, it helps with servers, but I find that it is not good for normal use. Currently, it is started in C:\TCPIP\bin\B4TCP.CMD but it was started in a different place in earlier versions of ArcaOS.

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #17 on: December 05, 2019, 11:51:11 pm »
Try this:
DEVICE=C:\MPTN\PROTOCOL\SOCKETSK.SYS /mbuf:512 /mem:3600

You can try higher values for mbuf and mem.
If that stretches the time until next crash then SOCKETSK.SYS likely has a bug on allocating a buffer as the trap tells me that it is trying to copy memory from an address beyond the limit it can access.
I wouldn't know how to fix this error as no source code exists for SOCKETSK.SYS.

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #18 on: December 06, 2019, 02:46:37 am »
OK, Lars.

I have made the modifications, now I shall see what happens.


Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #19 on: December 06, 2019, 09:24:43 am »
Forgot:
1) do not add drivers or modify config.sys ordering on this system. That will allow to compare a trap screen with the first trap screen you already posted.
2) take picture of trap screen if trap happens again.
Check yourself the value of CR2 on trap screen: if it is not higher than the first time,you should increase mbufs or mem
3) as an info: mbufs has relation to everything that says mbufs in netstat -m output and mem has relation to everything that says clusters in netstat -m output. Unfortunately I do not know the direct relation.

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #20 on: December 07, 2019, 02:20:57 pm »
Thanks, Lars.

No issues yet, but it hasn't been long enough.

One thing of note is that some lines that were static before have changed... as expected netstat -m - posted for those who are following along;


Code: [Select]
mbufs obtained from page pool            = 4272
free mbufs                               = 2888
data mbufs                               = 0
header mbufs                             = 3
socket structure mbufs                   = 77
socket name mbufs                        = 43
socket option mbufs                      = 0
protocol control block mbufs             = 104
routing table mbufs                      = 1141
fragment reassembly mbufs                = 0
clusters obtained from page pool         = 1150
free clusters                            = 878
times failed to find space               = 0
times waited for space                   = 0

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #21 on: December 07, 2019, 03:58:22 pm »
It's a good idea to monitor the output of netstat -m over time.
Maybe you can run netstat every 12 hours or so and dump the output to a file. Maybe that tells you something about free mbufs and free clusters.
Increasing these values in config.sys is just a hack to prevent the driver from ever asking for the last available buffer. Because I think that is when it fails.

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #22 on: December 09, 2019, 02:07:31 am »
I have been doing that. Too bad there isn't any way to do that automatically and add the date/time.

Still no crash since adding those parameters though.
8)

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #23 on: December 09, 2019, 03:12:02 am »
I think there is a tool called chron that allows you to run an application on a time schedule. I think it is installable via AN package manager ( it is hosted at Netlabs,ported by BWW).
It should also be possible to write a REXX script by calling a tool called sleep to put the script to rest. In the REXX script you can write to the log file whatever you want,including time and date.
« Last Edit: December 09, 2019, 03:21:59 am by Lars »

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #24 on: December 10, 2019, 07:16:13 pm »
I can do the scheduling through DragText, but writting the REXX is a hit and miss process for me.

I will take a look through Hobbes; maybe there is something there that I can adapt/modify.

Rene Hvidsoe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 34
    • View Profile
Re: Trap 000e and Sockets
« Reply #25 on: December 10, 2019, 07:48:22 pm »
Hi Ben,

I have for some years ago used a schedule utility called  schedb2.zip it adds a schedule page to WPProgram objects.

I have used it for clamav update on hourly basis for some years. Easy to use.

Is found on hobbes:

http://hobbes.nmsu.edu/download/pub/os2/util/schedule/schedb2.zip

Rene Hvidsoe


Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #26 on: December 10, 2019, 08:19:55 pm »
Hello, Rene.

DragText does the same thing, adding a page to every WPS object, and it's one of the essential enhancers that I add upon installing OS/2.
One has to appreciate such a transparent, necessary application(?). 8)

But, I was unaware of schedb2; thanks for the heads up.

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #27 on: December 12, 2019, 08:38:41 pm »
Code: [Select]
/* this is a REXX script */

signal on error name getout
signal on failure name getout
signal on notready name getout
signal on error name getout
signal on halt name getout

LogPath = VALUE('LOGFILES',,'OS2ENVIRONMENT')
LogFile = LogPath'\netstat.log'

'@del /F 'LogFile' 2>&1 >NUL'
rc = stream(LogFile,'C','OPEN WRITE')

'@rxqueue /CLEAR'
say 'Press any key to end ...'
do i=1 to 10
   '@netstat -m | rxqueue'
   string = '********************************************************* 'Date()' *** 'Time()' ***'
   rc = lineout(LogFile,string)
   do j=1 to queued()
      parse pull string
      rc = lineout(LogFile,string)
   end
   if chars() > 0 then do
      leave
   end
   '@sleep 3600s'
end

getout:
rc = stream(LogFile,'C','CLOSE')
return 0

Ben

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 216
  • Know Thyself
    • View Profile
Re: Trap 000e and Sockets
« Reply #28 on: December 15, 2019, 05:52:44 pm »
Thanks for that Lars.

Just incase  you are wondering, I haven't had a Trap since I changed my CONFIG.SYS as you suggested.

Hopefully the problem has been solved. 8)

Now, I can move onto, (or back to), the other issues.

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 446
    • View Profile
Re: Trap 000e and Sockets
« Reply #29 on: December 15, 2019, 07:39:38 pm »
Let's hope it's going to stay that way.