[Glass] Error "The GemStone session has lost its connection to the Stone Repository monitor." when using System performOnServer:

Ralph Mauersberger ralph.mauersberger at gmx.net
Wed Feb 23 12:26:22 PST 2022


Hello everybody,

I would like to execute a server side script from within a topaz job
using System performOnServer:. What I do is basically this:


#!/bin/bash

#This is Script: testLongRunningPerformOnServer.sh

/opt/gemstone/gemstone/bin/topaz -l << EOF

set gems mystone user seaside pass swordfish

login

run

%

iferror exit

time

run

| resultString |

"Switch to transactionless while running the external task"

System transactionMode: #transactionless.

resultString := System performOnServer: 'sleepForSeconds 3600'.

"Aquire database view again in order to save the result to the repository"

System transactionMode: #autoBegin.

MyApplication persistResult: resultString.

System commitTransaction.

^'done'.

%

time

logout

exit

EOF

For testing I wrote this dummy-script:

#!/bin/bash

# This is Script: sleepForSeconds

# ramauers, 2022-01-28: Print out some text and sleep for the number of
seconds given as 1st argument.

if [ A$1 = A ]

then

         echo "number of seconds to sleep expected as 1st argument"

         exit 1

fi

seconds=1

while [ $seconds -le $1 ]

do

         sleep 1

         date

         echo "Sleeping since $seconds/$1 seconds."

((seconds++))

done

This works in principle, but it reproducibly fails with the following
exception, if other sessions are doing a lot of commits while the
external script is executing.

_____________________________________________________________________________

|             GemStone/S64 Object-Oriented Data Management
System             |

|                   Copyright (C) GemTalk Systems
1986-2016                   |

|                            All rights
reserved.                             |

|     covered by Patent Number 6,567,905 Generational Garbage
Collector.      |

+-----------------------------------------------------------------------------+

|    PROGRAM: topaz, Linear GemStone Interface (Linked
Session)               |

|    VERSION: 2.4.8, Tue Feb  2 15:18:28
2016                                 |

|      BUILD: gss64_2_4_x_branch-38672 |

|  BUILT FOR: x86-64
(Linux)                                                  |

|       MODE: 64 bit                               |

| RUNNING ON: 2-CPU myhost... x86_64 (Linux 3.10.0-1160.42.2.el7.x86_64

| #1 SMP Tue Aug 31 20:15:00 UTC 2021) 3906MB  
                               |

| PROCESS ID: 115117    DATE: 02/23/2022 08:35:26 CET    
                     |

|   USER IDS: REAL=ramauers (25250) EFFECTIVE=ramauers
(25250)                |

|_____________________________________________________________________________|

topaz> topaz> [Info]: LNK client/gem GCI levels = 844/844

[Info]: User ID: seaside

[Info]: Repository: mystone

[Info]: Session ID: 2

[Info]: GCI Client Host: <Linked>

[Info]: Page server PID: -1

[Info]: Login Time: 02/23/2022 08:35:26 CET

[Info]: Extended character table loaded

[02/23/2022 08:35:26 CET] gci login: currSession 1 rpc gem processId -1

successful login

topaz 1> nil

topaz 1> topaz 1> 02/23/2022 08:35:26 CETCPU time:   0.110 seconds

topaz 1>

[Info]: Logging out at 02/23/2022 09:35:38 CET

-----------------------------------------------------

GemStone: Error         Fatal

The GemStone session has lost its connection to the Stone Repository

monitor.

Error Category: [GemStone] Number: 4035 Arg Count: 0

Now executing the following command saved from "iferr 1":

exit

The exception occures immediately after the called script regularly
finished. Due to the case, that it only fails in conjunction with a lot
of commits, I suppose that this is somehow related to sent sigAborts
from the stone, although I would not expect any issues with that while
the session is in transactionless-Mode. I also fiddled around with
sigAbort-Handlers, but was unable to solve this issue so far.

Any ideas are very much appreciated.

Best regards,
Ralph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20220223/c2921543/attachment.htm>


More information about the Glass mailing list