Skip to Content
0
Feb 24, 2021 at 11:12 AM

AdsSkip and IPC connection problem

67 Views

Hello,

I have problem with ADS 12, 64 bit for Linux.
Configuration: Debian 10.1 x64, Ads Linux Server 12.02 - 200 users, Ads Linux Client 12.02, database dbfcdx, language Harbour, local IPC connection.

The problem occurs in the AdsSkip function, which hangs at random moments, stopping the entire program. After analyzing, I found that the problem was related to semaphore handling and endless waiting for state change. The error occurs in a simple sequence:

AdsGoTop ()
DO WHILE! AdsEof ()
AdsSkip (1)
ENDDO

at random times.

The crash occurs when the semop function is called:
[Switching to thread 1 (Thread 0x7ffff7742740 (LWP 4048))]
#0 semop (semid=134348813, sops=0x7fffffffcd80, nsops=1) at ../sysdeps/unix/sysv/linux/semop.c:30
30 ../sysdeps/unix/sysv/linux/semop.c: Nie ma takiego pliku ani katalogu.
(gdb) bt
#0 semop (semid=134348813, sops=0x7fffffffcd80, nsops=1) at ../sysdeps/unix/sysv/linux/semop.c:30
#1 0x00007ffff7e162e5 in ?? () from /usr/lib/libace.so.12.00
#2 0x00007ffff7e03a30 in ?? () from /usr/lib/libace.so.12.00
#3 0x00007ffff7e040e7 in ?? () from /usr/lib/libace.so.12.00
#4 0x00007ffff7e042ad in ?? () from /usr/lib/libace.so.12.00
#5 0x00007ffff7e06f2e in ?? () from /usr/lib/libace.so.12.00
#6 0x00007ffff7e0a0c6 in ?? () from /usr/lib/libace.so.12.00
#7 0x00007ffff7d467e9 in ?? () from /usr/lib/libace.so.12.00
#8 0x00007ffff7da80a9 in ?? () from /usr/lib/libace.so.12.00
#9 0x00007ffff7d0403f in ?? () from /usr/lib/libace.so.12.00
#10 0x00007ffff7d2166b in AdsSkip () from /usr/lib/libace.so.12.00
#11 0x0000555555596512 in adsSkip ()
#12 0x00005555555a9779 in hb_vmProc ()
#13 0x00005555555abdbc in hb_vmExecute ()
#14 0x00005555555a9779 in hb_vmProc ()
#15 0x00005555555abf60 in hb_vmExecute ()
#16 0x00005555555a9779 in hb_vmProc ()
#17 0x00005555555abdbc in hb_vmExecute ()
#18 0x00005555555a9779 in hb_vmProc ()
#19 0x0000555555586af3 in main ()
(gdb)


State of semaphores:

ipcs -i 134348813 -s

Identyfikator tablicy semaforów (semid)=134348813
uid=1001 gid=1001 cuid=1001 cgid=1001
tryb=0666, uprawnienia=0666
lsem = 4
otime = Wed Feb 24 11:59:02 2021
ctime = Wed Feb 24 11:58:46 2021
n.sem. wartość oczek.n. oczek.z. pid
0 0 0 0 27294
1 0 0 0 4048
2 1 0 0 4048
3 0 1 0 4048


The problem only occurs with the IPC connection, using the connection via the loopback adapter or from another computer, everything is ok.

Thanks,
Darek